Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
SimpleEvent.h
Go to the documentation of this file.
1/*
2 * Thermal-FIST package
3 *
4 * Copyright (c) 2014-2018 Volodymyr Vovchenko
5 *
6 * GNU General Public License (GPLv3 or later)
7 */
8#ifndef SIMPLEEVENT_H
9#define SIMPLEEVENT_H
10
11#include <cmath>
12#include <vector>
13#include <fstream>
14
17
18namespace thermalfist {
20 struct SimpleEvent {
22 double weight;
23
25 double logweight;
26
28 std::vector<SimpleParticle> Particles;
29
31 std::vector<SimpleParticle> AllParticles;
32
34 std::vector<SimpleParticle> PhotonsLeptons;
35
38 std::vector<int> DecayMap;
39
41 std::vector<int> DecayMapFinal;
42
44 SimpleEvent() { Particles.resize(0); AllParticles.resize(0); PhotonsLeptons.resize(0); weight = 1.; logweight = 0.; }
45
47 void RapidityBoost(double dY);
48
50 static SimpleEvent MergeEvents(const SimpleEvent &evt1, const SimpleEvent &evt2);
51
76
78 void writeToFile(std::ofstream& fout, const EventOutputConfig& config = EventOutputConfig(), int eventnumber = 1) const;
79
81 void writeToFile(std::ofstream& fout, int eventnumber = 1) const { writeToFile(fout, EventOutputConfig(), eventnumber); }
82
84 void writeToFileForUrqmd(std::ofstream& fout) const;
85
87 void writeToFileForSmash(std::ofstream& fout, const thermalfist::ThermalParticleSystem* TPS = NULL, const int eventnumber = 1) const;
88 };
89
90} // namespace thermalfist
91
92#endif
Class containing the particle list.
The main namespace where all classes and functions of the Thermal-FIST library reside.
Definition CosmicEoS.h:9
Configuration for the event output.
Definition SimpleEvent.h:53
bool printCoordinates
Print the space-time coordinates of the particles.
Definition SimpleEvent.h:68
bool printDecayEpoch
Print the number of successive decays before the particle was produced.
Definition SimpleEvent.h:65
bool printWeight
Print the event weight for importance sampling.
Definition SimpleEvent.h:71
bool printMotherPdg
Output the pdg code of the mother particle.
Definition SimpleEvent.h:59
bool printPhotonsLeptons
Output photons and leptons, if any.
Definition SimpleEvent.h:62
bool printEnergy
Output the particle's energy in addition to its 3-momentum.
Definition SimpleEvent.h:56
Structure holding information about a single event in the event generator.
Definition SimpleEvent.h:20
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.
Definition SimpleEvent.h:44
double weight
Event weight factor.
Definition SimpleEvent.h:22
std::vector< SimpleParticle > Particles
Vector of all final particles in the event.
Definition SimpleEvent.h:28
void writeToFile(std::ofstream &fout, int eventnumber=1) const
Writes the event to an output file stream.
Definition SimpleEvent.h:81
double logweight
Log of the event weight factor.
Definition SimpleEvent.h:25
std::vector< SimpleParticle > AllParticles
Vector of all particles which ever appeared in the event (including those that decay and photons/lept...
Definition SimpleEvent.h:31
void RapidityBoost(double dY)
Rapidity boost by Y -> Y + dY for all particles.
std::vector< int > DecayMap
Definition SimpleEvent.h:38
std::vector< SimpleParticle > PhotonsLeptons
Vector of all decay photons/leptons.
Definition SimpleEvent.h:34
std::vector< int > DecayMapFinal
Vector for each Particles element pointing to the index of the primordial resonance from which this p...
Definition SimpleEvent.h:41
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.