Introduction to GEANT4
From UCL HEP PBT Wiki
m |
m |
||
Line 114: | Line 114: | ||
== Generate primary particles == | == Generate primary particles == | ||
+ | G4VUserPrimaryGeneratorAction is a mandatory user action class to control the generation of primary particles. | ||
+ | The particle generation is done via classes G4ParticleGun and G4GeneralParticleSource. | ||
+ | * <span style="color:#ff0000"> G4ParticleGun </span> is used to simulate a beam of particles. It shoots a primary particle of a certain energy and direction from a given point at a given time. | ||
+ | * <span style="color:#ff0000"> G4GeneralParticleSource </span> the primary vertex is randomly chosen on surface of a given volume with pre-defined energy spectra. | ||
== Optional user classes == | == Optional user classes == |