Thermal-FIST  1.3
Package for hadron resonance gas model applications
SimpleParticle.h
Go to the documentation of this file.
1 /*
2  * Thermal-FIST package
3  *
4  * Copyright (c) 2014-2019 Volodymyr Vovchenko
5  *
6  * GNU General Public License (GPLv3 or later)
7  */
8 #ifndef SIMPLEPARTICLE_H
9 #define SIMPLEPARTICLE_H
10 
11 #include <cmath>
12 
13 namespace thermalfist {
15  struct SimpleParticle {
16  double px, py, pz;
17  double m;
18  double p0;
19  long long PDGID;
20  long long MotherPDGID;
21  int epoch;
22  bool processed;
23 
25  SimpleParticle(double inPx = 0., double inPy = 0., double inPz = 0., double inM = 0., long long inPDGID = 0., long long inMotherPDGID = 0) :
26  px(inPx),
27  py(inPy),
28  pz(inPz),
29  m(inM),
30  p0(sqrt(m*m + px * px + py * py + pz * pz)),
31  PDGID(inPDGID), MotherPDGID(inMotherPDGID), epoch(0), processed(false) { }
32 
34  double GetP() const {
35  return sqrt(p0*p0 - m * m);
36  }
37 
39  double GetPt() const {
40  return sqrt(px*px + py * py);
41  }
42 
44  double GetMt() const {
45  return sqrt(m*m + px * px + py * py);
46  }
47 
49  double GetY() const {
50  return 0.5*log((p0 + pz) / (p0 - pz));
51  }
52 
54  double GetEta() const {
55  //return atanh(pz/GetP());
56  return 0.5*log((GetP() + pz) / (GetP() - pz));
57  }
58 
60  void RapidityBoost(double dY) {
61  pz = GetMt() * sinh(GetY() + dY);
62  p0 = sqrt(m*m + px * px + py * py + pz * pz);
63  }
64  };
65 
66 } // namespace thermalfist
67 
68 #endif
double GetMt() const
Transverse mass (in GeV)
bool processed
Used in event generator.
void RapidityBoost(double dY)
Rapidity boost.
double GetEta() const
The longitudinal pseudorapidity.
double GetY() const
The longitudinal rapidity.
double GetP() const
Absolute value of the 3-momentum (in GeV)
double GetPt() const
Transverse momentum (in GeV)
double m
Mass (in GeV)
Structure holding information about a single particle in the event generator.
long long MotherPDGID
PDG code of a mother particle, if applicable.
long long PDGID
PDG code.
SimpleParticle(double inPx=0., double inPy=0., double inPz=0., double inM=0., long long inPDGID=0., long long inMotherPDGID=0)
Constructs a particle from provided three-momentum, mass, and PDG code.
double p0
Energy (in GeV)
double pz
3-momentum components (in GeV)
int epoch
0 - primary particle, 1 - after decay of primary particles, 2 - after a casacde of two decays and so ...
The main namespace where all classes and functions of the Thermal-FIST library reside.