LDMX Software
|
Generates a Geant4 event from an LHEEvent. More...
#include <LHEPrimaryGenerator.h>
Public Member Functions | |
LHEPrimaryGenerator (const std::string &name, const framework::config::Parameters ¶meters) | |
Class constructor. | |
virtual | ~LHEPrimaryGenerator () |
Class destructor. | |
void | GeneratePrimaryVertex (G4Event *anEvent) override |
Generate 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 | |
simcore::lhe::LHEReader * | reader_ |
The LHE reader with the event data. | |
std::string | file_path_ |
path to LHE file | |
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. | |
Generates a Geant4 event from an LHEEvent.
Definition at line 24 of file LHEPrimaryGenerator.h.
simcore::generators::LHEPrimaryGenerator::LHEPrimaryGenerator | ( | const std::string & | name, |
const framework::config::Parameters & | parameters | ||
) |
Class constructor.
reader | The LHE reader with the event data. |
Definition at line 25 of file LHEPrimaryGenerator.cxx.
References file_path_, framework::config::Parameters::getParameter(), and reader_.
|
virtual |
|
overridevirtual |
Generate vertices in the Geant4 event.
anEvent | The Geant4 event. |
Implements simcore::PrimaryGenerator.
Definition at line 34 of file LHEPrimaryGenerator.cxx.
References simcore::lhe::LHEParticle::getIDUP(), simcore::lhe::LHEParticle::getISTUP(), simcore::lhe::LHEParticle::getMother(), simcore::lhe::LHEEvent::getParticles(), simcore::lhe::LHEParticle::getPUP(), simcore::lhe::LHEEvent::getVertex(), simcore::lhe::LHEParticle::getVTIMUP(), simcore::lhe::LHEEvent::getXWGTUP(), reader_, simcore::lhe::LHEReader::readNextEvent(), and simcore::UserPrimaryParticleInformation::setHepEvtStatus().
|
overridevirtual |
Record the configuration of the primary generator into the run header.
Implements simcore::PrimaryGenerator.
Definition at line 109 of file LHEPrimaryGenerator.cxx.
References file_path_, and ldmx::RunHeader::setStringParameter().
|
private |
path to LHE file
Definition at line 52 of file LHEPrimaryGenerator.h.
Referenced by LHEPrimaryGenerator(), and RecordConfig().
|
private |
The LHE reader with the event data.
Definition at line 50 of file LHEPrimaryGenerator.h.
Referenced by GeneratePrimaryVertex(), LHEPrimaryGenerator(), and ~LHEPrimaryGenerator().