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 41 of file hepmcoutput.h.
|
| HepMcOutput (const bf::path &path, std::string name, const OutputParameters &out_par, const int total_N, const int proj_N) |
| Create HepMC particle output. More...
|
|
| ~HepMcOutput () |
| Destructor renames file. More...
|
|
void | at_eventstart (const Particles &particles, const int event_number, const EventInfo &) override |
| Add the initial particles information of an event to the central vertex. 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_interaction (const Action &action, const double density) |
| Called whenever an action modified one or more particles. 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...
|
|
|
const bf::path | filename_ |
| Filename of output. More...
|
|
bf::path | filename_unfinished_ |
| Filename of output as long as simulation is still running. 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...
|
|
std::unique_ptr< HepMC3::WriterAscii > | output_file_ |
| Pointer to Ascii HepMC3 output file. More...
|
|
std::unique_ptr< HepMC3::GenEvent > | current_event_ |
| HepMC3::GenEvent pointer for current event. More...
|
|
HepMC3::GenVertexPtr | vertex_ |
| HepMC3::GenVertex pointer for central vertex in event. More...
|
|
int smash::HepMcOutput::construct_nuclear_pdg_code |
( |
int |
na, |
|
|
int |
nz |
|
) |
| const |
|
private |
Construct nulcear pdg code for porjectile and target, see PDG chapter "Monte Carlo particle numbering scheme" for details.
- Parameters
-
[in] | na | Number of all particles in nucleus (A) |
[in] | nz | Number of all charged particles in nucleus (Z). |
Note: Isomers and hypernuclei are not supported. Also note that one would usually create a PdgCode object to store the PDG code of the nuclei. This PdgCode object however would be first constructed with the integer determined here and then directly returned again with a method of the PdgCode class, making the creation of a PdgCode class instance overkill. A possible improvement would be the inclusion of this function in the PdgCode class.
Definition at line 66 of file hepmcoutput.cc.
67 const int pdg_nuclear_code_prefix = 10 * 1E8;
69 const int pdg_nuclear_code_lambda = 0 * 1E7;
70 const int pdg_nuclear_code_charge = nz * 1E4;
71 const int pdg_nuclear_code_baryon = na * 1E1;
73 const int pdg_nuclear_code_isomer = 0 * 1E0;
75 return pdg_nuclear_code_prefix + pdg_nuclear_code_lambda +
76 pdg_nuclear_code_charge + pdg_nuclear_code_baryon +
77 pdg_nuclear_code_isomer;