16 fout <<
"Event " << eventnumber << std::endl;
19 fout <<
"Weight: " <<
weight << std::endl;
21 fout << std::setw(20) <<
"pdgid";
24 fout << std::setw(20) <<
"r0[fm/c]"
25 << std::setw(20) <<
"rx[fm]"
26 << std::setw(20) <<
"ry[fm]"
27 << std::setw(20) <<
"rz[fm]";
30 fout << std::setw(20) <<
"p0[GeV/c2]";
32 fout << std::setw(20) <<
"px[GeV/c]"
33 << std::setw(20) <<
"py[GeV/c]"
34 << std::setw(20) <<
"pz[GeV/c]";
37 fout << std::setw(20) <<
"mother_pdgid";
40 fout << std::setw(20) <<
"decay_epoch";
45 fout << std::scientific;
47 for (
size_t i = 0; i <
Particles.size(); ++i) {
48 fout << std::setw(20) <<
Particles[i].PDGID;
65 fout << std::setw(20) <<
Particles[i].MotherPDGID;
68 fout << std::setw(20) <<
Particles[i].epoch;
107 fout <<
"# " <<
Particles.size() << std::endl;
110 fout << std::scientific;
112 const int tabsize = 23;
114 for (
size_t i = 0; i <
Particles.size(); ++i) {
115 fout << std::setw(12) <<
Particles[i].PDGID <<
" ";
117 fout << std::setw(tabsize) <<
Particles[i].r0 <<
" "
118 << std::setw(tabsize) <<
Particles[i].rx <<
" "
119 << std::setw(tabsize) <<
Particles[i].ry <<
" "
120 << std::setw(tabsize) <<
Particles[i].rz <<
" ";
123 fout << std::setw(tabsize) <<
Particles[i].p0 <<
" ";
124 fout << std::setw(tabsize) <<
Particles[i].px <<
" "
125 << std::setw(tabsize) <<
Particles[i].py <<
" "
126 << std::setw(tabsize) <<
Particles[i].pz <<
" ";
136 int eventnumber_smash = eventnumber -1;
137 if (eventnumber_smash == 0) {
138 fout <<
"#!OSCAR2013 particle_lists t x y z mass p0 px py pz pdg ID charge" << std::endl;
139 fout <<
"# Units: fm fm fm fm GeV GeV GeV GeV GeV none none e" << std::endl;
140 fout <<
"# FISTSampler" << std::endl;
143 fout <<
"# event "<< eventnumber_smash <<
" out " <<
Particles.size() << std::endl;
148 const int tabsize = 4;
152 for (
size_t i = 0; i <
Particles.size(); ++i) {
173 fout <<
"# event "<< eventnumber_smash <<
" end 0 impact 0.000 scattering_projectile_target yes" << std::endl;
179 for (
size_t i = 0; i <
Particles.size(); ++i)
int ElectricCharge() const
Particle's electric charge.
Class containing the particle list.
const ThermalParticle & ParticleByPDG(long long pdgid) const
ThermalParticle object corresponding to particle species with a provided PDG ID.
The main namespace where all classes and functions of the Thermal-FIST library reside.
Configuration for the event output.
bool printCoordinates
Print the space-time coordinates of the particles.
bool printDecayEpoch
Print the number of successive decays before the particle was produced.
bool printWeight
Print the event weight for importance sampling.
bool printMotherPdg
Output the pdg code of the mother particle.
bool printPhotonsLeptons
Output photons and leptons, if any.
bool printEnergy
Output the particle's energy in addition to its 3-momentum.
static SimpleEvent MergeEvents(const SimpleEvent &evt1, const SimpleEvent &evt2)
Merge particles from two events (e.g. two patches, two canonical volumes, etc.)
SimpleEvent()
Default constructor, empty event.
double weight
Event weight factor.
std::vector< SimpleParticle > Particles
Vector of all final particles in the event.
double logweight
Log of the event weight factor.
std::vector< SimpleParticle > AllParticles
Vector of all particles which ever appeared in the event (including those that decay and photons/lept...
void RapidityBoost(double dY)
Rapidity boost by Y -> Y + dY for all particles.
std::vector< int > DecayMap
std::vector< SimpleParticle > PhotonsLeptons
Vector of all decay photons/leptons.
std::vector< int > DecayMapFinal
Vector for each Particles element pointing to the index of the primordial resonance from which this p...
void writeToFileForUrqmd(std::ofstream &fout) const
Writes the event in a format suitable for UrQMD afterburner, as described here https://github....
void writeToFileForSmash(std::ofstream &fout, const thermalfist::ThermalParticleSystem *TPS=NULL, const int eventnumber=1) const
Writes the event in a format suitable for SMASH afterburner.
void writeToFile(std::ofstream &fout, const EventOutputConfig &config=EventOutputConfig(), int eventnumber=1) const
Writes the event to an output file stream.