CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
GrandCanonical Class Reference

#include <GrandCanonical.h>

Public Member Functions

double BaryonDensity (DatabasePDG *database)
 
void BaryonPotential (double value)
 
double BaryonPotential ()
 
double CharmDensity (DatabasePDG *database)
 
void CharmPotential (double value)
 
double CharmPotential ()
 
double ElectroDensity (DatabasePDG *database)
 
void ElectroPotential (double value)
 
double ElectroPotential ()
 
double EnergyDensity (DatabasePDG *database)
 
 GrandCanonical ()
 
 GrandCanonical (int nmax, double temperature, double baryonPotential, double strangePotential, double electroPotential, double charmPotential)
 
void NMax (int value)
 
int NMax ()
 
double ParticleEnergyDensity (ParticlePDG *particle)
 
double ParticleNumberDensity (ParticlePDG *particle)
 
double StrangeDensity (DatabasePDG *database)
 
void StrangePotential (double value)
 
double StrangePotential ()
 
void Temperature (double value)
 
double Temperature ()
 
 ~GrandCanonical ()
 

Private Attributes

double fBaryonPotential
 
double fCharmPotential
 
double fElectroPotential
 
bool fInitialized
 
int fNMax
 
double fStrangePotential
 
double fTemperature
 

Detailed Description

Definition at line 14 of file GrandCanonical.h.

Constructor & Destructor Documentation

GrandCanonical::GrandCanonical ( )

Definition at line 15 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, and fTemperature.

