CbmRoot
ThermalParticle.h
Go to the documentation of this file.
1 #ifndef THERMALPARTICLE_H
2 #define THERMALPARTICLE_H
3 #include <string>
4 #include <vector>
5 #define PI 3.14159265359
6 
7 struct ParticleDecay {
8  double fBratio;
9  std::vector<int> fDaughters;
10  ParticleDecay(double bratio = 0.,
11  std::vector<int> daughters = std::vector<int>(0))
12  : fBratio(bratio), fDaughters(daughters) {}
13 };
14 
16 public:
17  static const double GeVtoifm;
18  bool fStable;
19  std::string fName;
20  int fPDGID;
23  double fMass;
24  int fS;
25  int fB;
26  int fC;
27  int fCharm;
28  double fAbsS;
29  double fAbsC;
30  double fWidth;
31  double fThreshold;
32  double fRadius;
33  double GetVo() { return 4. * 4. / 3. * PI * fRadius * fRadius * fRadius; }
34  std::string fDecayName;
35  std::vector<ParticleDecay> fDecays;
36  std::vector<ParticleDecay> fDecaysOrig;
37  std::vector<std::pair<double, int>> ResonanceBR;
38  ThermalParticle(bool Stable_ = true,
39  std::string Name = "hadron",
40  int PDGID = 0,
41  int SpinDeg = 1,
42  int Stat = 0,
43  double Mass = 0.,
44  int Strange = 0,
45  int Baryon = 0,
46  int Charge = 0,
47  double AbsS = 0.,
48  double Width = 0.,
49  double Threshold = 0.,
50  std::string DecayName = "pi0",
51  int Charm = 0,
52  double AbsC = 0.,
53  double radius = 0.5)
54  : fStable(Stable_)
55  , fName(Name)
56  , fPDGID(PDGID)
57  , fSpinDegeneracy(SpinDeg)
58  , fStatistics(Stat)
59  , fMass(Mass)
60  , fS(Strange)
61  , fB(Baryon)
62  , fC(Charge)
63  , fCharm(Charm)
64  , fAbsS(AbsS)
65  , fAbsC(AbsC)
66  , fWidth(Width)
67  , fThreshold(Threshold)
68  , fRadius(radius)
69  , fDecayName(DecayName)
70  , fDecays()
71  , fDecaysOrig()
72  , ResonanceBR() {
73  ResonanceBR.resize(0);
74  //fWidth = 1e-10;
75  }
76  ~ThermalParticle(void);
77  void ReadDecays(std::string filename = "");
78  void SetDecays(const std::vector<ParticleDecay>& Decays) { fDecays = Decays; }
79  void useStatistics(bool enable) {
80  if (!enable)
81  fStatistics = 0;
82  else {
83  if (fB == 0)
84  fStatistics = -1;
85  else
86  fStatistics = 1;
87  }
88  }
89 
92  bool IsMajorana() const {
93  if (fName.substr(0, 3) == "K0S" || fName.substr(0, 3) == "K0L") return 0;
94  return (fB == 0 && fC == 0 && fS == 0 && fCharm == 0);
95  }
97  double T,
98  double muB,
99  double muS,
100  double muQ,
101  double gammaS,
102  double mass = -1.,
103  double dMu = 0.) const; // if (mass<0) use default mass
104  double
105  CalculatePressure(double T,
106  double muB,
107  double muS,
108  double muQ,
109  double gammaS,
110  double mass = -1.,
111  double dMu = 0.) const; // if (mass<0) use default mass
112  double CalculateEnergyDensity(
113  double T,
114  double muB,
115  double muS,
116  double muQ,
117  double gammaS,
118  double mass = -1.,
119  double dMu = 0.) const; // if (mass<0) use default mass
121  double T,
122  double muB,
123  double muS,
124  double muQ,
125  double gammaS,
126  double mass = -1.,
127  double dMu = 0.) const; // if (mass<0) use default mass
129  double T,
130  double muB,
131  double muS,
132  double muQ,
133  double gammaS,
134  double mass = -1.,
135  double dMu = 0.) const; // if (mass<0) use default mass
136  double CalculateDensity(double T,
137  double muB,
138  double muS,
139  double muQ,
140  double gammaS,
141  int type = 0,
142  bool useWidth = 0,
143  double dMu = 0.)
144  const; // type: 0 - Particle Density, 1 - Energy Density, 2 - Entropy Density, 3 - Pressure
145 };
146 
147 #endif
ThermalParticle::fMass
double fMass
Definition: ThermalParticle.h:23
ThermalParticle::SetDecays
void SetDecays(const std::vector< ParticleDecay > &Decays)
Definition: ThermalParticle.h:78
ThermalParticle::CalculateEntropyDensity
double CalculateEntropyDensity(double T, double muB, double muS, double muQ, double gammaS, double mass=-1., double dMu=0.) const
Definition: ThermalParticle.cxx:219
PI
#define PI
Definition: ThermalParticle.h:5
ThermalParticle::fSpinDegeneracy
int fSpinDegeneracy
Definition: ThermalParticle.h:21
ThermalParticle::fWidth
double fWidth
Definition: ThermalParticle.h:30
ThermalParticle::IsMajorana
bool IsMajorana() const
Definition: ThermalParticle.h:92
ThermalParticle::CalculateEnergyDensity
double CalculateEnergyDensity(double T, double muB, double muS, double muQ, double gammaS, double mass=-1., double dMu=0.) const
Definition: ThermalParticle.cxx:260
ThermalParticle::fAbsS
double fAbsS
Definition: ThermalParticle.h:28
ThermalParticle::CalculateDensity
double CalculateDensity(double T, double muB, double muS, double muQ, double gammaS, int type=0, bool useWidth=0, double dMu=0.) const
Definition: ThermalParticle.cxx:98
ThermalParticle::ResonanceBR
std::vector< std::pair< double, int > > ResonanceBR
Definition: ThermalParticle.h:37
ThermalParticle::fStable
bool fStable
Definition: ThermalParticle.h:18
ThermalParticle::fB
int fB
Definition: ThermalParticle.h:25
ParticleDecay::ParticleDecay
ParticleDecay(double bratio=0., std::vector< int > daughters=std::vector< int >(0))
Definition: ThermalParticle.h:10
ThermalParticle::NormalizeBranchingRatios
void NormalizeBranchingRatios()
Definition: ThermalParticle.cxx:41
ParticleDecay::fBratio
double fBratio
Definition: ThermalParticle.h:8
ThermalParticle::GetVo
double GetVo()
Definition: ThermalParticle.h:33
ThermalParticle::fDecays
std::vector< ParticleDecay > fDecays
Definition: ThermalParticle.h:35
ThermalParticle::useStatistics
void useStatistics(bool enable)
Definition: ThermalParticle.h:79
ThermalParticle::fName
std::string fName
Definition: ThermalParticle.h:19
ThermalParticle::fCharm
int fCharm
Definition: ThermalParticle.h:27
ParticleDecay
Definition: ThermalParticle.h:7
ThermalParticle
Definition: ThermalParticle.h:15
ThermalParticle::fStatistics
int fStatistics
Definition: ThermalParticle.h:22
ThermalParticle::fPDGID
int fPDGID
Definition: ThermalParticle.h:20
ParticleDecay::fDaughters
std::vector< int > fDaughters
Definition: ThermalParticle.h:9
ThermalParticle::GeVtoifm
static const double GeVtoifm
Definition: ThermalParticle.h:17
ThermalParticle::fS
int fS
Definition: ThermalParticle.h:24
ThermalParticle::ReadDecays
void ReadDecays(std::string filename="")
Definition: ThermalParticle.cxx:20
ThermalParticle::CalculatePressure
double CalculatePressure(double T, double muB, double muS, double muQ, double gammaS, double mass=-1., double dMu=0.) const
Definition: ThermalParticle.cxx:182
ThermalParticle::CalculateParticleDensity
double CalculateParticleDensity(double T, double muB, double muS, double muQ, double gammaS, double mass=-1., double dMu=0.) const
Definition: ThermalParticle.cxx:51
ThermalParticle::fDecaysOrig
std::vector< ParticleDecay > fDecaysOrig
Definition: ThermalParticle.h:36
ThermalParticle::fC
int fC
Definition: ThermalParticle.h:26
ThermalParticle::fDecayName
std::string fDecayName
Definition: ThermalParticle.h:34
ThermalParticle::ThermalParticle
ThermalParticle(bool Stable_=true, std::string Name="hadron", int PDGID=0, int SpinDeg=1, int Stat=0, double Mass=0., int Strange=0, int Baryon=0, int Charge=0, double AbsS=0., double Width=0., double Threshold=0., std::string DecayName="pi0", int Charm=0, double AbsC=0., double radius=0.5)
Definition: ThermalParticle.h:38
ThermalParticle::CalculateParticleDensityLaguerre
double CalculateParticleDensityLaguerre(double T, double muB, double muS, double muQ, double gammaS, double mass=-1., double dMu=0.) const
Definition: ThermalParticle.cxx:148
ThermalParticle::~ThermalParticle
~ThermalParticle(void)
Definition: ThermalParticle.cxx:18
ThermalParticle::fAbsC
double fAbsC
Definition: ThermalParticle.h:29
ThermalParticle::RestoreBranchingRatios
void RestoreBranchingRatios()
Definition: ThermalParticle.h:91
ThermalParticle::fThreshold
double fThreshold
Definition: ThermalParticle.h:31
ThermalParticle::fRadius
double fRadius
Definition: ThermalParticle.h:32