11 #ifndef SRC_INCLUDE_SMASH_HEPMCINTERFACE_H_
12 #define SRC_INCLUDE_SMASH_HEPMCINTERFACE_H_
20 #include "HepMC3/GenCrossSection.h"
21 #include "HepMC3/GenEvent.h"
22 #include "HepMC3/GenHeavyIon.h"
23 #include "HepMC3/GenParticle.h"
24 #include "HepMC3/GenVertex.h"
86 using AZ = std::pair<int, int>;
136 using IdMap = std::map<int, HepMC3::GenParticlePtr>;
153 HepMC3::GenParticlePtr
make_gen(
int pid,
int status,
165 int status = Status::fnal);
176 int status = Status::fnal,
177 bool force_new =
false);
191 HepMC3::GenCrossSectionPtr
xs_;
Action is the base class for a generic process that takes a number of incoming particles and transfor...
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
Base class for output handlers that need the HepMC3 structure.
std::pair< int, int > AZ
Pair of Atomic weight and number.
HepMC3::GenVertexPtr ip_
The interaction point.
std::valarray< int > CollCounter
Counter of collitions per incoming particle.
int ncoll_
counter of binary collisions (e.g., where both incoming particles are from the beams.
bool full_event_
Whether the full event or only final-state particles are in the output.
HepMC3::GenParticlePtr make_gen(int pid, int status, const smash::FourVector &mom, double mass=-1)
Make an HepMC particle.
int ion_pdg(const AZ &az) const
Encode ion PDG.
int get_status(const ProcessType &t) const
Convert SMASH process type to HepMC status.
HepMC3::GenParticlePtr make_register(const ParticleData &p, int status=Status::fnal)
Find particle in mapping or generate it.
int ncoll_hard_
counter of hard binary collisions (e.g., where both incoming particles are from the beams.
void at_eventend(const Particles &particles, const int32_t event_number, const EventInfo &event) override
Add the final particles information of an event to the central vertex.
void clear()
Clear before an event.
IdMap map_
Mapping from ID to particle.
void at_interaction(const Action &action, const double density) override
Writes collisions to event.
Status
HepMC status codes.
HepMC3::GenParticlePtr find_or_make(const ParticleData &p, int status=Status::fnal, bool force_new=false)
Find particle in mapping or generate it.
HepMC3::GenEvent event_
The event.
void at_eventstart(const Particles &particles, const int event_number, const EventInfo &event) override
Add the initial particles information of an event to the central vertex.
std::map< int, HepMC3::GenParticlePtr > IdMap
Type of mapping from SMASH ID to HepMC ID.
HepMC3::GenHeavyIonPtr ion_
The heavy-ion structure.
CollCounter coll_
Collision counter.
HepMcInterface(const std::string &name, const bool full_event)
Create HepMC particle event in memory.
HepMC3::GenCrossSectionPtr xs_
Dummy cross-section.
Abstraction of generic output.
ParticleData contains the dynamic information of a certain particle.
The Particles class abstracts the storage and manipulation of particles.
ProcessType
ProcessTypes are used to identify the type of the process.
Structure to contain custom data for output.