CMS 3D CMS Logo

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

#include <StrangeDensity.h>

Public Member Functions

 NAStrangeDensity ()
 
void SetBaryonPotential (double value)
 
void SetNMax (int value)
 
void SetStrangePotential (double value)
 
void SetTemperature (double value)
 
double StrangenessDensity (DatabasePDG *database)
 
 ~NAStrangeDensity ()
 

Private Member Functions

double ParticleNumberDensity (ParticlePDG *particle)
 

Private Attributes

double fBaryonPotential
 
int fNMax
 
double fStrangePotential
 
double fTemperature
 

Detailed Description

Definition at line 23 of file StrangeDensity.h.

Constructor & Destructor Documentation

NAStrangeDensity::NAStrangeDensity ( )

Definition at line 4 of file StrangeDensity.cc.

References fBaryonPotential, fNMax, fStrangePotential, fTemperature, and GeV.

4  {
5  fTemperature = 0.*GeV;
8  fNMax = 5;
9 }
const double GeV
Definition: MathUtil.h:16
double fStrangePotential
NAStrangeDensity::~NAStrangeDensity ( )
inline

Definition at line 37 of file StrangeDensity.h.

37 {};

Member Function Documentation

double NAStrangeDensity::ParticleNumberDensity ( ParticlePDG particle)
private

Definition at line 22 of file StrangeDensity.cc.

References ztail::d, create_public_lumi_plots::exp, fBaryonPotential, fNMax, fStrangePotential, fTemperature, ParticlePDG::GetBaryonNumber(), ParticlePDG::GetMass(), ParticlePDG::GetSpin(), ParticlePDG::GetStrangeness(), HankelKn(), hbarc, gen::n, N_PI, and funct::pow().

Referenced by StrangenessDensity().

22  {
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 +
28  fStrangePotential*particleStrangeness;
29  //compute degeneracy factor
30  double particleDegFactor = 2*pDef->GetSpin() + 1.; // IA: In ParticlePDG() GetSpin() returns spin not 2*spin !!
31  double d = 1.;//for fermions
32  if(int(2*pDef->GetSpin())%2 == 0)//it gives 0 for Spin = 0,2,4,.. and it gives 1 for Spin = 1,3,7,
33  d = -1; //for bosons
34 
35  double prefactor;
36  double postfactor;
37  prefactor = (particleDegFactor*particleMass*particleMass*
39  postfactor = 0.;
40 
41  for(int n = 1; n <= fNMax; n++) {
42  postfactor += pow(-d,n+1)/(n)*exp(n*particleChemPotential/fTemperature)*
43  HankelKn(2,n*particleMass/fTemperature);
44  }
45  return prefactor*postfactor;
46 }
const double hbarc
Definition: MathUtil.h:18
double fStrangePotential
double HankelKn(int n, double x)
tuple d
Definition: ztail.py:151
const double N_PI
Definition: MathUtil.h:19
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void NAStrangeDensity::SetBaryonPotential ( double  value)
inline
void NAStrangeDensity::SetNMax ( int  value)
inline

Definition at line 43 of file StrangeDensity.h.

References fNMax, and relativeConstraints::value.

43  {
44  fNMax = value;
45  if(fNMax < 1) fNMax = 1;
46  }
void NAStrangeDensity::SetStrangePotential ( double  value)
inline
void NAStrangeDensity::SetTemperature ( double  value)
inline
double NAStrangeDensity::StrangenessDensity ( DatabasePDG database)

Definition at line 11 of file StrangeDensity.cc.

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

Referenced by NAStrangePotential::CalculateStrangeDensity().

11  {
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 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:574
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:202
double GetStrangeness()
Definition: ParticlePDG.h:82

Member Data Documentation

double NAStrangeDensity::fBaryonPotential
private

Definition at line 28 of file StrangeDensity.h.

Referenced by NAStrangeDensity(), ParticleNumberDensity(), and SetBaryonPotential().

int NAStrangeDensity::fNMax
private

Definition at line 30 of file StrangeDensity.h.

Referenced by NAStrangeDensity(), ParticleNumberDensity(), and SetNMax().

double NAStrangeDensity::fStrangePotential
private

Definition at line 29 of file StrangeDensity.h.

Referenced by NAStrangeDensity(), ParticleNumberDensity(), and SetStrangePotential().

double NAStrangeDensity::fTemperature
private

Definition at line 27 of file StrangeDensity.h.

Referenced by NAStrangeDensity(), ParticleNumberDensity(), and SetTemperature().