|
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. | |
| DECLARE_FACTORY_WITH_WAREHOUSE (PrimaryGenerator, std::shared_ptr< PrimaryGenerator >, const std::string &, const framework::config::Parameters &) | |
| virtual | ~PrimaryGenerator ()=default |
| Destructor. | |
| std::string | name () |
Private Attributes | |
| G4GeneralParticleSource | the_g4_source_ |
| The underlying Geant4 GPS implementation. | |
| std::vector< std::string > | init_commands_ |
| storage of initialization commands (for config recording) | |
Additional Inherited Members | |
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::get(), and init_commands_.
|
overridevirtual |
Generate the primary vertices in the Geant4 event.
| event | The Geant4 event. |
Implements simcore::PrimaryGenerator.
Definition at line 38 of file GeneralParticleSource.cxx.
References the_g4_source_.
|
overridevirtual |
Record the configuration of the primary generator into the run header.
Implements simcore::PrimaryGenerator.
Definition at line 44 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().