|
LDMX Software
|
Wrapper for HepMC3::GenEvent with convenience methods. More...
#include <HepMCEvent.h>
Public Member Functions | |
| HepMCEvent (std::shared_ptr< HepMC3::GenEvent > event) | |
| Class constructor. | |
| virtual | ~HepMCEvent ()=default |
| Class destructor. | |
| int | getNumParticles () const |
| Get the number of particles in the event. | |
| double | getEventWeight () const |
| Get the event weight. | |
| const double * | getVertex () const |
| Get the vertex location (in mm, as expected by Geant4). | |
| double | getVertexTime () const |
| Get the vertex time (in ns, as expected by Geant4). | |
| const std::vector< std::unique_ptr< HepMCParticle > > & | getParticles () const |
| Get the list of final state particles in the event. | |
| std::shared_ptr< HepMC3::GenEvent > | getGenEvent () const |
| Get the underlying HepMC3 GenEvent. | |
Private Member Functions | |
| void | extractParticles () const |
| Extract final state particles from the HepMC event. | |
Private Attributes | |
| std::shared_ptr< HepMC3::GenEvent > | event_ |
| The underlying HepMC3 GenEvent. | |
| double | vtx_ [3] |
| Vertex location (in mm) | |
| double | vtxt_ {0.} |
| Vertex time (in ns) | |
| std::vector< std::unique_ptr< HepMCParticle > > | particles_ |
| The list of final state particles to be tracked. | |
| bool | particles_extracted_ {false} |
| Flag to indicate if particles have been extracted. | |
Wrapper for HepMC3::GenEvent with convenience methods.
Definition at line 37 of file HepMCEvent.h.
| simcore::hepmc::HepMCEvent::HepMCEvent | ( | std::shared_ptr< HepMC3::GenEvent > | event | ) |
Class constructor.
| event | Shared pointer to HepMC3 GenEvent |
Definition at line 6 of file HepMCEvent.cxx.
|
private |
Extract final state particles from the HepMC event.
Definition at line 70 of file HepMCEvent.cxx.
References event_, particles_, and particles_extracted_.
Referenced by getNumParticles(), and getParticles().
| double simcore::hepmc::HepMCEvent::getEventWeight | ( | ) | const |
Get the event weight.
Definition at line 48 of file HepMCEvent.cxx.
References event_.
| std::shared_ptr< HepMC3::GenEvent > simcore::hepmc::HepMCEvent::getGenEvent | ( | ) | const |
Get the underlying HepMC3 GenEvent.
Definition at line 66 of file HepMCEvent.cxx.
References event_.
| int simcore::hepmc::HepMCEvent::getNumParticles | ( | ) | const |
Get the number of particles in the event.
Definition at line 41 of file HepMCEvent.cxx.
References extractParticles(), particles_, and particles_extracted_.
| const std::vector< std::unique_ptr< HepMCParticle > > & simcore::hepmc::HepMCEvent::getParticles | ( | ) | const |
Get the list of final state particles in the event.
These are particles that should be tracked by Geant4.
Definition at line 58 of file HepMCEvent.cxx.
References extractParticles(), particles_, and particles_extracted_.
| const double * simcore::hepmc::HepMCEvent::getVertex | ( | ) | const |
Get the vertex location (in mm, as expected by Geant4).
Definition at line 54 of file HepMCEvent.cxx.
References vtx_.
| double simcore::hepmc::HepMCEvent::getVertexTime | ( | ) | const |
Get the vertex time (in ns, as expected by Geant4).
Definition at line 56 of file HepMCEvent.cxx.
References vtxt_.
|
private |
The underlying HepMC3 GenEvent.
Definition at line 91 of file HepMCEvent.h.
Referenced by extractParticles(), getEventWeight(), getGenEvent(), and HepMCEvent().
|
mutableprivate |
The list of final state particles to be tracked.
Definition at line 106 of file HepMCEvent.h.
Referenced by extractParticles(), getNumParticles(), and getParticles().
|
mutableprivate |
Flag to indicate if particles have been extracted.
Definition at line 111 of file HepMCEvent.h.
Referenced by extractParticles(), getNumParticles(), and getParticles().
|
mutableprivate |
Vertex location (in mm)
Definition at line 96 of file HepMCEvent.h.
Referenced by getVertex(), and HepMCEvent().
|
mutableprivate |
Vertex time (in ns)
Definition at line 101 of file HepMCEvent.h.
Referenced by getVertexTime(), and HepMCEvent().