CMS 3D CMS Logo

GrandCanonical.cc
Go to the documentation of this file.
1 /*
2 
3 Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna
4 amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru
5 November. 2, 2005
6 
7 */
8 #include <iostream>
9 #include <TMath.h>
10 
14 
16  fInitialized = kFALSE;
17  fNMax = -1111;
18  fTemperature = -1111;
19  fBaryonPotential = -1111;
20  fStrangePotential = -1111;
21  fElectroPotential = -1111;
22  fCharmPotential = -1111;
23 }
24 
26  double temperature,
27  double baryonPotential,
28  double strangePotential,
29  double electroPotential,
30  double charmPotential) {
31  fNMax = nmax;
33  fBaryonPotential = baryonPotential;
34  fStrangePotential = strangePotential;
35  fElectroPotential = electroPotential;
36  fCharmPotential = charmPotential;
37  fInitialized = kTRUE;
38 }
39 
41 
44  if (fNMax != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 && fElectroPotential != -1111 &&
45  fCharmPotential != -1111)
46  fInitialized = kTRUE;
47 }
48 
51  if (fNMax != -1111 && fTemperature != -1111 && fStrangePotential != -1111 && fElectroPotential != -1111 &&
52  fCharmPotential != -1111)
53  fInitialized = kTRUE;
54 }
55 
58  if (fNMax != -1111 && fTemperature != -1111 && fBaryonPotential != -1111 && fElectroPotential != -1111 &&
59  fCharmPotential != -1111)
60  fInitialized = kTRUE;
61 }
62 
65  if (fNMax != -1111 && fTemperature != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 &&
66  fCharmPotential != -1111)
67  fInitialized = kTRUE;
68 }
69 
72  if (fNMax != -1111 && fTemperature != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 &&
73  fElectroPotential != -1111)
74  fInitialized = kTRUE;
75 }
76 
78  fNMax = value;
79  if (fTemperature != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 && fElectroPotential != -1111 &&
80  fCharmPotential != -1111)
81  fInitialized = kTRUE;
82 }
83 
85  // Check if all the thermodinamic parameters are set
86  if (!fInitialized)
87  Fatal("GrandCanonical::ParticleEnergyDensity", "GrandCanonical object not fully initialized!!");
88 
89  // Compute the particle energy density
90  double degFactor = 2. * particle->GetSpin() + 1.; // degeneracy factor
91  double mass = particle->GetMass(); // PDG table mass
92  double d = int(2. * particle->GetSpin()) & 1 ? 1. : -1; // Bose-Einstein/Fermi-Dirac factor
93  double preFactor = (degFactor * mass * mass * fTemperature * fTemperature / hbarc / hbarc / hbarc) /
94  (2. * TMath::Pi() * TMath::Pi());
95 
96  double postFactor = 0.;
97  //compute chemical potential
98  double potential = fBaryonPotential * particle->GetBaryonNumber() + fStrangePotential * particle->GetStrangeness() +
100 
101  for (int n = 1; n <= fNMax; ++n) {
102  postFactor +=
103  TMath::Power(-d, n + 1) / (n * n) * TMath::Exp(n * potential / fTemperature) *
104  (3. * HankelKn(2, n * mass / fTemperature) + n * mass / fTemperature * HankelK1(n * mass / fTemperature));
105  }
106  return preFactor * postFactor;
107 }
108 
110  // Check if all the thermodinamic parameters are set
111  if (!fInitialized)
112  Fatal("GrandCanonical::ParticleNumberDensity", "GrandCanonical object not fully initialized!!");
113 
114  double degFactor = 2. * particle->GetSpin() + 1.;
115  double mass = particle->GetMass();
116  double d = int(2 * particle->GetSpin()) & 1 ? 1. : -1.;
117  double preFactor =
118  (degFactor * mass * mass * fTemperature / hbarc / hbarc / hbarc) / (2. * TMath::Pi() * TMath::Pi());
119 
120  double postFactor = 0.;
121  double potential = fBaryonPotential * particle->GetBaryonNumber() + fStrangePotential * particle->GetStrangeness() +
122  fElectroPotential * particle->GetElectricCharge() + fCharmPotential * particle->GetCharmness();
123 
124  for (int n = 1; n <= fNMax; ++n) {
125  postFactor +=
126  TMath::Power(-d, n + 1) / n * TMath::Exp(n * potential / fTemperature) * HankelKn(2, n * mass / fTemperature);
127  }
128  return preFactor * postFactor;
129 }
130 
132  // Check if all the thermodinamic parameters are set
133  if (!fInitialized)
134  Fatal("GrandCanonical::EnergyDensity", "GrandCanonical object not fully initialized!!");
135 
136  double meanEnergyDensity = 0.;
137 
138  for (int currParticle = 0; currParticle < database->GetNParticles(); currParticle++) {
139  ParticlePDG* particle = database->GetPDGParticleByIndex(currParticle);
140  meanEnergyDensity += ParticleEnergyDensity(particle);
141  }
142 
143  return meanEnergyDensity;
144 }
145 
147  // Check if all the thermodinamic parameters are set
148  if (!fInitialized)
149  Fatal("GrandCanonical::BaryonDensity", "GrandCanonical object not fully initialized!!");
150 
151  double meanBaryonDensity = 0.;
152 
153  for (int currParticle = 0; currParticle < database->GetNParticles(); currParticle++) {
154  ParticlePDG* particle = database->GetPDGParticleByIndex(currParticle);
155  meanBaryonDensity += ParticleNumberDensity(particle) * particle->GetBaryonNumber();
156  }
157  return meanBaryonDensity;
158 }
159 
161  // Check if all the thermodinamic parameters are set
162  if (!fInitialized)
163  Fatal("GrandCanonical::StrangeDensity", "GrandCanonical object not fully initialized!!");
164 
165  double meanStrangeDensity = 0.;
166 
167  for (int currParticle = 0; currParticle < database->GetNParticles(); currParticle++) {
168  ParticlePDG* particle = database->GetPDGParticleByIndex(currParticle);
169  meanStrangeDensity += ParticleNumberDensity(particle) * particle->GetStrangeness();
170  }
171 
172  return meanStrangeDensity;
173 }
174 
176  // Check if all the thermodinamic parameters are set
177  if (!fInitialized)
178  Fatal("GrandCanonical::ElectroDensity", "GrandCanonical object not fully initialized!!");
179 
180  double meanElectroDensity = 0.;
181 
182  //hadrons
183  for (int currParticle = 0; currParticle < database->GetNParticles(); currParticle++) {
184  ParticlePDG* particle = database->GetPDGParticleByIndex(currParticle);
185  meanElectroDensity += ParticleNumberDensity(particle) * particle->GetElectricCharge();
186  }
187 
188  return meanElectroDensity;
189 }
190 
192  // Check if all the thermodinamic parameters are set
193  if (!fInitialized)
194  Fatal("GrandCanonical::CharmDensity", "GrandCanonical object not fully initialized!!");
195 
196  double meanCharmDensity = 0.;
197 
198  for (int currParticle = 0; currParticle < database->GetNParticles(); currParticle++) {
199  ParticlePDG* particle = database->GetPDGParticleByIndex(currParticle);
200  meanCharmDensity += ParticleNumberDensity(particle) * particle->GetCharmness();
201  }
202 
203  return meanCharmDensity;
204 }
GrandCanonical::fCharmPotential
double fCharmPotential
Definition: GrandCanonical.h:20
GrandCanonical::fBaryonPotential
double fBaryonPotential
Definition: GrandCanonical.h:17
GrandCanonical::fElectroPotential
double fElectroPotential
Definition: GrandCanonical.h:19
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
GrandCanonical::BaryonPotential
double BaryonPotential()
Definition: GrandCanonical.h:40
GrandCanonical::CharmPotential
double CharmPotential()
Definition: GrandCanonical.h:46
GrandCanonical::fNMax
int fNMax
Definition: GrandCanonical.h:24
DatabasePDG::GetNParticles
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
GrandCanonical::ParticleEnergyDensity
double ParticleEnergyDensity(ParticlePDG *particle)
Definition: GrandCanonical.cc:84
DatabasePDG::GetPDGParticleByIndex
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
UKUtility.h
GrandCanonical::fStrangePotential
double fStrangePotential
Definition: GrandCanonical.h:18
ParticlePDG::GetStrangeness
double GetStrangeness()
Definition: ParticlePDG.h:87
ParticlePDG
Definition: ParticlePDG.h:24
GrandCanonical::CharmDensity
double CharmDensity(DatabasePDG *database)
Definition: GrandCanonical.cc:191
GrandCanonical.h
GrandCanonical::ParticleNumberDensity
double ParticleNumberDensity(ParticlePDG *particle)
Definition: GrandCanonical.cc:109
HankelKn
double HankelKn(int n, double x)
Definition: HankelFunction.cc:202
ParticlePDG::GetCharmness
double GetCharmness()
Definition: ParticlePDG.h:88
GrandCanonical::fTemperature
double fTemperature
Definition: GrandCanonical.h:16
HankelK1
double HankelK1(double x)
Definition: HankelFunction.cc:169
GrandCanonical::EnergyDensity
double EnergyDensity(DatabasePDG *database)
Definition: GrandCanonical.cc:131
createfilelist.int
int
Definition: createfilelist.py:10
hbarc
const double hbarc
Definition: MathUtil.h:18
HankelFunction.h
value
Definition: value.py:1
ParticlePDG::GetSpin
double GetSpin()
Definition: ParticlePDG.h:73
GrandCanonical::BaryonDensity
double BaryonDensity(DatabasePDG *database)
Definition: GrandCanonical.cc:146
GrandCanonical::StrangeDensity
double StrangeDensity(DatabasePDG *database)
Definition: GrandCanonical.cc:160
ParticlePDG::GetMass
double GetMass()
Definition: ParticlePDG.h:70
jvcParameters_cfi.temperature
temperature
Definition: jvcParameters_cfi.py:7
GrandCanonical::GrandCanonical
GrandCanonical()
Definition: GrandCanonical.cc:15
ParticlePDG::GetElectricCharge
double GetElectricCharge()
Definition: ParticlePDG.h:89
GrandCanonical::fInitialized
bool fInitialized
Definition: GrandCanonical.h:25
GrandCanonical::ElectroPotential
double ElectroPotential()
Definition: GrandCanonical.h:44
GrandCanonical::~GrandCanonical
~GrandCanonical()
Definition: GrandCanonical.cc:40
GrandCanonical::ElectroDensity
double ElectroDensity(DatabasePDG *database)
Definition: GrandCanonical.cc:175
relativeConstraints.value
value
Definition: relativeConstraints.py:53
DatabasePDG
Definition: DatabasePDG.h:34
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
ParticlePDG::GetBaryonNumber
double GetBaryonNumber()
Definition: ParticlePDG.h:82
GrandCanonical::NMax
int NMax()
Definition: GrandCanonical.h:49
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
GrandCanonical::StrangePotential
double StrangePotential()
Definition: GrandCanonical.h:42
ztail.d
d
Definition: ztail.py:151
GrandCanonical::Temperature
double Temperature()
Definition: GrandCanonical.h:38