CMS 3D CMS Logo

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, fTemperature, and jvcParameters_cfi::temperature.

25  {
26  fNMax = nmax;
28  fBaryonPotential = baryonPotential;
29  fStrangePotential = strangePotential;
30  fElectroPotential = electroPotential;
31  fCharmPotential = charmPotential;
32  fInitialized = kTRUE;
33 }
double fStrangePotential
double fBaryonPotential
double fElectroPotential
double fCharmPotential
GrandCanonical::~GrandCanonical ( )

Definition at line 35 of file GrandCanonical.cc.

35 {}

Member Function Documentation

double GrandCanonical::BaryonDensity ( DatabasePDG database)

Definition at line 140 of file GrandCanonical.cc.

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

Referenced by NMax().

140  {
141  // Check if all the thermodinamic parameters are set
142  if(!fInitialized)
143  Fatal("GrandCanonical::BaryonDensity", "GrandCanonical object not fully initialized!!");
144 
145  double meanBaryonDensity = 0.;
146 
147  for(int currParticle = 0; currParticle<database->GetNParticles(); currParticle++) {
148  ParticlePDG *particle = database->GetPDGParticleByIndex(currParticle);
149  meanBaryonDensity += ParticleNumberDensity(particle)*particle->GetBaryonNumber();
150  }
151  return meanBaryonDensity;
152 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:574
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:202
double GetBaryonNumber()
Definition: ParticlePDG.h:80
void GrandCanonical::BaryonPotential ( double  value)
double GrandCanonical::BaryonPotential ( )
inline

Definition at line 37 of file GrandCanonical.h.

References fBaryonPotential, and StrangePotential().

Referenced by Temperature().

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

Definition at line 185 of file GrandCanonical.cc.

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

Referenced by NMax().

185  {
186  // Check if all the thermodinamic parameters are set
187  if(!fInitialized)
188  Fatal("GrandCanonical::CharmDensity", "GrandCanonical object not fully initialized!!");
189 
190  double meanCharmDensity = 0.;
191 
192  for(int currParticle = 0; currParticle<database->GetNParticles(); currParticle++) {
193  ParticlePDG *particle = database->GetPDGParticleByIndex(currParticle);
194  meanCharmDensity += ParticleNumberDensity(particle)*particle->GetCharmness();
195  }
196 
197  return meanCharmDensity;
198 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:574
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:202
double GetCharmness()
Definition: ParticlePDG.h:83
void GrandCanonical::CharmPotential ( double  value)
double GrandCanonical::CharmPotential ( )
inline

Definition at line 43 of file GrandCanonical.h.

References fCharmPotential, and NMax().

Referenced by ElectroPotential().

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

Definition at line 169 of file GrandCanonical.cc.

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

Referenced by NMax().

169  {
170  // Check if all the thermodinamic parameters are set
171  if(!fInitialized)
172  Fatal("GrandCanonical::ElectroDensity", "GrandCanonical object not fully initialized!!");
173 
174  double meanElectroDensity = 0.;
175 
176  //hadrons
177  for(int currParticle = 0; currParticle<database->GetNParticles(); currParticle++) {
178  ParticlePDG *particle = database->GetPDGParticleByIndex(currParticle);
179  meanElectroDensity += ParticleNumberDensity(particle)*particle->GetElectricCharge();
180  }
181 
182  return meanElectroDensity;
183 }
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:574
double ParticleNumberDensity(ParticlePDG *particle)
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:202
double GetElectricCharge()
Definition: ParticlePDG.h:84
void GrandCanonical::ElectroPotential ( double  value)
double GrandCanonical::ElectroPotential ( )
inline

Definition at line 41 of file GrandCanonical.h.

References CharmPotential(), and fElectroPotential.

Referenced by StrangePotential().

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

Definition at line 125 of file GrandCanonical.cc.

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

Referenced by NMax().

125  {
126  // Check if all the thermodinamic parameters are set
127  if(!fInitialized)
128  Fatal("GrandCanonical::EnergyDensity", "GrandCanonical object not fully initialized!!");
129 
130  double meanEnergyDensity = 0.;
131 
132  for(int currParticle = 0; currParticle<database->GetNParticles(); currParticle++) {
133  ParticlePDG *particle = database->GetPDGParticleByIndex(currParticle);
134  meanEnergyDensity += ParticleEnergyDensity(particle);
135  }
136 
137  return meanEnergyDensity;
138 }
double ParticleEnergyDensity(ParticlePDG *particle)
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:574
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:202
void GrandCanonical::NMax ( int  value)
int GrandCanonical::NMax ( )
inline
double GrandCanonical::ParticleEnergyDensity ( ParticlePDG particle)

Definition at line 74 of file GrandCanonical.cc.

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

Referenced by EnergyDensity(), and NMax().

74  {
75  // Check if all the thermodinamic parameters are set
76  if(!fInitialized)
77  Fatal("GrandCanonical::ParticleEnergyDensity", "GrandCanonical object not fully initialized!!");
78 
79  // Compute the particle energy density
80  double degFactor = 2.*particle->GetSpin() + 1.; // degeneracy factor
81  double mass = particle->GetMass(); // PDG table mass
82  double d = int(2.*particle->GetSpin()) & 1 ? 1. : -1; // Bose-Einstein/Fermi-Dirac factor
83  double preFactor = (degFactor*mass*mass*fTemperature*fTemperature/hbarc/hbarc/hbarc)/(2.*TMath::Pi()*TMath::Pi());
84 
85  double postFactor = 0.;
86  //compute chemical potential
87  double potential = fBaryonPotential * particle->GetBaryonNumber() +
88  fStrangePotential * particle->GetStrangeness() +
89  fElectroPotential * particle->GetElectricCharge() +
90  fCharmPotential * particle->GetCharmness();
91 
92  for(int n = 1; n <= fNMax; ++n) {
93  postFactor += TMath::Power(-d, n+1)/(n*n) *
94  TMath::Exp(n*potential/fTemperature) *
95  (3.*HankelKn(2, n*mass/fTemperature) + n*mass/fTemperature*HankelK1(n*mass/fTemperature));
96  }
97  return preFactor * postFactor;
98 }
const double Pi
const double hbarc
Definition: MathUtil.h:18
double HankelKn(int n, double x)
double fStrangePotential
double GetSpin()
Definition: ParticlePDG.h:71
double GetCharmness()
Definition: ParticlePDG.h:83
double GetElectricCharge()
Definition: ParticlePDG.h:84
double fBaryonPotential
double fElectroPotential
double GetBaryonNumber()
Definition: ParticlePDG.h:80
double HankelK1(double x)
double GetStrangeness()
Definition: ParticlePDG.h:82
double fCharmPotential
double GetMass()
Definition: ParticlePDG.h:68
double GrandCanonical::ParticleNumberDensity ( ParticlePDG particle)

Definition at line 100 of file GrandCanonical.cc.

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

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

100  {
101  // Check if all the thermodinamic parameters are set
102  if(!fInitialized)
103  Fatal("GrandCanonical::ParticleNumberDensity", "GrandCanonical object not fully initialized!!");
104 
105  double degFactor = 2.*particle->GetSpin() + 1.;
106  double mass = particle->GetMass();
107  double d = int(2*particle->GetSpin()) & 1 ? 1. : -1.;
108  double preFactor = (degFactor*mass*mass*fTemperature/hbarc/hbarc/hbarc)/(2.*TMath::Pi()*TMath::Pi());
109 
110  double postFactor = 0.;
111  double potential = fBaryonPotential * particle->GetBaryonNumber() +
112  fStrangePotential * particle->GetStrangeness() +
113  fElectroPotential * particle->GetElectricCharge() +
114  fCharmPotential * particle->GetCharmness();
115 
116  for(int n = 1; n <= fNMax; ++n) {
117  postFactor += TMath::Power(-d, n+1)/n *
118  TMath::Exp(n*potential/fTemperature) *
119  HankelKn(2, n*mass/fTemperature);
120  }
121  return preFactor * postFactor;
122 }
const double Pi
const double hbarc
Definition: MathUtil.h:18
double HankelKn(int n, double x)
double fStrangePotential
double GetSpin()
Definition: ParticlePDG.h:71
double GetCharmness()
Definition: ParticlePDG.h:83
double GetElectricCharge()
Definition: ParticlePDG.h:84
double fBaryonPotential
double fElectroPotential
double GetBaryonNumber()
Definition: ParticlePDG.h:80
double GetStrangeness()
Definition: ParticlePDG.h:82
double fCharmPotential
double GetMass()
Definition: ParticlePDG.h:68
double GrandCanonical::StrangeDensity ( DatabasePDG database)

Definition at line 154 of file GrandCanonical.cc.

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

Referenced by NMax().

154  {
155  // Check if all the thermodinamic parameters are set
156  if(!fInitialized)
157  Fatal("GrandCanonical::StrangeDensity", "GrandCanonical object not fully initialized!!");
158 
159  double meanStrangeDensity = 0.;
160 
161  for(int currParticle = 0; currParticle<database->GetNParticles(); currParticle++) {
162  ParticlePDG *particle = database->GetPDGParticleByIndex(currParticle);
163  meanStrangeDensity += ParticleNumberDensity(particle)*particle->GetStrangeness();
164  }
165 
166  return meanStrangeDensity;
167 }
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
void GrandCanonical::StrangePotential ( double  value)
double GrandCanonical::StrangePotential ( )
inline

Definition at line 39 of file GrandCanonical.h.

References ElectroPotential(), and fStrangePotential.

Referenced by BaryonPotential().

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

Definition at line 35 of file GrandCanonical.h.

References BaryonPotential(), and fTemperature.

35 { 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