BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Control over the beginning and end of run actions. More...
#include <BDSRunAction.hh>
Public Member Functions | |
BDSRunAction (BDSOutput *outputIn, BDSBunch *bunchGeneratorIn, G4bool usingIonsIn, BDSEventAction *eventActionIn, const G4String &trajectorySamplerIDIn) | |
virtual void | BeginOfRunAction (const G4Run *) |
virtual void | EndOfRunAction (const G4Run *) |
Private Member Functions | |
void | PrintAllProcessesForAllParticles () const |
void | SetTrajectorySamplerIDs () const |
void | CheckTrajectoryOptions () const |
Private Attributes | |
BDSOutput * | output |
Cache of output instance. Not owned by this class. | |
time_t | starttime |
std::string | seedStateAtStart |
Seed state at start of the run. | |
BDSEventInfo * | info |
BDSBunch * | bunchGenerator |
Cache of bunch generator. | |
const G4bool | usingIons |
Cache of whether ions are being used (for particle table writing out). | |
std::clock_t | cpuStartTime |
Start time of run. | |
BDSEventAction * | eventAction |
Event action for updating information at start of run. | |
G4String | trajectorySamplerID |
Copy of option. | |
unsigned long long int | nEventsRequested |
Cache of ngenerate. | |
Control over the beginning and end of run actions.
Unlike the regular Geant4 run action we call a beginning of run action on the bunch distribution (when we know the number of events to run).
Definition at line 43 of file BDSRunAction.hh.
BDSRunAction::BDSRunAction | ( | BDSOutput * | outputIn, |
BDSBunch * | bunchGeneratorIn, | ||
G4bool | usingIonsIn, | ||
BDSEventAction * | eventActionIn, | ||
const G4String & | trajectorySamplerIDIn | ||
) |
Definition at line 60 of file BDSRunAction.cc.
|
virtual |
Definition at line 76 of file BDSRunAction.cc.
|
virtual |
Definition at line 81 of file BDSRunAction.cc.
|
private |
Check whether various trajectory options that are geometry dependent make sense and warn if not. Done now because geometry is built before run.
Definition at line 234 of file BDSRunAction.cc.
References BDSAcceleratorModel::BeamlineMain(), BDSBeamline::GetTotalArcLength(), and BDSGlobalConstants::Instance().
|
virtual |
Definition at line 138 of file BDSRunAction.cc.
|
private |
Iterate over all particles and print out all process names for each. This is private as using at the wrong time will result in Geant4 crashing.
Definition at line 183 of file BDSRunAction.cc.
|
private |
Access the sampler registry and find the integer sampler IDs for any samplers named in the trajectorySamplerID string. Do this at the beginning of a run and update event action because it should only happen once and it depends on the construction of the geometry being complete.
Definition at line 204 of file BDSRunAction.cc.
References eventAction, BDSSamplerRegistry::Instance(), BDSEventAction::SetSamplerIDsForTrajectories(), and trajectorySamplerID.
|
private |
Cache of bunch generator.
Definition at line 77 of file BDSRunAction.hh.
|
private |
Start time of run.
Definition at line 79 of file BDSRunAction.hh.
|
private |
Event action for updating information at start of run.
Definition at line 80 of file BDSRunAction.hh.
Referenced by SetTrajectorySamplerIDs().
|
private |
Definition at line 76 of file BDSRunAction.hh.
|
private |
Cache of ngenerate.
Definition at line 82 of file BDSRunAction.hh.
|
private |
Cache of output instance. Not owned by this class.
Definition at line 73 of file BDSRunAction.hh.
|
private |
Seed state at start of the run.
Definition at line 75 of file BDSRunAction.hh.
|
private |
Definition at line 74 of file BDSRunAction.hh.
|
private |
Copy of option.
Definition at line 81 of file BDSRunAction.hh.
Referenced by SetTrajectorySamplerIDs().
|
private |
Cache of whether ions are being used (for particle table writing out).
Definition at line 78 of file BDSRunAction.hh.