22 m_CharmValues.resize(0);
23 m_CharmValues.push_back(0);
24 m_CharmValues.push_back(1);
25 m_CharmValues.push_back(-1);
28 for (
unsigned int i = 0; i < m_CharmValues.size(); ++i) m_CharmMap[m_CharmValues[i]] = i;
32 m_TAG =
"ThermalModelCanonicalCharm";
74 m_energydensitiesGCE.resize(m_densitiesGCE.size());
88 printf(
"**ERROR** ThermalModelCanonicalCharm::CalculatePrimordialDensities(): PCE not supported!\n");
93 m_energydensitiesGCE.resize(0);
97 m_Zsum.resize(m_CharmValues.size());
99 m_partialZ.resize(m_CharmValues.size());
100 vector<double> xi(1, 0.), yi(1, 0.);
102 for (
size_t i = 0; i < m_CharmValues.size(); ++i) {
106 if (m_partialZ[i] < 1.e-10) m_partialZ[i] += 1e-10;
110 for (
int i = 0; i < 1; ++i) {
111 xi[i] = 2. * sqrt(m_partialZ[m_CharmMap[i + 1]] * m_partialZ[m_CharmMap[-(i + 1)]]);
112 yi[i] = sqrt(m_partialZ[m_CharmMap[i + 1]] / m_partialZ[m_CharmMap[-(i + 1)]]);
115 for (
size_t i = 0; i < m_CharmValues.size(); ++i) {
118 res =
xMath::BesselI(abs(-m_CharmValues[i]), xi[0]) * pow(yi[0], m_CharmValues[i]);
133 for (
size_t i = 0; i <
m_wprim.size(); ++i) {
150 double ret = m_partialZ[0] + log(m_Zsum[m_CharmMap[0]]);
Abstract base class for an HRG model implementation.
virtual double CalculatePressure()
Implementation of the equation of state functions.
std::vector< double > m_Chem
std::vector< double > m_wprim
const ThermalParticle & Particle(int id) const
ThermalParticle object corresponding to particle species with a provided 0-based index.
std::vector< double > m_skewprim
virtual void FixParameters()
Method which actually implements ConstrainChemicalPotentials() (for backward compatibility).
bool m_FluctuationsCalculated
virtual double CalculateEnergyDensity()
Class containing the particle list.
virtual void SetParameters(const ThermalModelParameters ¶ms)
The thermal parameters.
ThermalModelParameters m_Parameters
Structure containing all thermal parameters of the model.
int ComponentsNumber() const
Number of different particle species in the list.
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
Charm-canonical ensemble.
virtual void SetCharmChemicalPotential(double muC)
Override the base class method to always set to zero.
virtual void SetStatistics(bool stats)
Contains some extra mathematical functions used in the code.
ThermalParticleSystem * m_TPS
std::vector< double > m_wtot
double BesselI(int n, double x)
integer order modified Bessel function I_n(x)
virtual void SetParameters(const ThermalModelParameters ¶ms)
The thermal parameters.
const std::vector< ThermalParticle > & Particles() const
Returns the vector of all particle species.
ThermalModelInteraction m_InteractionModel
virtual double CalculateEntropyDensity()
virtual void ValidateCalculation()
Checks whether issues have occured during the calculation of particle densities in the CalculateDensi...
virtual bool IsConservedChargeCanonical(ConservedCharge::Name charge) const
Whether the given conserved charge is treated canonically.
void UseStatistics(bool enable)
Use quantum statistics.
Name
Set of all conserved charges considered.
virtual void CalculatePrimordialDensities()
Calculates the primordial densities of all species.
virtual void CalculateDensities()
Calculates the primordial and total (after decays) densities of all species.
std::vector< double > m_densities
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
bool UsePartialChemicalEquilibrium()
Whether partial chemical equilibrium with additional chemical potentials is used. ...
ThermalModelEnsemble m_Ensemble
std::vector< double > m_skewtot
void CalculateEnergyDensitiesGCE()
Calculates the grand-canonical energy densities.
virtual ~ThermalModelCanonicalCharm(void)
Destroy the ThermalModelCanonicalCharm object.
void CalculateFluctuations()
Dummy function. Fluctuations not yet supported.
The main namespace where all classes and functions of the Thermal-FIST library reside.
void CalculateDensitiesGCE()
Calculates the particle densities in a grand-canonical ensemble.
virtual void FixParameters()
Method which actually implements ConstrainChemicalPotentials() (for backward compatibility).