LDMX Software
|
Implementation of Geant4 primary generator action. More...
#include <PrimaryGeneratorAction.h>
Public Member Functions | |
PrimaryGeneratorAction (const framework::config::Parameters ¶meters) | |
virtual | ~PrimaryGeneratorAction ()=default |
Class destructor. | |
void | GeneratePrimaries (G4Event *event) override |
Generate primaries for the event. | |
Private Attributes | |
bool | useBeamspot_ {false} |
Flag denoting whether the vertex position of a particle should be smeared. | |
double | beamspotXSize_ {0} |
Extent of the beamspot in x. | |
double | beamspotYSize_ {0} |
Extent of the beamspot in y. | |
double | beamspotZSize_ {0.} |
Extent of the beamspot in y. | |
bool | time_shift_primaries_ {true} |
Should we time-shift so that the primary vertices arrive (or originate) at t=0ns at z=0mm? | |
Implementation of Geant4 primary generator action.
Definition at line 35 of file PrimaryGeneratorAction.h.
simcore::g4user::PrimaryGeneratorAction::PrimaryGeneratorAction | ( | const framework::config::Parameters & | parameters | ) |
Definition at line 29 of file PrimaryGeneratorAction.cxx.
|
override |
Generate primaries for the event.
This is called by the RunManager before being given to the EventManager to process. This means we must create the UserEventInformation here so that it is accessible for including the weights imported by the primary generators.
Set UserInformation for primary vertices if they haven't been set before.
Some features downstream of the primaries require certain user info to function properly. This ensures that it happens.
Makes sure that each particle on each primary vertex has
If we are passed configuration to smear the beam spot, we smear the beam spot around the spot generated by the primary generator.
If we are configured to time-shift the primaries, we shift them so that t=0 coincides with primaries arriving at (or coming from) the target.
event | The Geant4 event. |
Definition at line 59 of file PrimaryGeneratorAction.cxx.
References simcore::UserPrimaryParticleInformation::getHepEvtStatus().
|
private |
|
private |
|
private |
|
private |
Should we time-shift so that the primary vertices arrive (or originate) at t=0ns at z=0mm?
Definition at line 105 of file PrimaryGeneratorAction.h.
|
private |
Flag denoting whether the vertex position of a particle should be smeared.
Definition at line 88 of file PrimaryGeneratorAction.h.