LDMX Software
|
Class that extends the functionality of G4GeneralParticleSource. More...
#include <GeneralParticleSource.h>
Public Member Functions | |
GeneralParticleSource (const std::string &name, const framework::config::Parameters ¶meters) | |
Constructor. | |
virtual | ~GeneralParticleSource ()=default |
Destructor. | |
void | GeneratePrimaryVertex (G4Event *event) override |
Generate the primary vertices in the Geant4 event. | |
void | RecordConfig (const std::string &id, ldmx::RunHeader &rh) override |
Record the configuration of the primary generator into the run header. | |
Public Member Functions inherited from simcore::PrimaryGenerator | |
PrimaryGenerator (const std::string &name, const framework::config::Parameters ¶meters) | |
Constructor. | |
virtual | ~PrimaryGenerator ()=default |
Destructor. | |
Private Attributes | |
G4GeneralParticleSource | theG4Source_ |
The underlying Geant4 GPS implementation. | |
std::vector< std::string > | init_commands_ |
storage of initialization commands (for config recording) | |
Additional Inherited Members | |
Public Types inherited from simcore::PrimaryGenerator | |
using | Factory = ::simcore::Factory< PrimaryGenerator, std::shared_ptr< PrimaryGenerator >, const std::string &, const framework::config::Parameters & > |
Factory for primary generators. | |
Protected Attributes inherited from simcore::PrimaryGenerator | |
std::string | name_ {""} |
Name of the PrimaryGenerator. | |
Class that extends the functionality of G4GeneralParticleSource.
Definition at line 30 of file GeneralParticleSource.h.
simcore::generators::GeneralParticleSource::GeneralParticleSource | ( | const std::string & | name, |
const framework::config::Parameters & | parameters | ||
) |
Constructor.
parameters | Parameters used to configure the particle gun. |
Parameters: initCommands : vector of Geant4 strings to initialize the GPS
Definition at line 23 of file GeneralParticleSource.cxx.
References framework::config::Parameters::getParameter(), and init_commands_.
|
overridevirtual |
Generate the primary vertices in the Geant4 event.
event | The Geant4 event. |
Implements simcore::PrimaryGenerator.
Definition at line 39 of file GeneralParticleSource.cxx.
References theG4Source_.
|
overridevirtual |
Record the configuration of the primary generator into the run header.
Implements simcore::PrimaryGenerator.
Definition at line 45 of file GeneralParticleSource.cxx.
References init_commands_, and ldmx::RunHeader::setStringParameter().
|
private |
storage of initialization commands (for config recording)
Definition at line 64 of file GeneralParticleSource.h.
Referenced by GeneralParticleSource(), and RecordConfig().
|
private |
The underlying Geant4 GPS implementation.
The creation of this class creates a new messenger that we can pass commands to.
Definition at line 61 of file GeneralParticleSource.h.
Referenced by GeneratePrimaryVertex().