CbmRoot
ThermalModelBase.h
Go to the documentation of this file.
1 #ifndef THERMALMODELBASE_H
2 #define THERMALMODELBASE_H
3 #include "HagedornSpectrum.h"
5 
7  double T, muB, muS, muQ, gammaS, V, R;
8  ThermalModelParameters(double T_ = 0.1,
9  double muB_ = 0.5,
10  double muS_ = 0.,
11  double muQ_ = 0.,
12  double gammaS_ = 1.,
13  double V_ = 4000.,
14  double R_ = 1.)
15  : T(T_), muB(muB_), muS(muS_), muQ(muQ_), gammaS(gammaS_), V(V_), R(R_) {}
16 };
17 
19 public:
22  bool fUseWidth;
27  double QBgoal;
28  double fVolume;
29 
30  bool useOpenMP;
31 
32  std::vector<double> densities;
33  std::vector<double> densitiestotal;
34 
37 
39  double T = 0.125,
40  double muB = 0.45,
41  double muS = 0.1,
42  double muQ = -0.01,
43  double gammaS = 1.,
44  double V = 4000.,
45  double R = 1.)
46  : TPS(TPS_)
47  , Parameters(T, muB, muS, muQ, gammaS, V, R)
48  , fUseWidth(false)
49  , fCalculated(false)
50  , fNormBratio(false)
51  , fQuantumStats(true)
52  , fUseHagedorn(false)
53  , QBgoal(0.4)
54  , fVolume(V)
55  , useOpenMP(0)
56  , densities()
57  , densitiestotal()
58  , fHag()
59  , fHagedornDensity(0.) {
60  // QBgoal = 0.4;
61  // fVolume = V;
62  Parameters.muS = muB / 5.;
63  Parameters.muQ = -muB / 50.;
64  // fUseHagedorn = false;
65  }
66  ThermalModelBase(/*std::string InputFile="",*/ ThermalParticleSystem* TPS_,
67  const ThermalModelParameters& params)
68  : TPS(TPS_)
69  , Parameters(params)
70  , fUseWidth(false)
71  , fCalculated(false)
72  , fNormBratio(false)
73  , fQuantumStats(true)
74  , fUseHagedorn(false)
75  , QBgoal(0.4)
76  , fVolume(4000.)
77  , useOpenMP(0)
78  , densities()
79  , densitiestotal()
80  , fHag()
81  , fHagedornDensity(0.) {
82  // QBgoal = 0.4;
83  }
84  virtual ~ThermalModelBase(void) {}
85  void SetUseWidth(bool useWidth) { fUseWidth = useWidth; }
86  void SetNormBratio(bool normBratio) {
87  if (normBratio != fNormBratio) {
88  fNormBratio = normBratio;
89  if (fNormBratio)
91  else
93  }
94  }
95  void SetOMP(bool openMP) { useOpenMP = openMP; }
96  void SetHagedorn(bool useHagedorn,
97  double M0 = 3.,
98  double TH = 0.160,
99  double a = 3.,
100  double C = 1.) {
101  fUseHagedorn = useHagedorn;
102  if (useHagedorn) fHag = HagedornSpectrum(M0, TH, a, C);
103  }
104  virtual void SetParameters(double T,
105  double muB,
106  double muS,
107  double muQ,
108  double gammaS,
109  double V,
110  double R) {
111  Parameters.T = T;
112  Parameters.muB = muB;
113  Parameters.muS = muS;
114  Parameters.muQ = muQ;
115  Parameters.gammaS = gammaS;
116  Parameters.V = V;
117  Parameters.R = R;
118  fVolume = 4000.;
119  fCalculated = false;
120  }
121  virtual void SetParameters(const ThermalModelParameters& params) {
122  Parameters = params;
123  fCalculated = false;
124  }
125  virtual void ChangeTPS(ThermalParticleSystem* TPS_) {
126  TPS = TPS_;
127  fCalculated = false;
128  }
129 
130  // 0 - Boltzmann, 1 - Quantum
131  virtual void SetStatistics(bool stats) {
132  fQuantumStats = stats;
133  for (unsigned int i = 0; i < TPS->fParticles.size(); ++i)
134  TPS->fParticles[i].useStatistics(stats);
135  }
136 
137 
138  void SetQBgoal(double QB) { QBgoal = QB; }
139  void SetVolume(double Volume) {
140  fVolume = Volume;
141  Parameters.V = Volume;
142  }
143  virtual void FixParameters() {}
144  virtual void FixParameters(double) {} // And zero net strangeness
145  virtual void CalculateDensities() {}
146  virtual double CalculateHadronDensity() = 0;
147  virtual double GetParticlePrimordialDensity(int) = 0;
148  virtual double GetParticleTotalDensity(int) = 0;
149  virtual double CalculateBaryonDensity() = 0;
150  virtual double CalculateChargeDensity() = 0;
151  virtual double CalculateStrangenessDensity() = 0;
152  virtual double CalculateCharmDensity() = 0;
154  virtual double CalculateAbsoluteCharmDensity() = 0;
155  virtual double CalculateEnergyDensity() = 0;
156  virtual double CalculateEntropyDensity() = 0;
159  virtual double CalculatePressure() = 0;
160  virtual double CalculateShearViscosity() = 0;
161 
164 };
165 
166 #endif // THERMALMODELBASE_H
ThermalModelParameters::muS
double muS
Definition: ThermalModelBase.h:7
ThermalModelBase::CalculateShearViscosity
virtual double CalculateShearViscosity()=0
ThermalParticleSystem::fParticles
std::vector< ThermalParticle > fParticles
Definition: ThermalParticleSystem.h:9
ThermalModelBase::CalculateHadronDensity
virtual double CalculateHadronDensity()=0
ThermalModelBase::densitiestotal
std::vector< double > densitiestotal
Definition: ThermalModelBase.h:33
ThermalModelBase::GetParticleTotalDensity
virtual double GetParticleTotalDensity(int)=0
ThermalModelBase::CalculateAbsoluteCharmDensity
virtual double CalculateAbsoluteCharmDensity()=0
ThermalModelBase::ThermalModelBase
ThermalModelBase(ThermalParticleSystem *TPS_, const ThermalModelParameters &params)
Definition: ThermalModelBase.h:66
ThermalModelBase::QBgoal
double QBgoal
Definition: ThermalModelBase.h:27
ThermalModelBase::ThermalModelBase
ThermalModelBase(ThermalParticleSystem *TPS_, double T=0.125, double muB=0.45, double muS=0.1, double muQ=-0.01, double gammaS=1., double V=4000., double R=1.)
Definition: ThermalModelBase.h:38
ThermalModelParameters::ThermalModelParameters
ThermalModelParameters(double T_=0.1, double muB_=0.5, double muS_=0., double muQ_=0., double gammaS_=1., double V_=4000., double R_=1.)
Definition: ThermalModelBase.h:8
ThermalModelBase::SetOMP
void SetOMP(bool openMP)
Definition: ThermalModelBase.h:95
ThermalModelParameters::V
double V
Definition: ThermalModelBase.h:7
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
ThermalParticleSystem::NormalizeBranchingRatios
void NormalizeBranchingRatios()
Definition: ThermalParticleSystem.h:30
ThermalModelParameters::gammaS
double gammaS
Definition: ThermalModelBase.h:7
ThermalModelBase::useOpenMP
bool useOpenMP
Definition: ThermalModelBase.h:30
ThermalModelBase::SetVolume
void SetVolume(double Volume)
Definition: ThermalModelBase.h:139
ThermalModelBase::SetParameters
virtual void SetParameters(double T, double muB, double muS, double muQ, double gammaS, double V, double R)
Definition: ThermalModelBase.h:104
ThermalModelBase::CalculateEntropyDensity
virtual double CalculateEntropyDensity()=0
ThermalModelBase::SetQBgoal
void SetQBgoal(double QB)
Definition: ThermalModelBase.h:138
ThermalParticleSystem.h
ThermalModelBase::CalculateCharmDensity
virtual double CalculateCharmDensity()=0
ThermalModelBase::CalculateChargeDensity
virtual double CalculateChargeDensity()=0
ThermalModelBase::SetUseWidth
void SetUseWidth(bool useWidth)
Definition: ThermalModelBase.h:85
ThermalModelBase::operator=
ThermalModelBase & operator=(const ThermalModelBase &)
ThermalModelBase::fVolume
double fVolume
Definition: ThermalModelBase.h:28
ThermalModelBase
Definition: ThermalModelBase.h:18
ThermalModelBase::FixParameters
virtual void FixParameters()
Definition: ThermalModelBase.h:143
ThermalModelBase::ChangeTPS
virtual void ChangeTPS(ThermalParticleSystem *TPS_)
Definition: ThermalModelBase.h:125
ThermalModelBase::SetParameters
virtual void SetParameters(const ThermalModelParameters &params)
Definition: ThermalModelBase.h:121
ThermalModelBase::TPS
ThermalParticleSystem * TPS
Definition: ThermalModelBase.h:20
ThermalModelBase::~ThermalModelBase
virtual ~ThermalModelBase(void)
Definition: ThermalModelBase.h:84
ThermalModelBase::fCalculated
bool fCalculated
Definition: ThermalModelBase.h:23
ThermalModelParameters::muB
double muB
Definition: ThermalModelBase.h:7
ThermalModelBase::FixParameters
virtual void FixParameters(double)
Definition: ThermalModelBase.h:144
HagedornSpectrum.h
ThermalModelBase::fUseWidth
bool fUseWidth
Definition: ThermalModelBase.h:22
ThermalModelBase::fNormBratio
bool fNormBratio
Definition: ThermalModelBase.h:24
ThermalModelBase::SetStatistics
virtual void SetStatistics(bool stats)
Definition: ThermalModelBase.h:131
ThermalModelParameters::T
double T
Definition: ThermalModelBase.h:7
ThermalModelBase::fHagedornDensity
double fHagedornDensity
Definition: ThermalModelBase.h:36
ThermalModelBase::CalculateAbsoluteStrangenessDensity
virtual double CalculateAbsoluteStrangenessDensity()=0
ThermalModelBase::CalculateBaryonDensity
virtual double CalculateBaryonDensity()=0
ThermalModelBase::SetHagedorn
void SetHagedorn(bool useHagedorn, double M0=3., double TH=0.160, double a=3., double C=1.)
Definition: ThermalModelBase.h:96
ThermalModelBase::CalculatePressure
virtual double CalculatePressure()=0
ThermalModelBase::CalculateStrangenessDensity
virtual double CalculateStrangenessDensity()=0
HagedornSpectrum
Definition: HagedornSpectrum.h:7
ThermalParticleSystem::RestoreBranchingRatios
void RestoreBranchingRatios()
Definition: ThermalParticleSystem.h:35
ThermalModelBase::CalculateEnergyDensity
virtual double CalculateEnergyDensity()=0
ThermalModelBase::SetNormBratio
void SetNormBratio(bool normBratio)
Definition: ThermalModelBase.h:86
ThermalParticleSystem
Definition: ThermalParticleSystem.h:7
ThermalModelBase::fUseHagedorn
bool fUseHagedorn
Definition: ThermalModelBase.h:26
ThermalModelParameters
Definition: ThermalModelBase.h:6
ThermalModelBase::fHag
HagedornSpectrum fHag
Definition: ThermalModelBase.h:35
ThermalModelParameters::R
double R
Definition: ThermalModelBase.h:7
ThermalModelParameters::muQ
double muQ
Definition: ThermalModelBase.h:7
ThermalModelBase::densities
std::vector< double > densities
Definition: ThermalModelBase.h:32
ThermalModelBase::GetParticlePrimordialDensity
virtual double GetParticlePrimordialDensity(int)=0
ThermalModelBase::CalculateMesonMatterEntropyDensity
virtual double CalculateMesonMatterEntropyDensity()=0
ThermalModelBase::ThermalModelBase
ThermalModelBase(const ThermalModelBase &)
ThermalModelBase::Parameters
ThermalModelParameters Parameters
Definition: ThermalModelBase.h:21
ThermalModelBase::CalculateDensities
virtual void CalculateDensities()
Definition: ThermalModelBase.h:145
ThermalModelBase::CalculateBaryonMatterEntropyDensity
virtual double CalculateBaryonMatterEntropyDensity()=0
ThermalModelBase::fQuantumStats
bool fQuantumStats
Definition: ThermalModelBase.h:25