Source code¶
This section contains a basic overview of the GPos source code to help you understand it and adapt it to your scientific case.
Labels and units¶
GPos code and documentation language follows the Geant4 concepts of:
World - volume of the virtual simulation (G4_Galactic to represent vacuum)
Primary - particle that is sent to interact with the target
Foil - solid target used to induce primary-atom/nucleous interactions
Run - contains all the events modelled
Event - starts when a primary particle with given (mass, charge, momentum, position) properties is shot and terminates when resulting particles decay or leave the world
Track - snapshot of particle properties (data is accessed in MyUserSteppingAction)
Step - start/end information for each interaction between primary and/or secondary particles and/or foil atoms
Cut-off - hard-coded cut-off of foil_thickness/10 corresponding to minimum stopping length of particles after which they don’t generate radiation (energy loss becomes continuous)
QGSP_BERT - Physics list that contains information to model (at rest/continuous/discrete) physical processes (including Bremsstrahlung).
By convention all classes/functions that begin with “G4” are inherited from the Geant4 library. The classes and functions created for GPos can be found in the GPos repo src and include folders and are detailed in the Doxygen documentation.
Note
The system of units of Geant4 is described in the table, the link and the header file.
For more information on the Geant4 related libraries and classes please visit the documentation and tutorials.
Structure¶
The GPos srouce code architecture is detailed (including standard class/collaboration diagrams) in the Doxygen documentation.
For a simpler overview of the code structure, the diagram bellow describes the key logic steps (as well as associated functions and classes) employed:
Selection¶
GPos stores particles final track information if (according to user-defined values specified in input.txt):
particle species is in s_list
particle did not decay / reached cut-off (explained in list below)
particle did not leave the world space transversely
particle energy is above species encutoff
particle longitudinal momentum is above species pzcutoff