Introduction to GEANT4
From UCL HEP PBT Wiki
(Difference between revisions)
IlinaMediaWiki (Talk | contribs)
(Created page with "There are eight base classes. * Three classes are mandatory ; G4VUserDetectorConstruction : Describe the experimental setup, geometry and materials ; G4VUserPhysicsList :...")
Newer edit →
(Created page with "There are eight base classes. * Three classes are mandatory ; G4VUserDetectorConstruction : Describe the experimental setup, geometry and materials ; G4VUserPhysicsList :...")
Newer edit →
Revision as of 10:07, 3 July 2014
There are eight base classes.
- Three classes are mandatory
- G4VUserDetectorConstruction
- Describe the experimental setup, geometry and materials
- G4VUserPhysicsList
- Define particles, physics processes and range cuts
- G4UserPrimaryGeneratorAction
- Describe particle source, source dimensions, initial position, energy spectrum, angular distributions
- The rest are optional
- G4UserRunAction
- Define and store histograms
- G4UserEventAction
- Event selection and analysis of simulation data
- G4UserStackingAction
- Customize priority of tracks
- G4UserTrackingAction
- Decide whether a trajectory should be stored or not
- G4UserSteppingAction
- Kill, suspend, postpone a track
You can create your own classes which are derived from the base classes. All of them should be registered with the G4RunManager. In function main() which is the skeleton of your simulation code you instantiate G4RunManager and notify it of your mandatory and optional classes.