CMS 3D CMS Logo

StrangeDensity.cc
Go to the documentation of this file.
1 
3 
5  fTemperature = 0. * GeV;
6  fBaryonPotential = 0. * GeV;
7  fStrangePotential = 0. * GeV;
8  fNMax = 5;
9 }
10 // compute hadron system strangeness density
12  double meanStrangenessDensity = 0.;
13  for (int particleIndex = 0; particleIndex < database->GetNParticles(); particleIndex++) {
14  ParticlePDG* particle = database->GetPDGParticleByIndex(particleIndex);
15  double particleDensity = ParticleNumberDensity(particle);
16  meanStrangenessDensity += particleDensity * particle->GetStrangeness();
17  }
18  return meanStrangenessDensity;
19 }
20 
21 // compute hadron number density
23  double particleMass = pDef->GetMass();
24  int particleStrangeness = int(pDef->GetStrangeness());
25  double particleBaryon = pDef->GetBaryonNumber();
26  //compute chemical potential
27  double particleChemPotential = fBaryonPotential * particleBaryon + fStrangePotential * particleStrangeness;
28  //compute degeneracy factor
29  double particleDegFactor = 2 * pDef->GetSpin() + 1.; // IA: In ParticlePDG() GetSpin() returns spin not 2*spin !!
30  double d = 1.; //for fermions
31  if (int(2 * pDef->GetSpin()) % 2 == 0) //it gives 0 for Spin = 0,2,4,.. and it gives 1 for Spin = 1,3,7,
32  d = -1; //for bosons
33 
34  double prefactor;
35  double postfactor;
36  prefactor =
37  (particleDegFactor * particleMass * particleMass * fTemperature / hbarc / hbarc / hbarc) / (2. * N_PI * N_PI);
38  postfactor = 0.;
39 
40  for (int n = 1; n <= fNMax; n++) {
41  postfactor += pow(-d, n + 1) / (n)*exp(n * particleChemPotential / fTemperature) *
42  HankelKn(2, n * particleMass / fTemperature);
43  }
44  return prefactor * postfactor;
45 }
const double GeV
Definition: MathUtil.h:16
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
const double hbarc
Definition: MathUtil.h:18
double ParticleNumberDensity(ParticlePDG *particle)
double fStrangePotential
double HankelKn(int n, double x)
double GetSpin()
Definition: ParticlePDG.h:73
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
double GetBaryonNumber()
Definition: ParticlePDG.h:82
d
Definition: ztail.py:151
double StrangenessDensity(DatabasePDG *database)
double GetStrangeness()
Definition: ParticlePDG.h:87
double GetMass()
Definition: ParticlePDG.h:70
const double N_PI
Definition: MathUtil.h:19
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30