Celeritas
0.5.0-56+6b053cd
|
Read a HepMC3 event record file and create primary particles. More...
#include <EventReader.hh>
Public Types | |
Type aliases | |
using | SPConstParticles = std::shared_ptr< ParticleParams const > |
using | result_type = std::vector< Primary > |
Public Types inherited from celeritas::EventReaderInterface | |
using | VecPrimary = std::vector< Primary > |
using | result_type = VecPrimary |
Public Member Functions | |
EventReader (std::string const &filename, SPConstParticles particles) | |
Construct from a filename. | |
CELER_DELETE_COPY_MOVE (EventReader) | |
Prevent copying and moving. | |
result_type | operator() () final |
Read a single event from the event record. More... | |
size_type | num_events () const final |
Get total number of events. | |
Additional Inherited Members | |
Protected Member Functions inherited from celeritas::EventReaderInterface | |
EventReaderInterface ()=default | |
CELER_DEFAULT_COPY_MOVE (EventReaderInterface) | |
Read a HepMC3 event record file and create primary particles.
Each operator()
call returns a vector of primaries from a single event until all events have been read. Supported formats are Asciiv3, IO_GenEvent, HEPEVT, and LHEF.
|
inlinefinalvirtual |
Read a single event from the event record.
GenEvent::set_units()
. This method converts the momentum units of all particles and the length units of all daughter vertices; however, it does not convert the length units of the root vertex. This means any particle without a vertex will not have the correct units for position and time. This may also be true for any vertices that do not have a position assigned, as their positions will be inherited from the vertices of their ancestors (or by falling back on the event position). Implements celeritas::EventReaderInterface.