15  {
16  fInitialized = kFALSE;
17  fNMax = -1111;
18  fTemperature = -1111;
19  fBaryonPotential = -1111;
20  fStrangePotential = -1111;
21  fElectroPotential = -1111;
22  fCharmPotential = -1111;
23 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
GrandCanonical::GrandCanonical ( int  nmax,
double  temperature,
double  baryonPotential,
double  strangePotential,
double  electroPotential,
double  charmPotential 
)

Definition at line 25 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, and fTemperature.

30  {
31  fNMax = nmax;
32  fTemperature = temperature;
33  fBaryonPotential = baryonPotential;
34  fStrangePotential = strangePotential;
35  fElectroPotential = electroPotential;
36  fCharmPotential = charmPotential;
37  fInitialized = kTRUE;
38 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
GrandCanonical::~GrandCanonical ( )

Definition at line 40 of file GrandCanonical.cc.

40 {}

Member Function Documentation

double GrandCanonical::BaryonDensity ( DatabasePDG database)

Definition at line 146 of file GrandCanonical.cc.

References fInitialized, ParticlePDG::GetBaryonNumber(), DatabasePDG::GetNParticles(), DatabasePDG::GetPDGParticleByIndex(), and ParticleNumberDensity().

146  {
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 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
double GetBaryonNumber()
Definition: ParticlePDG.h:82
void GrandCanonical::BaryonPotential ( double  value)

Definition at line 49 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, and relativeConstraints::value.

49  {
51  if (fNMax != -1111 && fTemperature != -1111 && fStrangePotential != -1111 && fElectroPotential != -1111 &&
52  fCharmPotential != -1111)
53  fInitialized = kTRUE;
54 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
double GrandCanonical::BaryonPotential ( )
inline

Definition at line 40 of file GrandCanonical.h.

References fBaryonPotential.

40 { return fBaryonPotential; }
double fBaryonPotential
double GrandCanonical::CharmDensity ( DatabasePDG database)

Definition at line 191 of file GrandCanonical.cc.

References fInitialized, ParticlePDG::GetCharmness(), DatabasePDG::GetNParticles(), DatabasePDG::GetPDGParticleByIndex(), and ParticleNumberDensity().

191  {
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 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
double GetCharmness()
Definition: ParticlePDG.h:88
void GrandCanonical::CharmPotential ( double  value)

Definition at line 70 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, and relativeConstraints::value.

70  {
72  if (fNMax != -1111 && fTemperature != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 &&
73  fElectroPotential != -1111)
74  fInitialized = kTRUE;
75 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
double GrandCanonical::CharmPotential ( )
inline

Definition at line 46 of file GrandCanonical.h.

References fCharmPotential.

46 { return fCharmPotential; }
double fCharmPotential
double GrandCanonical::ElectroDensity ( DatabasePDG database)

Definition at line 175 of file GrandCanonical.cc.

References fInitialized, ParticlePDG::GetElectricCharge(), DatabasePDG::GetNParticles(), DatabasePDG::GetPDGParticleByIndex(), and ParticleNumberDensity().

175  {
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 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
double GetElectricCharge()
Definition: ParticlePDG.h:89
void GrandCanonical::ElectroPotential ( double  value)

Definition at line 63 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, and relativeConstraints::value.

63  {
65  if (fNMax != -1111 && fTemperature != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 &&
66  fCharmPotential != -1111)
67  fInitialized = kTRUE;
68 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
double GrandCanonical::ElectroPotential ( )
inline

Definition at line 44 of file GrandCanonical.h.

References fElectroPotential.

44 { return fElectroPotential; }
double fElectroPotential
double GrandCanonical::EnergyDensity ( DatabasePDG database)

Definition at line 131 of file GrandCanonical.cc.

References fInitialized, DatabasePDG::GetNParticles(), DatabasePDG::GetPDGParticleByIndex(), and ParticleEnergyDensity().

131  {
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 }
double ParticleEnergyDensity(ParticlePDG *particle)
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
void GrandCanonical::NMax ( int  value)

Definition at line 77 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, and relativeConstraints::value.

77  {
78  fNMax = value;
79  if (fTemperature != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 && fElectroPotential != -1111 &&
80  fCharmPotential != -1111)
81  fInitialized = kTRUE;
82 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
int GrandCanonical::NMax ( )
inline

Definition at line 49 of file GrandCanonical.h.

References fNMax.

49 { return fNMax; }
double GrandCanonical::ParticleEnergyDensity ( ParticlePDG particle)

Definition at line 84 of file GrandCanonical.cc.

References ztail::d, fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, ParticlePDG::GetBaryonNumber(), ParticlePDG::GetCharmness(), ParticlePDG::GetElectricCharge(), ParticlePDG::GetMass(), ParticlePDG::GetSpin(), ParticlePDG::GetStrangeness(), HankelK1(), HankelKn(), hbarc, ResonanceBuilder::mass, dqmiodumpmetadata::n, and Pi.

Referenced by EnergyDensity().

84  {
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 }
const double Pi
const double hbarc
Definition: MathUtil.h:18
double HankelKn(int n, double x)
double fStrangePotential
tuple d
Definition: ztail.py:151
double GetSpin()
Definition: ParticlePDG.h:73
double GetCharmness()
Definition: ParticlePDG.h:88
double GetElectricCharge()
Definition: ParticlePDG.h:89
double fBaryonPotential
double fElectroPotential
double GetBaryonNumber()
Definition: ParticlePDG.h:82
double HankelK1(double x)
double GetStrangeness()
Definition: ParticlePDG.h:87
double fCharmPotential
double GetMass()
Definition: ParticlePDG.h:70
double GrandCanonical::ParticleNumberDensity ( ParticlePDG particle)

Definition at line 109 of file GrandCanonical.cc.

References ztail::d, fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, ParticlePDG::GetBaryonNumber(), ParticlePDG::GetCharmness(), ParticlePDG::GetElectricCharge(), ParticlePDG::GetMass(), ParticlePDG::GetSpin(), ParticlePDG::GetStrangeness(), HankelKn(), hbarc, ResonanceBuilder::mass, dqmiodumpmetadata::n, and Pi.

Referenced by BaryonDensity(), CharmDensity(), ElectroDensity(), gen::Hydjet2Hadronizer::initializeForInternalPartons(), and StrangeDensity().

109  {
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 }
const double Pi
const double hbarc
Definition: MathUtil.h:18
double HankelKn(int n, double x)
double fStrangePotential
tuple d
Definition: ztail.py:151
double GetSpin()
Definition: ParticlePDG.h:73
double GetCharmness()
Definition: ParticlePDG.h:88
double GetElectricCharge()
Definition: ParticlePDG.h:89
double fBaryonPotential
double fElectroPotential
double GetBaryonNumber()
Definition: ParticlePDG.h:82
double GetStrangeness()
Definition: ParticlePDG.h:87
double fCharmPotential
double GetMass()
Definition: ParticlePDG.h:70
double GrandCanonical::StrangeDensity ( DatabasePDG database)

Definition at line 160 of file GrandCanonical.cc.

References fInitialized, DatabasePDG::GetNParticles(), DatabasePDG::GetPDGParticleByIndex(), ParticlePDG::GetStrangeness(), and ParticleNumberDensity().

160  {
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 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
double GetStrangeness()
Definition: ParticlePDG.h:87
void GrandCanonical::StrangePotential ( double  value)

Definition at line 56 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, and relativeConstraints::value.

56  {
58  if (fNMax != -1111 && fTemperature != -1111 && fBaryonPotential != -1111 && fElectroPotential != -1111 &&
59  fCharmPotential != -1111)
60  fInitialized = kTRUE;
61 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
double GrandCanonical::StrangePotential ( )
inline

Definition at line 42 of file GrandCanonical.h.

References fStrangePotential.

42 { return fStrangePotential; }
double fStrangePotential
void GrandCanonical::Temperature ( double  value)

Definition at line 42 of file GrandCanonical.cc.

References fBaryonPotential, fCharmPotential, fElectroPotential, fInitialized, fNMax, fStrangePotential, fTemperature, and relativeConstraints::value.

42  {
44  if (fNMax != -1111 && fBaryonPotential != -1111 && fStrangePotential != -1111 && fElectroPotential != -1111 &&
45  fCharmPotential != -1111)
46  fInitialized = kTRUE;
47 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
double GrandCanonical::Temperature ( )
inline

Definition at line 38 of file GrandCanonical.h.

References fTemperature.

38 { return fTemperature; }

Member Data Documentation

double GrandCanonical::fBaryonPotential
private
double GrandCanonical::fCharmPotential
private
double GrandCanonical::fElectroPotential
private
bool GrandCanonical::fInitialized
private
int GrandCanonical::fNMax
private
double GrandCanonical::fStrangePotential
private
double GrandCanonical::fTemperature
private