-/*
-
- Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna
- amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru
- November. 2, 2005
-
-*/
+//////////////////////////////////////////////////////////////////////////////////
+// //
+// Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna //
+// amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru //
+// November. 2, 2005 //
+// //
+//////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <TError.h>
#include <TMath.h>
-#ifndef GRANDCANONICAL_INCLUDED
#include "GrandCanonical.h"
-#endif
-#ifndef HANKELFUNCTION_INCLUDED
#include "HankelFunction.h"
-#endif
-#ifndef UKUTILITY_INCLUDED
#include "UKUtility.h"
-#endif
-#ifndef PARTICLE_PDG
#include "ParticlePDG.h"
-#endif
-#ifndef DATABASEPDG_H
#include "DatabasePDG.h"
-#endif
+
+//_______________________________________________________________________________
GrandCanonical::GrandCanonical():
fTemperature(-1111),
fBaryonPotential(-1111),
fNMax(-1111),
fInitialized(kFALSE)
{
+ //
+ // default constructor
+ //
}
+//_______________________________________________________________________________
GrandCanonical::GrandCanonical(Int_t nmax, Double_t temperature, Double_t baryonPotential, Double_t strangePotential, Double_t electroPotential):
fTemperature(temperature),
fBaryonPotential(baryonPotential),
fNMax(nmax),
fInitialized(kTRUE)
{
+ //
+ // constructor
+ //
}
-GrandCanonical::~GrandCanonical() {}
-
+//_______________________________________________________________________________
+GrandCanonical::~GrandCanonical() {
+//
+// destructor
+//
+}
+//_______________________________________________________________________________
void GrandCanonical::Temperature(Double_t value) {
+ //
+ // set temperature
+ //
fTemperature = value;
- if(fNMax!=-1111 && fBaryonPotential!=-1111 && fStrangePotential!=-1111 && fElectroPotential!=-1111)
+ if(fNMax!=-1111 && TMath::Abs(fBaryonPotential+1111)>1.e-10 &&
+ TMath::Abs(fStrangePotential+1111)>1.e-10 && TMath::Abs(fElectroPotential+1111)>1.e-10)
fInitialized = kTRUE;
}
+//_______________________________________________________________________________
void GrandCanonical::BaryonPotential(Double_t value) {
+ //
+ // set baryo chemical potential
+ //
fBaryonPotential = value;
- if(fNMax!=-1111 && fTemperature!=-1111 && fStrangePotential!=-1111 && fElectroPotential!=-1111)
+ if(fNMax!=-1111 && TMath::Abs(fTemperature+1111)>1.e-10 &&
+ TMath::Abs(fStrangePotential+1111)>1.e-10 && TMath::Abs(fElectroPotential+1111)>1.e-10)
fInitialized = kTRUE;
}
+//_______________________________________________________________________________
void GrandCanonical::StrangePotential(Double_t value) {
+ //
+ // set strange potential
+ //
fStrangePotential = value;
- if(fNMax!=-1111 && fTemperature!=-1111 && fBaryonPotential!=-1111 && fElectroPotential!=-1111)
+ if(fNMax!=-1111 && TMath::Abs(fTemperature+1111)>1.e-10 &&
+ TMath::Abs(fBaryonPotential+1111)>1.e-10 && TMath::Abs(fElectroPotential+1111)>1.e-10)
fInitialized = kTRUE;
}
+//_______________________________________________________________________________
void GrandCanonical::ElectroPotential(Double_t value) {
+ //
+ // set electro chemical potential
+ //
fElectroPotential = value;
- if(fNMax!=-1111 && fTemperature!=-1111 && fBaryonPotential!=-1111 && fStrangePotential!=-1111)
+ if(fNMax!=-1111 && TMath::Abs(fTemperature+1111)>1.e-10 &&
+ TMath::Abs(fBaryonPotential+1111)>1.e-10 && TMath::Abs(fStrangePotential+1111)>1.e-10)
fInitialized = kTRUE;
}
+//_______________________________________________________________________________
void GrandCanonical::NMax(Int_t value) {
+ //
+ // set the number of iterations
+ //
fNMax = value;
if(fTemperature!=-1111 && fBaryonPotential!=-1111 && fStrangePotential!=-1111 && fElectroPotential!=-1111)
+ if(fNMax!=-1111 && TMath::Abs(fBaryonPotential+1111)>1.e-10 &&
+ TMath::Abs(fStrangePotential+1111)>1.e-10 && TMath::Abs(fElectroPotential+1111)>1.e-10)
fInitialized = kTRUE;
}
+//_______________________________________________________________________________
Double_t GrandCanonical::ParticleEnergyDensity(ParticlePDG *const particle) {
+ //
+ // compute the energy density for a given particle
+ //
// Check if all the thermodinamic parameters are set
if(!fInitialized)
Fatal("GrandCanonical::ParticleEnergyDensity", "GrandCanonical object not fully initialized!!");
Double_t degFactor = 2.*particle->GetSpin() + 1.; // degeneracy factor
Double_t mass = particle->GetMass(); // PDG table mass
Double_t d = Int_t(2.*particle->GetSpin()) & 1 ? 1. : -1; // Bose-Einstein/Fermi-Dirac factor
- Double_t preFactor = (degFactor*mass*mass*fTemperature*fTemperature/hbarc/hbarc/hbarc)/(2.*TMath::Pi()*TMath::Pi());
+ Double_t preFactor = (degFactor*mass*mass*fTemperature*fTemperature/kHbarc/kHbarc/kHbarc)/(2.*TMath::Pi()*TMath::Pi());
Double_t postFactor = 0.;
//compute chemical potential
return preFactor * postFactor;
}
+//_______________________________________________________________________________
Double_t GrandCanonical::ParticleNumberDensity(ParticlePDG *const particle) {
+ //
+ // compute the particle number density
+ //
// Check if all the thermodinamic parameters are set
if(!fInitialized)
Fatal("GrandCanonical::ParticleNumberDensity", "GrandCanonical object not fully initialized!!");
Double_t degFactor = 2.*particle->GetSpin() + 1.;
Double_t mass = particle->GetMass();
Double_t d = Int_t(2*particle->GetSpin()) & 1 ? 1. : -1.;
- Double_t preFactor = (degFactor*mass*mass*fTemperature/hbarc/hbarc/hbarc)/(2.*TMath::Pi()*TMath::Pi());
+ Double_t preFactor = (degFactor*mass*mass*fTemperature/kHbarc/kHbarc/kHbarc)/(2.*TMath::Pi()*TMath::Pi());
Double_t postFactor = 0.;
Double_t potential = fBaryonPotential * particle->GetBaryonNumber() +
return preFactor * postFactor;
}
-
+//_______________________________________________________________________________
Double_t GrandCanonical::EnergyDensity(DatabasePDG *const database) {
+ //
+ // compute the total energy density
+ //
// Check if all the thermodinamic parameters are set
if(!fInitialized)
Fatal("GrandCanonical::EnergyDensity", "GrandCanonical object not fully initialized!!");
return meanEnergyDensity;
}
+//_______________________________________________________________________________
Double_t GrandCanonical::BaryonDensity(DatabasePDG *const database) {
+ //
+ // compute the baryon density
+ //
// Check if all the thermodinamic parameters are set
if(!fInitialized)
Fatal("GrandCanonical::BaryonDensity", "GrandCanonical object not fully initialized!!");
return meanBaryonDensity;
}
+//_______________________________________________________________________________
Double_t GrandCanonical::StrangeDensity(DatabasePDG *const database) {
+ //
+ // compute the strangeness density
+ //
// Check if all the thermodinamic parameters are set
if(!fInitialized)
Fatal("GrandCanonical::StrangeDensity", "GrandCanonical object not fully initialized!!");
return meanStrangeDensity;
}
+//_______________________________________________________________________________
Double_t GrandCanonical::ElectroDensity(DatabasePDG *const database) {
+ //
+ // compute the electro number density
+ //
// Check if all the thermodinamic parameters are set
if(!fInitialized)
Fatal("GrandCanonical::ElectroDensity", "GrandCanonical object not fully initialized!!");