|
LDMX Software
|
Class that extends the functionality of G4ParticleGun. More...
#include <ParticleGun.h>
Public Member Functions | |
| ParticleGun (const std::string &name, const framework::config::Parameters ¶meters) | |
| Constructor. | |
| virtual | ~ParticleGun ()=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 | |
| G4ParticleGun | the_gun_ |
| The actual Geant4 implementation of the ParticleGun. | |
| int | verbosity_ |
| LDMX Verbosity for this generator. | |
Additional Inherited Members | |
Protected Attributes inherited from simcore::PrimaryGenerator | |
| std::string | name_ {""} |
| Name of the PrimaryGenerator. | |
Class that extends the functionality of G4ParticleGun.
Definition at line 30 of file ParticleGun.h.
| simcore::generators::ParticleGun::ParticleGun | ( | const std::string & | name, |
| const framework::config::Parameters & | parameters ) |
Constructor.
| parameters | Parameters used to configure the particle gun. |
Parameters: verbosity: > 1 means print configuration particle : name of particle to shoot (Geant4 naming) energy : energy of particle (GeV) position : position to shoot from (mm three-vector) time : time to shoot at (ns) direction: direction to shoot in (unitless three-vector)
Definition at line 31 of file ParticleGun.cxx.
References framework::config::Parameters::get(), the_gun_, and verbosity_.
|
overridevirtual |
Generate the primary vertices in the Geant4 event.
| event | The Geant4 event. |
Implements simcore::PrimaryGenerator.
Definition at line 82 of file ParticleGun.cxx.
|
overridevirtual |
Record the configuration of the primary generator into the run header.
Implements simcore::PrimaryGenerator.
Definition at line 87 of file ParticleGun.cxx.
References ldmx::RunHeader::setFloatParameter(), and ldmx::RunHeader::setStringParameter().
|
private |
The actual Geant4 implementation of the ParticleGun.
Definition at line 64 of file ParticleGun.h.
Referenced by ParticleGun().
|
private |
LDMX Verbosity for this generator.
Definition at line 69 of file ParticleGun.h.
Referenced by ParticleGun().