Introduction to GEANT4

From UCL HEP PBT Wiki

Jump to: navigation, search
m
m
Line 33: Line 33:
The function <span style="color:#ff0000"> main() </span> defines the skeleton of your simulation code. Inside the function you instantiate <span style="color:#ff0000"> G4RunManager </span> and notify it of your mandatory and optional classes. This is example <span style="color:#ff0000"> main() </span> function, where <span style="color:#ff0000"> MyDetectorConstruction </span>, <span style="color:#ff0000"> MyPhysicsList </span>, <span style="color:#ff0000"> MyPrimaryGeneratorAction </span>, <span style="color:#ff0000"> MyEventAction </span> and <span style="color:#ff0000"> MyRunAction </span> are derived classes from the GEANT4 base classes:
The function <span style="color:#ff0000"> main() </span> defines the skeleton of your simulation code. Inside the function you instantiate <span style="color:#ff0000"> G4RunManager </span> and notify it of your mandatory and optional classes. This is example <span style="color:#ff0000"> main() </span> function, where <span style="color:#ff0000"> MyDetectorConstruction </span>, <span style="color:#ff0000"> MyPhysicsList </span>, <span style="color:#ff0000"> MyPrimaryGeneratorAction </span>, <span style="color:#ff0000"> MyEventAction </span> and <span style="color:#ff0000"> MyRunAction </span> are derived classes from the GEANT4 base classes:
-
<span style="color:#800000"> { </span>
+
<span style="color:#800000"> int main() { </span>
-
 
+
 
-
<span style="color:#800000"> ... </span>
+
-
 
+
<span style="color:#800000"> // Run manager construction </span>  
<span style="color:#800000"> // Run manager construction </span>  
Line 445: Line 443:
<span style="color:#800000"> private: </span>
<span style="color:#800000"> private: </span>
-
<span style="color:#800000"> static const G4String fgkDefaultParticleName; </span>
+
<span style="color:#800000"> static const G4String ParticleName; </span>
-
<span style="color:#800000"> static const G4double fgkDefaultEnergy; </span>
+
<span style="color:#800000"> static const G4double ParticleEnergy; </span>
<span style="color:#800000"> G4GeneralParticleSource*  fGeneralParticleSource; }; </span>
<span style="color:#800000"> G4GeneralParticleSource*  fGeneralParticleSource; }; </span>

Revision as of 12:31, 8 July 2014

Personal tools