Monte Carlo LYSO
Geant4 simulation for the LYSO calorimeter prototype
|
Mandatory user action concrete class of G4VUserPrimaryGeneratorAction. It defines the settings for the generation of the primary gamma. More...
#include <generator.hh>
Public Member Functions | |
MyPrimaryGenerator () | |
Constructor of the class. More... | |
~MyPrimaryGenerator () override | |
Destructor of the class. | |
void | GeneratePrimaries (G4Event *anEvent) override |
It generates the primary vertex of the event. More... | |
G4int | GetModeType () const |
Private Member Functions | |
void | PrimariesForStandardMode () |
Generate primaries auxiliary function for Standard mode. | |
void | PrimariesForSpreadBeam () |
Generate primaries auxiliary function for spread beam. | |
void | PrimariesForCircleBeam () |
Generate primaries auxiliary function for circle beam. | |
void | PrimariesForLuDecayMode () |
Generate primaries auxiliary function for Lu decay mode. | |
void | PrimariesForCosmicRaysMode () |
Generate primaries auxiliary function for Cosmic rays mode. | |
void | PrimariesForLEDMode () |
Generate primaries auxiliary function for LED mode. | |
G4double | PDF_E_CosmicRay (G4double energy) |
G4ThreeVector | ProjectOnBottomDetector (G4ThreeVector pos0, G4ThreeVector mom0) |
void | DefineCommands () |
Defines new user commands for primary particle generation. | |
Private Attributes | |
G4ParticleGun * | fParticleGun |
Pointer to the G4ParticleGun object. | |
G4GenericMessenger * | fMessenger_Mode |
Generic messenger for mode selection. | |
G4GenericMessenger * | fMessenger_Gun |
Generic messenger for the standard gamma mode. | |
G4GenericMessenger * | fMessenger_Calib |
Generic messenger for the calibration mode. | |
G4int | fModeType |
Flag indicating the mode type. | |
G4int | fBeamType |
Flag indicating the beam type. | |
G4double | fMeanEnergy |
Mean of the gaussian distribution of the energy of the primary particle. | |
G4double | fSigmaEnergy |
Sigma of the gaussian distribution of the energy of the primary particle. | |
G4double | fRadiusSpread |
Radius of the area on the front face of the crystal that could be hit by primary gamma when spread is enabled. | |
G4double | fRadiusCircle |
Radius of the beam profile in circle type. | |
G4ThreeVector | fPosFixedDecay |
Position of 176Lu isotope for fixed-position mode. | |
G4String | fChooseFrontorBack |
Flag indicating on which face of the crystal a LED has to be switched ON. | |
G4String | fSwitchOnLED |
Flag indicating which LED has to be switched ON. | |
Mandatory user action concrete class of G4VUserPrimaryGeneratorAction. It defines the settings for the generation of the primary gamma.
Definition at line 24 of file generator.hh.
MyPrimaryGenerator::MyPrimaryGenerator | ( | ) |
Constructor of the class.
It defines the UI commands through DefineCommands() and gives default values to the settable variables. Then, it instantiates the G4ParticleGun object, representing the source of one primary gamma.
Definition at line 7 of file generator.cc.
|
override |
It generates the primary vertex of the event.
In standard mode with spread disabled, a gamma particle is generated with energy randomly sampled from a Gaussian distribution with mean fMeanEnergy and stdev fSigmaEnergy, directed towards the center of the front face of the crystal perpendicular to it. If the spread is enabled, the gamma particle may be generated with incident angles that fall within the surface of the radius fRadiusSpread defined on the front face. In calibration mode, the isotropic emission of an optical photon from a monochromatic blue LED (GS::energyLED) situated in one of the light guide's cavities is simulated.
anEvent | Pointer to the G4Event. |
Definition at line 48 of file generator.cc.