37 #ifndef EGS_SIMPLE_APPLICATION_
38 #define EGS_SIMPLE_APPLICATION_
98 EGS_Float &t,
int *newmed) {
99 return g->howfar(ireg,x,u,t,newmed);
104 return g->hownear(ireg,x);
108 return g->medium(ireg);
134 virtual void finish();
185 void fillRandomArray(
int n, EGS_Float *r);
191 const char *egsHome()
const;
193 const char *henHouse()
const;
195 const char *pegsFile()
const;
197 const char *inputFile()
const;
199 const char *outputFile()
const;
201 const char *userCode()
const;
203 const char *workDir()
const;
209 int iParallel()
const;
211 int nParallel()
const;
233 #define APP_MAIN(app_name) \
234 int main(int argc, char **argv) { \
235 app_name app(argc,argv); \
237 app.reportResults(); \
242 #define APP_LIB(app_name) \
244 APP_EXPORT EGS_SimpleApplication* createApplication(int argc, char **argv) {\
245 return new app_name(argc,argv);\
EGS_I64 ncase
Number of showers to simulate.
EGS_BaseSource * source
The particle source.
A class representing 3D vectors.
A base class for developing simple EGSnrc applications.
virtual void endHistory()
EGS_Float hownear(int ireg, const EGS_Vector &x)
See the EGSnrc hownear geometry specification .
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
virtual void startHistory(EGS_I64)
Start a new shower.
Base random number generator class. All random number generators should be derived from this class...
int getMedium(int ireg)
Get the medium index in region ireg.
EGS_Input * input
The input found in the input file.
EGS_RandomGenerator * rndm
The random number generator.
int nreport
How often to report the progress.
Defines the EGS_EXPORT and EGS_LOCAL macros.
void setNProgress(int nprog)
Set the number of times the shower loop in run() reports the progress of the simulation to nprog...
EGS_BaseGeometry class header file.
EGS_I64 last_case
last statistically independent event
double sum_w2
sum of weights squared
int howfar(int ireg, const EGS_Vector &x, const EGS_Vector &u, EGS_Float &t, int *newmed)
See the EGSnrc howfar geometry specification .
Base source class. All particle sources must be derived from this class.
EGS_BaseGeometry * g
The simulation geometry.