LDMX Software
|
Interface that defines a simulation primary generator. More...
#include <PrimaryGenerator.h>
Public Types | |
using | Factory = ::simcore::Factory< PrimaryGenerator, std::shared_ptr< PrimaryGenerator >, const std::string &, const framework::config::Parameters & > |
Factory for primary generators. | |
Public Member Functions | |
PrimaryGenerator (const std::string &name, const framework::config::Parameters ¶meters) | |
Constructor. | |
virtual | ~PrimaryGenerator ()=default |
Destructor. | |
virtual void | GeneratePrimaryVertex (G4Event *)=0 |
Generate a Primary Vertex. | |
virtual void | RecordConfig (const std::string &id, ldmx::RunHeader &rh)=0 |
Record the configuration of the primary generator into the run header. | |
Protected Attributes | |
std::string | name_ {""} |
Name of the PrimaryGenerator. | |
Interface that defines a simulation primary generator.
This class inherits from the Geant4 Primary Genertor template, and is used as a common reference for all of the other PrimaryGenerators.
Definition at line 38 of file PrimaryGenerator.h.
using simcore::PrimaryGenerator::Factory = ::simcore::Factory<PrimaryGenerator, std::shared_ptr<PrimaryGenerator>, const std::string&, const framework::config::Parameters&> |
Factory for primary generators.
Definition at line 49 of file PrimaryGenerator.h.
simcore::PrimaryGenerator::PrimaryGenerator | ( | const std::string & | name, |
const framework::config::Parameters & | parameters | ||
) |
Constructor.
name | Name given the to class instance. |
Definition at line 12 of file PrimaryGenerator.cxx.
|
pure virtual |
Generate a Primary Vertex.
This function must be defined by any other LDMX generators.
Implemented in simcore::generators::LHEPrimaryGenerator, simcore::generators::MultiParticleGunPrimaryGenerator, simcore::generators::GeneralParticleSource, and simcore::generators::ParticleGun.
|
pure virtual |
Record the configuration of the primary generator into the run header.
Implemented in simcore::generators::GeneralParticleSource, simcore::generators::LHEPrimaryGenerator, simcore::generators::MultiParticleGunPrimaryGenerator, and simcore::generators::ParticleGun.
|
protected |
Name of the PrimaryGenerator.
Definition at line 74 of file PrimaryGenerator.h.
Referenced by simcore::generators::MultiParticleGunPrimaryGenerator::MultiParticleGunPrimaryGenerator().