![]() |
Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
|
Mandatory user class providing the primary particle generator. More...
#include <PrimaryGeneratorMessenger.hh>
Public Member Functions | |
PrimaryGeneratorAction (DetectorConstruction *, RunAction *) | |
Constructor. Sets the particle gun position, energy and direction. | |
void | SetParticle (G4int Z=6, G4int A=17, G4double E=0., G4double Q=0.) |
Obtains pointers to particle and ion tables, and retrieves the particle we want from them. | |
virtual | ~PrimaryGeneratorAction () |
Destructor, destroys the object. | |
void | GeneratePrimaries (G4Event *) |
Randoms the particle gun's position (if desired) and generates an event. | |
void | SetRndmFlag (G4String val) |
If rndmFlag is true, the gun's position is randomized at the beginning of each event. | |
G4ParticleGun * | GetParticleGun () |
Returns the ParticleGun. | |
void | PrintTargetSize () |
Print target size. | |
Private Attributes | |
G4ParticleGun * | particleGun |
Pointer a to the G4ParticleGun class. | |
DetectorConstruction * | Detector |
Pointer to DetectorConstruction. | |
RunAction * | myRunAction |
PrimaryGeneratorMessenger * | gunMessenger |
Messenger for this class. | |
G4String | rndmFlag |
Flag for random gun position. |
Mandatory user class providing the primary particle generator.
Definition at line 42 of file PrimaryGeneratorMessenger.hh.
void PrimaryGeneratorMessenger::PrimaryGeneratorAction::SetParticle | ( | G4int | Z = 6 , |
G4int | A = 17 , |
||
G4double | E = 0. , |
||
G4double | Q = 0. |
||
) |
Obtains pointers to particle and ion tables, and retrieves the particle we want from them.
Z | The atomic number of the particle. |
A | The atomic mass of the particle. |
E | The excitation energy of the particle. |
Q | The charge of the particle. |
Referenced by PrimaryGeneratorMessenger::SetNewValue().