Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
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
13namespace thermalfist {
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
24 double r0, rx, ry, rz;
25
27 SimpleParticle(double inPx = 0., double inPy = 0., double inPz = 0., double inM = 0., long long inPDGID = 0., long long inMotherPDGID = 0,
28 double inR0 = 0., double inRx = 0., double inRy = 0., double inRz = 0.) :
29 px(inPx),
30 py(inPy),
31 pz(inPz),
32 m(inM),
33 p0(sqrt(m*m + px * px + py * py + pz * pz)),
34 PDGID(inPDGID), MotherPDGID(inMotherPDGID),
35 epoch(0), processed(false),
36 r0(inR0), rx(inRx), ry(inRy), rz(inRz)
37 { }
38
40 double GetP() const {
41 return sqrt(p0*p0 - m * m);
42 }
43
45 double GetPt() const {
46 return sqrt(px*px + py * py);
47 }
48
50 double GetMt() const {
51 return sqrt(m*m + px * px + py * py);
52 }
53
55 double GetY() const {
56 return 0.5*log((p0 + pz) / (p0 - pz));
57 }
58
60 double GetEta() const {
61 //return atanh(pz/GetP());
62 return 0.5*log((GetP() + pz) / (GetP() - pz));
63 }
64
66 double GetTau() const {
67 return sqrt(r0 * r0 - rz * rz);
68 }
69
71 double GetEtaS() const {
72 return 0.5 * log((r0 + rz) / (r0 - rz));
73 }
74
76 void RapidityBoost(double dY) {
77 pz = GetMt() * sinh(GetY() + dY);
78 p0 = sqrt(m*m + px * px + py * py + pz * pz);
79
80 double tau = GetTau();
81 double etas = GetEtaS();
82 etas += dY;
83
84 r0 = tau * cosh(etas);
85 rz = tau * sinh(etas);
86 }
87 };
88
89} // namespace thermalfist
90
91#endif
The main namespace where all classes and functions of the Thermal-FIST library reside.
Definition CosmicEoS.h:9
double GetMt() const
Transverse mass (in GeV)
double rz
Space-time coordinates.
SimpleParticle(double inPx=0., double inPy=0., double inPz=0., double inM=0., long long inPDGID=0., long long inMotherPDGID=0, double inR0=0., double inRx=0., double inRy=0., double inRz=0.)
Constructs a particle from provided three-momentum, mass, and PDG code.
double p0
Energy (in GeV)
double GetPt() const
Transverse momentum (in GeV)
double GetTau() const
The longitudinal proper time.
double pz
3-momentum components (in GeV)
long long MotherPDGID
PDG code of a mother particle, if applicable.
double GetY() const
The longitudinal rapidity.
int epoch
0 - primary particle, 1 - after decay of primary particles, 2 - after a cascade of two decays and so ...
double GetP() const
Absolute value of the 3-momentum (in GeV)
double GetEta() const
The longitudinal pseudorapidity.
double GetEtaS() const
The longitudinal space-time rapidity.
bool processed
Used in event generator.
void RapidityBoost(double dY)
Rapidity boost.