#include <hepmcoutput.h>
SMASH output to HepMC file.
This class writes a vertex connecting all intial particles with all final particles into a HepMC outputfile. In collider mode, projectile and target are combined into single intial particles with a nuclear pdg code. The output file is a human-readable ASCII file. HepMC version 3 is used.
More details of the output format can be found in the User Guide.
Definition at line 34 of file hepmcoutput.h.
Public Member Functions | |
HepMcOutput (const bf::path &path, std::string name, const bool full_event, const int total_N, const int proj_N) | |
Create HepMC particle output. More... | |
~HepMcOutput () | |
Destructor renames file. More... | |
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. More... | |
![]() | |
HepMcInterface (const std::string &name, const bool full_event, const int total_N, const int proj_N) | |
Create HepMC particle event in memory. More... | |
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. More... | |
void | at_interaction (const Action &action, const double density) override |
Writes collisions to event. More... | |
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. More... | |
![]() | |
OutputInterface (std::string name) | |
Construct output interface. More... | |
virtual | ~OutputInterface ()=default |
virtual void | at_eventend (const Particles &particles, const int event_number, const EventInfo &info)=0 |
Output launched at event end. More... | |
virtual void | at_intermediate_time (const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param, const EventInfo &info) |
Output launched after every N'th timestep. More... | |
virtual void | thermodynamics_output (const ThermodynamicQuantity tq, const DensityType dt, RectangularLattice< DensityOnLattice > &lattice) |
Output to write thermodynamics from the lattice. More... | |
virtual void | thermodynamics_output (const ThermodynamicQuantity tq, const DensityType dt, RectangularLattice< EnergyMomentumTensor > &lattice) |
Output to write energy-momentum tensor and related quantities from the lattice. More... | |
virtual void | thermodynamics_output (const GrandCanThermalizer &gct) |
Output to write energy-momentum tensor and related quantities from the thermalizer class. More... | |
bool | is_dilepton_output () const |
Get, whether this is the dilepton output? More... | |
bool | is_photon_output () const |
Get, whether this is the photon output? More... | |
bool | is_IC_output () const |
Get, whether this is the IC output? More... | |
const char * | to_string (const ThermodynamicQuantity tq) |
Convert thermodynamic quantities to strings. More... | |
const char * | to_string (const DensityType dens_type) |
Convert density types to strings. More... | |
Private Attributes | |
const bf::path | filename_ |
Filename of output. More... | |
bf::path | filename_unfinished_ |
Filename of output as long as simulation is still running. More... | |
std::unique_ptr< HepMC3::WriterAscii > | output_file_ |
Pointer to Ascii HepMC3 output file. More... | |
Additional Inherited Members | |
![]() | |
using | AZ = std::pair< int, int > |
Pair of Atomic weight and number. More... | |
![]() | |
enum | Status { beam = 4, fnal = 1, dcy = 2, off = 100 } |
HepMC status codes. More... | |
using | IdMap = std::map< int, HepMC3::GenParticlePtr > |
Type of mapping from SMASH ID to HepMC ID. More... | |
using | CollCounter = std::valarray< int > |
Counter of collitions per incoming particle. More... | |
![]() | |
void | clear () |
Clear before an event. More... | |
int | get_status (const ProcessType &t) const |
Convert SMASH process type to HepMC status. More... | |
HepMC3::GenParticlePtr | make_gen (int pid, int status, const smash::FourVector &mom, double mass=-1) |
Make an HepMC particle. More... | |
HepMC3::GenParticlePtr | make_register (const ParticleData &p, int status=Status::fnal) |
Find particle in mapping or generate it. More... | |
HepMC3::GenParticlePtr | find_or_make (const ParticleData &p, int status=Status::fnal, bool force_new=false) |
Find particle in mapping or generate it. More... | |
int | ion_pdg (const AZ &az) const |
Encode ion PDG. More... | |
![]() | |
HepMC3::GenEvent | event_ |
The event. More... | |
HepMC3::GenHeavyIonPtr | ion_ |
The heavy-ion structure. More... | |
HepMC3::GenCrossSectionPtr | xs_ |
Dummy cross-section. More... | |
HepMC3::GenVertexPtr | ip_ |
The interaction point. More... | |
IdMap | map_ |
Mapping from ID to particle. More... | |
CollCounter | coll_ |
Collision counter. More... | |
int | ncoll_ |
counter of binary collisions (e.g., where both incoming particles are from the beams. More... | |
int | ncoll_hard_ |
counter of hard binary collisions (e.g., where both incoming particles are from the beams. More... | |
const int | total_N_ |
Total number of nucleons in projectile and target, needed for converting nuclei to single particles. More... | |
const int | proj_N_ |
Total number of nucleons in projectile, needed for converting nuclei to single particles. More... | |
bool | full_event_ |
Whether the full event or only final-state particles are in the output. More... | |
![]() | |
const bool | is_dilepton_output_ |
Is this the dilepton output? More... | |
const bool | is_photon_output_ |
Is this the photon output? More... | |
const bool | is_IC_output_ |
Is this the IC output? More... | |
smash::HepMcOutput::HepMcOutput | ( | const bf::path & | path, |
std::string | name, | ||
const bool | full_event, | ||
const int | total_N, | ||
const int | proj_N | ||
) |
Create HepMC particle output.
[in] | path | Output path. |
[in] | name | Name of the output. |
[in] | full_event | Whether the full event or only final-state particles are printed in the output |
[in] | total_N | Total number of particles in both nuclei. |
[in] | proj_N | Number of particles in projectile. |
Definition at line 70 of file hepmcoutput.cc.
smash::HepMcOutput::~HepMcOutput | ( | ) |
|
override |
Add the final particles information of an event to the central vertex.
Store impact parameter and write event.
[in] | particles | Current list of particles. |
[in] | event_number | Number of event. |
[in] | event | Event info, see event_info |
Definition at line 86 of file hepmcoutput.cc.
|
private |
Filename of output.
Definition at line 64 of file hepmcoutput.h.
|
private |
Filename of output as long as simulation is still running.
Definition at line 66 of file hepmcoutput.h.
|
private |
Pointer to Ascii HepMC3 output file.
Definition at line 68 of file hepmcoutput.h.