Thermal-FIST  1.3
Package for hadron resonance gas model applications
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 
16 
17 namespace thermalfist {
19  struct SimpleEvent {
21  double weight;
22 
24  double logweight;
25 
27  std::vector<SimpleParticle> Particles;
28 
30  std::vector<SimpleParticle> AllParticles;
31 
33  std::vector<SimpleParticle> PhotonsLeptons;
34 
37  std::vector<int> DecayMap;
38 
40  std::vector<int> DecayMapFinal;
41 
43  SimpleEvent() { Particles.resize(0); AllParticles.resize(0); PhotonsLeptons.resize(0); weight = 1.; logweight = 0.; }
44 
46  void RapidityBoost(double dY);
47 
49  static SimpleEvent MergeEvents(const SimpleEvent &evt1, const SimpleEvent &evt2);
50 
53 
56 
59 
62 
65 
67  printEnergy(false), printMotherPdg(false), printPhotonsLeptons(false), printDecayEpoch(false) { }
68  };
69 
71  void writeToFile(std::ofstream& fout, const EventOutputConfig& config = EventOutputConfig(), int eventnumber = 1);
72 
74  void writeToFile(std::ofstream& fout, int eventnumber = 1) { writeToFile(fout, EventOutputConfig(), eventnumber); }
75  };
76 
77 } // namespace thermalfist
78 
79 #endif
void RapidityBoost(double dY)
Rapidity boost by Y -> Y + dY for all particles.
Definition: SimpleEvent.cpp:78
bool printDecayEpoch
Print the number of succesive decays before the particle was produced.
Definition: SimpleEvent.h:64
void writeToFile(std::ofstream &fout, int eventnumber=1)
Writes the event to an output file stream.
Definition: SimpleEvent.h:74
Configuration for the event output.
Definition: SimpleEvent.h:52
Structure holding information about a single event in the event generator.
Definition: SimpleEvent.h:19
bool printEnergy
Output the particle&#39;s energy in addition to its 3-momentum.
Definition: SimpleEvent.h:55
std::vector< SimpleParticle > AllParticles
Vector of all particles which ever appeared in the event (including those that decay and photons/lept...
Definition: SimpleEvent.h:30
std::vector< SimpleParticle > PhotonsLeptons
Vector of all decay photons/leptons.
Definition: SimpleEvent.h:33
SimpleEvent()
Default constructor, empty event.
Definition: SimpleEvent.h:43
double logweight
Log of the event weight factor.
Definition: SimpleEvent.h:24
bool printPhotonsLeptons
Output photons and leptons, if any.
Definition: SimpleEvent.h:61
bool printMotherPdg
Output the pdg code of the mother particle.
Definition: SimpleEvent.h:58
std::vector< SimpleParticle > Particles
Vector of all final particles in the event.
Definition: SimpleEvent.h:27
std::vector< int > DecayMap
Definition: SimpleEvent.h:37
void writeToFile(std::ofstream &fout, const EventOutputConfig &config=EventOutputConfig(), int eventnumber=1)
Writes the event to an output file stream.
Definition: SimpleEvent.cpp:14
The main namespace where all classes and functions of the Thermal-FIST library reside.
std::vector< int > DecayMapFinal
Vector for each Particles element pointing to the index of the primordial resonance from which this p...
Definition: SimpleEvent.h:40
double weight
Event weight factor.
Definition: SimpleEvent.h:21
static SimpleEvent MergeEvents(const SimpleEvent &evt1, const SimpleEvent &evt2)
Merge particles from two events (e.g. two patches, two canonical volumes, etc.)
Definition: SimpleEvent.cpp:84