 |
Version: SMASH-2.0.2
|
|
Go to the documentation of this file.
9 #ifndef SRC_INCLUDE_SMASH_HEPMCINTERFACE_H_
10 #define SRC_INCLUDE_SMASH_HEPMCINTERFACE_H_
18 #include "HepMC3/GenCrossSection.h"
19 #include "HepMC3/GenEvent.h"
20 #include "HepMC3/GenHeavyIon.h"
21 #include "HepMC3/GenParticle.h"
22 #include "HepMC3/GenVertex.h"
84 using AZ = std::pair<int, int>;
95 const int total_N,
const int proj_N);
137 using IdMap = std::map<int, HepMC3::GenParticlePtr>;
154 HepMC3::GenParticlePtr
make_gen(
int pid,
int status,
166 int status = Status::fnal);
177 int status = Status::fnal,
178 bool force_new =
false);
192 HepMC3::GenCrossSectionPtr
xs_;
239 #endif // SRC_INCLUDE_SMASH_HEPMCINTERFACE_H_
std::valarray< int > CollCounter
Counter of collitions per incoming particle.
IdMap map_
Mapping from ID to particle.
int ncoll_hard_
counter of hard binary collisions (e.g., where both incoming particles are from the beams.
void at_interaction(const Action &action, const double density) override
Writes collisions to event.
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.
const int total_N_
Total number of nucleons in projectile and target, needed for converting nuclei to single particles.
int ncoll_
counter of binary collisions (e.g., where both incoming particles are from the beams.
HepMC3::GenParticlePtr make_gen(int pid, int status, const smash::FourVector &mom, double mass=-1)
Make an HepMC particle.
Structure to contain custom data for output.
HepMcInterface(const std::string &name, const bool full_event, const int total_N, const int proj_N)
Create HepMC particle event in memory.
HepMC3::GenCrossSectionPtr xs_
Dummy cross-section.
HepMC3::GenParticlePtr make_register(const ParticleData &p, int status=Status::fnal)
Find particle in mapping or generate it.
bool full_event_
Whether the full event or only final-state particles are in the output.
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.
Abstraction of generic output.
HepMC3::GenVertexPtr ip_
The interaction point.
std::map< int, HepMC3::GenParticlePtr > IdMap
Type of mapping from SMASH ID to HepMC ID.
Base class for output handlers that need the HepMC3 structure.
int ion_pdg(const AZ &az) const
Encode ion PDG.
int get_status(const ProcessType &t) const
Convert SMASH process type to HepMC status.
void clear()
Clear before an event.
HepMC3::GenHeavyIonPtr ion_
The heavy-ion structure.
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.
CollCounter coll_
Collision counter.
Status
HepMC status codes.
const int proj_N_
Total number of nucleons in projectile, needed for converting nuclei to single particles.
std::pair< int, int > AZ
Pair of Atomic weight and number.
ProcessType
Process Types are used to identify the type of the process.