Abstract base class for primary generators. More...
#include <RMGVGenerator.hh>

Public Member Functions | |
| RMGVGenerator (std::string name) | |
| RMGVGenerator (RMGVGenerator const &)=delete | |
| RMGVGenerator & | operator= (RMGVGenerator const &)=delete |
| RMGVGenerator (RMGVGenerator &&)=delete | |
| RMGVGenerator & | operator= (RMGVGenerator &&)=delete |
| virtual void | BeginOfRunAction (const G4Run *) |
| Called at the beginning of a run. | |
| virtual void | EndOfRunAction (const G4Run *) |
| Called at the end of a run. | |
| virtual void | SetParticlePosition (G4ThreeVector vec)=0 |
| Set the primary vertex position. | |
| virtual void | GeneratePrimaries (G4Event *event)=0 |
| Generate primary particles for an event. | |
| void | SetReportingFrequency (int freq) |
| std::string | GetGeneratorName () |
Protected Attributes | |
| std::string | fGeneratorName |
| std::unique_ptr< G4UImessenger > | fMessenger |
| int | fReportingFrequency = 1000 |
Abstract base class for primary generators.
This class defines the interface for generators that create the primary particle(s) and set their vertex position(s) for a simulation event.
|
inlinevirtual |
Called at the beginning of a run.
Derived generators can perform any necessary initialization in this method.
Reimplemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.
|
inlinevirtual |
Called at the end of a run.
Derived generators can perform any necessary finalization in this method.
Reimplemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.
|
pure virtual |
Generate primary particles for an event.
Derived generators must implement this method to create primary particles and add them to the given G4Event.
| event | Pointer to the G4Event. |
Implemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorG4Gun, RMGGeneratorGPS, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.
|
pure virtual |
Set the primary vertex position.
This pure virtual method must be implemented by derived classes to set the primary vertex position for the generator.
| vec | The desired primary vertex position. |
Implemented in RMGGeneratorCosmicMuons, RMGGeneratorDecay0, RMGGeneratorFromFile, RMGGeneratorG4Gun, RMGGeneratorGPS, RMGGeneratorMUSUNCosmicMuons, and RMGGeomBench.