EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
egs_base_geometry.h
Go to the documentation of this file.
1 /*
2 ###############################################################################
3 #
4 # EGSnrc egs++ base geometry headers
5 # Copyright (C) 2015 National Research Council Canada
6 #
7 # This file is part of EGSnrc.
8 #
9 # EGSnrc is free software: you can redistribute it and/or modify it under
10 # the terms of the GNU Affero General Public License as published by the
11 # Free Software Foundation, either version 3 of the License, or (at your
12 # option) any later version.
13 #
14 # EGSnrc is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
17 # more details.
18 #
19 # You should have received a copy of the GNU Affero General Public License
20 # along with EGSnrc. If not, see <http://www.gnu.org/licenses/>.
21 #
22 ###############################################################################
23 #
24 # Author: Iwan Kawrakow, 2005
25 #
26 # Contributors: Frederic Tessier
27 # Blake Walters
28 # Marc Chamberland
29 # Reid Townson
30 # Ernesto Mainegra-Hing
31 # Hugo Bouchard
32 # Martin Martinov
33 # Alexandre Demelo
34 #
35 ###############################################################################
36 */
37 
38 
44 #ifndef EGS_BASE_GEOMETRY_
45 #define EGS_BASE_GEOMETRY_
46 
47 #include "egs_vector.h"
48 #include "egs_rndm.h"
49 #include "egs_input_struct.h"
50 
51 #include <string>
52 #include <vector>
53 #include <iostream>
54 #include <memory>
55 
56 using std::string;
57 using std::vector;
58 
59 class EGS_Application; // forward declaration
60 class EGS_Input;
62 
63 #ifdef BPROPERTY64
64  typedef EGS_I64 EGS_BPType;
65 #elif defined BPROPERTY32
66  typedef unsigned int EGS_BPType;
67 #elif defined BPROPERTY16
68  typedef unsigned short EGS_BPType;
69 #else
70  typedef unsigned char EGS_BPType;
71 #endif
72 
73 class EGS_Label {
74 public:
75  string name;
76  vector<int> regions;
77 };
78 
79 static shared_ptr<EGS_BlockInput> geomBlockInput = make_shared<EGS_BlockInput>("geometry");
80 inline void setBaseGeometryInputs(bool includeMediaBlock = true) {
81  geomBlockInput->addSingleInput("library", true, "The type of geometry, loaded by shared library in egs++/dso.");
82  geomBlockInput->addSingleInput("name", true, "The user-declared unique name of this geometry. This is the name you may refer to elsewhere in the input file");
83  geomBlockInput->addSingleInput("set label", false, "A name for the label, followed by a list of local region numbers (found by viewing only this geometry). Then use the label name elsewhere in the input file to refer to those regions. E.g. 'set label = myLabel 0 1'");
84 
85  if (includeMediaBlock) {
86  shared_ptr<EGS_BlockInput> mediaBlock = geomBlockInput->addBlockInput("media input");
87  mediaBlock->addSingleInput("media", true, "A list of media that are used in this geometry");
88  mediaBlock->addSingleInput("set medium", false, "2, 3 or 4 integers defining the medium for a region or range of regions.\nFor 2: region #, medium index from the media list for this geometry (starts at 0). For 3: start region, stop region, medium index. For 4: Same as 3, plus a step size for the region range.\nNeglect this input for a homogeneous geometry of the first medium in the media list. Repeat this input to specify each medium.");
89  }
90 }
91 
112 
113 public:
114 
120  EGS_BaseGeometry(const string &Name);
121 
127  virtual ~EGS_BaseGeometry();
128 
142  inline bool isConvex() const {
143  return is_convex;
144  };
145 
151  virtual int inside(const EGS_Vector &x) = 0;
152 
159  virtual bool isInside(const EGS_Vector &x) = 0;
160 
168  virtual int isWhere(const EGS_Vector &x) = 0;
169 
170  /* getNextGeom is the equivalent of getNextParticle but for the simulation
171  * object. Its goal is to determine the next state of the geometry, either
172  * by synchronizing itself to the source time parameter, or by sampling its
173  * own time parameter and updating itself accordingly if the source has
174  * provided no time index.
175  *
176  * This function has a non-empty implementation in 2 cases.
177  *
178  * 1) it is reimplemented in any composite geometry, where it will call next
179  * geom on all of its components
180  *
181  * 2) it is reimplemented in the dynamic geometry class. This is where the
182  * code will find the current (non static) state of the geometry. */
183  virtual void getNextGeom(EGS_RandomGenerator *rndm) {
184  (void)rndm;
185  };
186 
195  static int findRegion(EGS_Float xp, int np, const EGS_Float *p) {
196  int ml = 0, mu = np;
197  while (mu - ml > 1) {
198  int mav = (ml+mu)/2;
199  if (xp <= p[mav]) {
200  mu = mav;
201  }
202  else {
203  ml = mav;
204  }
205  }
206  return mu - 1;
207  };
208 
239  virtual int howfar(int ireg, const EGS_Vector &x, const EGS_Vector &u,
240  EGS_Float &t, int *newmed=0, EGS_Vector *normal=0) = 0;
241 
254  virtual EGS_Float howfarToOutside(int ireg, const EGS_Vector &x,
255  const EGS_Vector &u);
256 
267  virtual EGS_Float hownear(int ireg, const EGS_Vector &x) = 0;
268 
274  virtual EGS_Float getVolume(int ireg) {
275  (void)ireg;
276  return 1.0;
277  }
278 
284  virtual EGS_Float getBound(int idir, int ind) {
285  (void)idir;
286  (void)ind;
287  return 0.0;
288  }
289 
295  virtual int getNRegDir(int idir) {
296  (void)idir;
297  return 0;
298  }
299 
306  int regions() const {
307  return nreg;
308  };
309 
317  virtual bool isRealRegion(int ireg) const {
318  return (ireg >= 0 && ireg < nreg);
319  };
320 
327  virtual int medium(int ireg) const {
328  return region_media ? region_media[ireg] : med;
329  };
330 
336  virtual int getMaxStep() const {
337  return nreg+1;
338  };
339 
352  virtual int computeIntersections(int ireg, int n, const EGS_Vector &x,
353  const EGS_Vector &u, EGS_GeometryIntersections *isections);
354 
364  void setMedium(const string &Name);
365 
373  void setMedium(int start, int end, const string &Name, int delta=1);
374 
379  void setMedium(int imed) {
380  med = imed;
381  };
382 
390  void setMedium(int istart, int iend, int imed, int delta=1);
391 
402  void setMedia(EGS_Input *inp);
403 
411  static int nMedia();
412 
418  static const char *getMediumName(int ind);
419 
428  static int addMedium(const string &medname);
429 
435  static int getMediumIndex(const string &medname);
436 
440  virtual bool hasRhoScaling() {
441  return has_rho_scaling;
442  };
443 
447  virtual EGS_Float getRelativeRho(int ireg) const {
448  return rhor && ireg >= 0 && ireg < nreg ? rhor[ireg] : 1;
449  };
450 
456  virtual void setRelativeRho(int start, int end, EGS_Float rho);
457 
467  virtual void setRelativeRho(EGS_Input *);
468 
469  EGS_Float getMediumRho(int ind) const;
470 
471  virtual void setApplication(EGS_Application *app);
472 
475  inline bool hasBScaling() const {
476  return (has_B_scaling || has_Ref_rho);
477  };
478 
481  virtual EGS_Float getBScaling(int ireg) const {
482  if (has_Ref_rho && has_B_scaling) {
483  if (bfactor && ireg >= 0 && ireg < nreg) {
484  return getMediumRho(medium(ireg))/rhoRef*bfactor[ireg];
485  }
486  else {
487  return 1.0;
488  }
489  }
490  else if (has_Ref_rho && !has_B_scaling) {
491  if (ireg >= 0 && ireg < nreg) {
492  return getMediumRho(medium(ireg))/rhoRef;
493  }
494  else {
495  return 1.0;
496  }
497  }
498  else if (!has_Ref_rho && has_B_scaling) {
499  if (bfactor && ireg >= 0 && ireg < nreg) {
500  return bfactor[ireg];
501 
502  }
503  else {
504  return 1.0;
505  }
506  }
507  else {
508  return 1.0;
509  }
510  }
511 
517  virtual void setBScaling(int start, int end, EGS_Float bf);
518 
528  virtual void setBScaling(EGS_Input *);
529 
535  const string &getName() const {
536  return name;
537  };
538 
545  virtual const string &getType() const = 0;
546 
566 
583  static EGS_BaseGeometry *createSingleGeometry(EGS_Input *inp);
584 
592  static void clearGeometries();
593 
599  void setDebug(bool deb) {
600  debug = deb;
601  };
602 
609  static EGS_BaseGeometry *getGeometry(const string &Name);
610 
611  static EGS_BaseGeometry **getGeometries();
612 
613  static int getNGeometries();
614 
621  static string getUniqueName();
622 
631  void setName(EGS_Input *inp);
632 
641  void setBoundaryTolerance(EGS_Input *inp);
642 
645  void setBoundaryTolerance(EGS_Float tol) {
646  boundaryTolerance = tol;
647  halfBoundaryTolerance = tol/2.;
648  }
649 
652  virtual bool hasBooleanProperty(int ireg, EGS_BPType prop) const {
653  if (!bp_array) {
654  return (prop & bproperty);
655  }
656  return ireg >= 0 && ireg < nreg ? prop & bp_array[ireg] : false;
657  };
658 
664  virtual void setBooleanProperty(EGS_BPType prop);
665 
673  virtual void addBooleanProperty(int bit);
674 
681  virtual void setBooleanProperty(EGS_BPType prop, int start, int end,
682  int step=1);
683 
690  virtual void addBooleanProperty(int bit, int start, int end, int step=1);
691 
702  virtual void printInfo() const;
703 
709  static void describeGeometries();
710 
717  inline int ref() {
718  return ++nref;
719  };
720 
721 
729  inline int deref() {
730  return --nref;
731  };
732 
736  static void setActiveGeometryList(int list);
737 
738  static int getLastError() {
739  return error_flag;
740  };
741 
742  static void resetErrorFlag() {
743  error_flag = 0;
744  };
745 
747  EGS_Float getBoundaryTolerance() {
748  return boundaryTolerance;
749  };
750 
752  virtual int getGlobalRegionOffset(const string geomName);
753 
755  virtual void getNumberRegions(const string &str, vector<int> &regs);
756 
758  virtual void getLabelRegions(const string &str, vector<int> &regs, bool sanitize=true);
759 
761  virtual const string &getLabelName(const int i) {
762  return labels[i].name;
763  }
764 
766  virtual int getLabelCount() {
767  return labels.size();
768  }
769 
771  int setLabels(EGS_Input *input);
772 
774  int setLabels(const string &inp);
775 
776  virtual void updatePosition(EGS_Float time) {
777  (void)time;
778  };
779 
804  bool validateRegions(const std::vector<int> &regions);
805 
806  virtual void finishInitialization() { };
807 
808  /* This method is essentially used to determine whether the simulation
809  * geometry contains a dynamic geometry. Like getNextGeom(), the only
810  * non-empty implementations of this function are in composite geometries
811  * (where it simply calls containsDynamic on its components), and in the
812  * dynamic geometry, where it will update the boolean reference to true and
813  * call on its base geometry. This function was conceived to be used in the
814  * view/viewcontrol (to determine whether time index objects are visible or
815  * hidden), and track scoring */
816  virtual void containsDynamic(bool &hasdynamic) {
817  (void)hasdynamic;
818  };
819 
820 protected:
821 
827  int nreg;
828 
834  string name;
835 
842  short *region_media;
843 
850  int med;
851 
852 
857 
861  EGS_Float *rhor;
862 
866  bool has_B_scaling, has_Ref_rho;
867 
871  EGS_Float *bfactor;
872 
876  EGS_Float rhoRef;
877 
882  int nref;
883 
892  virtual void setMedia(EGS_Input *inp, int nmed, const int *med_ind);
893 
898  bool debug;
899 
908  bool is_convex;
909 
914  EGS_BPType bproperty;
915 
921  EGS_BPType *bp_array;
922 
924  EGS_Float boundaryTolerance, halfBoundaryTolerance;
925 
927  static int error_flag;
928 
944  vector<EGS_Label> labels;
945 
948 
949 private:
950 
960  static int active_glist;
961 
962 };
963 
965  EGS_Float t;
966  EGS_Float rhof;
967  EGS_I32 ireg;
968  EGS_I32 imed;
969 };
970 
1216 /* \example geometry/example1/geometry_example1.cpp
1217 
1218  Suppose that you frequently use the same complex geometry and you
1219  are tired of always having to include the long definition of this geometry
1220  into your input file. In this case it may be worthwhile to implement your
1221  own geometry DSO that constructs the geometry of interest with very little
1222  input (or even no input at all). This example illustrates how to do this
1223  programatically.
1224 
1225  As this is just an example, the geometry we will be constructing is not very
1226  complex: it consists of a cylinder inscribed in a sphere and the sphere
1227  inscribed in a box as shown in the figure ???. We want to be able to define
1228  the media of the cylinder, the sphere and the box in the input file
1229  (so that we can easily use different PEGS data sets, for example). All other
1230  dimensions of our example geometry are fixed.
1231 
1232  To create our new geometry, we make a new subdirectory in the egspp
1233  geometries subdirectory called \c example1. To be able to use the
1234  predefined rules for building geometry libraries we create a dummy
1235  header file \c %geometry_example1.h that does nothing else except to
1236  define the \c EGS_EXAMPLE1_DLL
1237  macro:
1238  \include geometry/example1/geometry_example1.h
1239  and put the implementation in \c %geometry_example1.cpp.
1240  \dontinclude geometry/example1/geometry_example1.cpp
1241  In this file we include the just created header file and the EGS_Input
1242  class header file to get access to its definition,
1243  needed in the \c %createGeometry() function (see below):
1244  \until egs_input
1245  We also need the declarations of the various geometry classes that we
1246  will use to construct our geometry:
1247  \until egs_envelope_geometry.h
1248  We then define the dimensions of the various geometrical structures
1249  \until box_size
1250 
1251  The remaining task is to implement a C-style \c %createGeometry() function
1252  exported by the DSO
1253  \until EGS_EXAMPLE1_EXPORT
1254  We check that the input object is valid and return \c null if it is not
1255  \until }
1256  We then look for a definition of the cylinder medium and print a warning if
1257  such a definition is missing:
1258  \skipline cyl_medium
1259  \until }
1260  We repeat basically the same code to obtain the sphere and the box
1261  media
1262  \until }
1263  \until }
1264  and return \c null if any of the media definition was missing:
1265  \until if
1266  Now we are ready to construct our geometry. We first create a set of
1267  parallel z-planes
1268  \until EGS_ZProjector
1269  As the planes will only be used by our geometry object internally, we don't
1270  care how the plane set is named and therefore give it a name using
1271  the static function EGS_BaseGeometry::getUniqueName().
1272  In a similar way we create a set of z-cylinders consisting of a single
1273  cylinder
1274  \until ZProjector
1275  and make a closed cylinder modeled as a 2D-geometry from the planes and the
1276  cylinder surface:
1277  \until getUniqueName
1278  We then set the medium of the cylinder
1279  \until setMedium
1280  The next step is to create the sphere as a set of spheres consisting of
1281  a single sphere
1282  \until getUniqueName
1283  and to fill it with the sphere medium defined in the input
1284  \until setMedium
1285  We then use an envelope geometry to inscribe the cylinder into the just
1286  created sphere:
1287  \until getUniqueName
1288  The next step is to create the outer box and fill it with the box medium
1289  defined in the input
1290  \until setMedium
1291  (as our geometry will always be centered about the origin, we pass a
1292  \c null affine transformation to the constructor of the box).
1293  We now inscribe the \c the_sphere geometry object (which is the sphere
1294  with the cylinder inscribed in it) into the just created box using
1295  again an envelope geometry,
1296  \until the_box
1297  set the name of \c the_box from the input using the inherited
1298  \link EGS_BaseGeometry::setName(EGS_Input*) setName() \endlink method,
1299  \until setName
1300  and return a pointer to the just created geometry
1301  \until }
1302  \until }
1303  That's all.
1304 
1305  In the Makefile we include the egspp make config files,
1306  \dontinclude geometry/example1/Makefile
1307  \skipline EGS_CONFIG
1308  \until my_machine
1309  set the C-preprocessor defines to the standard set of defines
1310  for our egspp configuration,
1311  \until DEFS
1312  define the name of our DSO,
1313  \until library
1314  and and the set of files needed to build the DSO
1315  \until lib_files
1316  Because we are using planes, cylinders, spheres, a ND-geometry, a box
1317  geometry and an envelope geometry to construct our geometry, we must
1318  link against the geometry libraries containing these geometries.
1319  We accomplish this by seting the \c link2_libs make variable to the
1320  list of needed libraries
1321  \until egs_genvelope
1322  We then include the standard rules for building a DSO
1323  \until include
1324  and set the dependencies of our object files
1325  \until make_depend
1326  We must also add the dependencies on the various geometry header files
1327  that we are including
1328  \until egs_envelope_geometry.h
1329  We can now build our geometry DSO by typing \c make and use
1330  it by including input like this in the input file
1331  \verbatim
1332  :start geometry:
1333  library = geometry_example1
1334  name = some_name
1335  cylinder medium = H2O521ICRU
1336  sphere medium = AL521ICRU
1337  box medium = AIR521ICRU
1338  :stop geometry:
1339  \endverbatim
1340  It is worth noting that we could have constructed this geometry as the
1341  \link EGS_UnionGeometry union \endlink of the cylinder pointed to
1342  by \c the_cyl, the sphere pointed to by \c sphere and the
1343  box pointed to by \c box. However, such an implementation would be
1344  much slower at run time because for each invocation of a geometry
1345  method the union will have to interogate the geometry methods of all
1346  3 objects. In contrast, the envelope geometry will be checking only
1347  against the box for points outside of the box, the box and the sphere for
1348  points inside the box but outside the sphere, the sphere and the cylinder
1349  for points inside the sphere but outside the cylinder and the cylinder
1350  only for points inside the cylinder.
1351 
1352  The complete source code of this example geometry is below
1353  \include geometry/example1/Makefile
1354  \include geometry/example1/geometry_example1.h
1355 
1356 */
1357 
1358 /* \example geometry/example2/geometry_example2.cpp
1359 
1360  This example illustrates how to create the same geometry as
1361  described in
1362  <a href="geometry_2example1_2geometry__example1_8cpp-example.html">
1363  this example</a> but using EGS_BaseGeometry::createSingleGeometry
1364  to create the geometry from definitions stored in an EGS_Input objects.
1365  The header file is similar as in the previous
1366  <a href="geometry_2example1_2geometry__example1_8cpp-example.html">
1367  example</a>, but unlike in the previous example we don't need the
1368  header files of the various geometries being used.
1369  Our implementation consists of a single C-style function
1370  \c %createGeometry()
1371  \dontinclude geometry/example2/geometry_example2.cpp
1372  \skipline createGeometry
1373  As with the previous
1374  <a href="geometry_2example1_2geometry__example1_8cpp-example.html">
1375  example</a>, we check for valid input and extract the
1376  media of the cylinder, sphere and the box from the input
1377  \until !ok
1378  We will create the various geometry objects needed in our composite
1379  geometry by passing EGS_Input objects containing geometry definitions
1380  to the EGS_BaseGeometry::createSingleGeometry function.
1381  We start with the set of planes needed to close the cylinder.
1382  We first create an EGS_Input object named \c geometry that we will
1383  be passing to the geometry creation function:
1384  \until plane_input
1385  We then create properties for the library name,
1386  \until plane_library
1387  the plane-set type,
1388  \until plane_type
1389  the name of the set of planes,
1390  \until plane_name
1391  and the plane positions
1392  \until plane_positions
1393  and add them to the geometry definition
1394  \until plane_positions
1395  We then create the set of planes
1396  \until createSingleGeometry
1397  The definition and creation of the set of cylinders is very similar
1398  \until createSingleGeometry
1399  We now make a closed cylinder as a 2D geometry
1400  \until createSingleGeometry
1401  and set its medium
1402  \until setMedium
1403  In a similar fashion we create the sphere, use an envelope geometry
1404  to inscribe the cylinder into the sphere, create a box, and use again
1405  an envelope to inscribe the sphere into the box. The code is not shown
1406  here as it is lengthy and boring but can be found at the end of this page.
1407  Finally we set the name of the newly created geometry \c the_box and
1408  return it:
1409  \skipline the_box->setName
1410  \until }
1411  \until }
1412 
1413  The Makefile is now simpler as we don't need to link against the
1414  various geometry DSOs as they are loaded dynamically at run time
1415  by the EGS_BaseGeometry::createSingleGeometry function and
1416  our implementation also does not depend on the header files of the
1417  various geometry classes being used:
1418  \include geometry/example2/Makefile
1419 
1420  For completeness here is the header file:
1421  \include geometry/example2/geometry_example2.h
1422  and the complete implementation:
1423 */
1424 
1425 
1426 #endif
Base class for advanced EGSnrc C++ applications.
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
virtual int getLabelCount()
Get the number of explicit labels in the geometry.
virtual EGS_Float hownear(int ireg, const EGS_Vector &x)=0
Calculate the distance to a boundary for position x in any direction.
virtual int inside(const EGS_Vector &x)=0
Returns the region index, if inside, or -1 if outside (obsolete)
int deref()
Decrease the reference count to this geometry.
virtual bool hasBooleanProperty(int ireg, EGS_BPType prop) const
Is the boolean property prop set for region ireg ?
EGS_BPType bproperty
A bit mask of boolean properties for the entire geometry.
bool debug
Debugging flag.
virtual EGS_Float getBScaling(int ireg) const
Get the B field scaling factor in region ireg.
virtual const string & getType() const =0
Get the geometry type.
static int findRegion(EGS_Float xp, int np, const EGS_Float *p)
Find the bin to which xp belongs, given np bin edges p.
int nreg
Number of local regions in this geometry.
virtual int howfar(int ireg, const EGS_Vector &x, const EGS_Vector &u, EGS_Float &t, int *newmed=0, EGS_Vector *normal=0)=0
Calculate the distance to a boundary from x along the direction u.
bool has_B_scaling
Does this geometry has B field scaling factor?
int nref
Number of references to this geometry.
bool is_convex
Is this geometry convex?
bool has_rho_scaling
Does this geometry have relative mass density scvaling?
virtual EGS_Float getVolume(int ireg)
Calculates the volume of region ireg.
void setDebug(bool deb)
Turn debugging on.
EGS_Float boundaryTolerance
Boundary tolerance for geometries that need it.
bool hasBScaling() const
Does this geometry object have a B field scaling feature?
short * region_media
Array of media indeces.
virtual bool hasRhoScaling()
Does this geometry object have a mass density scaling feature?
virtual bool isRealRegion(int ireg) const
Returnes true if ireg is a real region, false otherwise.
virtual bool isInside(const EGS_Vector &x)=0
Is the position x inside the geometry?
const string & getName() const
Get the name of this geometry.
void setBoundaryTolerance(EGS_Float tol)
Set the value of the boundary tolerance from argument.
EGS_Float * rhor
Array with relative mass densities.
virtual EGS_Float getRelativeRho(int ireg) const
Get the relative mass density in region ireg.
EGS_Float * bfactor
Array with B field scaling factors.
bool isConvex() const
Is the geometry convex?
virtual const string & getLabelName(const int i)
Get the name of the i-th explicit label in the geometry.
int med
Medium index.
virtual int getNRegDir(int idir)
virtual int getMaxStep() const
Returns the maximum number of steps through the geometry.
EGS_Application * app
The application this object belongs to.
void setMedium(int imed)
Set all regions to a medium with index imed.
virtual int medium(int ireg) const
Returns the medium index in region ireg.
static int error_flag
Set to non-zero status if a geometry problem is encountered.
string name
Name of this geometry.
int regions() const
Returns the number of local regions in this geometry.
virtual EGS_Float getBound(int idir, int ind)
Returns region boundaries in direction determined by idir.
EGS_Float getBoundaryTolerance()
Get the value of the boundary tolerance.
int ref()
Increase the reference count to this geometry.
EGS_Float rhoRef
Reference density for B field scaling.
vector< EGS_Label > labels
Labels.
virtual int isWhere(const EGS_Vector &x)=0
In which region is poisition x?
EGS_BPType * bp_array
An array of boolean properties on a region by region basis.
A class for storing information in a tree-like structure of key-value pairs. This class is used throu...
Definition: egs_input.h:182
Base random number generator class. All random number generators should be derived from this class.
Definition: egs_rndm.h:90
A class representing 3D vectors.
Definition: egs_vector.h:57
EGS_GLIB_EXPORT EGS_BaseGeometry * createGeometry(EGS_Input *input)
Definition: egs_glib.cpp:84
The input struct header file.
#define EGS_EXPORT
Export symbols from the egspp library.
Definition: egs_libconfig.h:90
EGS_RandomGenerator class header file.
EGS_Vector methods for the manipulation of 3D vectors in cartesian co-ordinates.
EGS_I32 ireg
region index
EGS_Float t
distance to next region boundary
EGS_Float rhof
relative mass density in that region
EGS_I32 imed
medium index