|
LDMX Software
|
Generates a Geant4 event from a HepMCEvent. More...
#include <HepMCPrimaryGenerator.h>
Public Member Functions | |
| HepMCPrimaryGenerator (const std::string &name, const framework::config::Parameters ¶meters) | |
| Class constructor. | |
| virtual | ~HepMCPrimaryGenerator ()=default |
| Class destructor. | |
| void | GeneratePrimaryVertex (G4Event *anEvent) override |
| Generate vertices in the Geant4 event. | |
| void | RecordConfig (const std::string &id, ldmx::RunHeader &rh) override |
| Record configuration information. | |
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 () |
| void | smearBeamspot (G4PrimaryVertex *primary_vertex) |
| Apply beam spot smearing to a primary vertex. | |
| bool | useBeamspot () const |
| Check if beam spot smearing is enabled for this generator. | |
Private Attributes | |
| std::string | file_path_ |
| The file path to the HepMC file. | |
| hepmc::HepMCReader | reader_ |
| The HepMC reader with the event data. | |
| std::vector< double > | vertex_ |
| The vertex offset to apply to the HepMC event vertex. | |
Additional Inherited Members | |
Protected Attributes inherited from simcore::PrimaryGenerator | |
| std::string | name_ {""} |
| Name of the PrimaryGenerator. | |
| bool | use_beamspot_ {false} |
| Flag denoting whether beam spot smearing is enabled for this generator. | |
| double | beamspot_x_size_ {0} |
| Extent of the beamspot in x [mm]. | |
| double | beamspot_y_size_ {0} |
| Extent of the beamspot in y [mm]. | |
| double | beamspot_z_size_ {0} |
| Extent of the beamspot in z [mm]. | |
Generates a Geant4 event from a HepMCEvent.
Definition at line 32 of file HepMCPrimaryGenerator.h.
| simcore::generators::HepMCPrimaryGenerator::HepMCPrimaryGenerator | ( | const std::string & | name, |
| const framework::config::Parameters & | parameters ) |
Class constructor.
| name | The name of the generator. |
| parameters | Configuration parameters. |
Definition at line 6 of file HepMCPrimaryGenerator.cxx.
|
overridevirtual |
Generate vertices in the Geant4 event.
| anEvent | The Geant4 event. |
Implements simcore::PrimaryGenerator.
Definition at line 13 of file HepMCPrimaryGenerator.cxx.
References reader_, simcore::hepmc::HepMCReader::readNextEvent(), simcore::PrimaryGenerator::smearBeamspot(), simcore::PrimaryGenerator::useBeamspot(), and vertex_.
|
overridevirtual |
Record configuration information.
| id | The configuration ID. |
| rh | The run header. |
Implements simcore::PrimaryGenerator.
Definition at line 75 of file HepMCPrimaryGenerator.cxx.
References file_path_, and ldmx::RunHeader::setStringParameter().
|
private |
The file path to the HepMC file.
Definition at line 64 of file HepMCPrimaryGenerator.h.
Referenced by RecordConfig().
|
private |
The HepMC reader with the event data.
Definition at line 69 of file HepMCPrimaryGenerator.h.
Referenced by GeneratePrimaryVertex().
|
private |
The vertex offset to apply to the HepMC event vertex.
Definition at line 74 of file HepMCPrimaryGenerator.h.
Referenced by GeneratePrimaryVertex().