8#ifndef THERMALMODELCANONICAL_H
9#define THERMALMODELCANONICAL_H
39 B(iB),
Q(iQ),
S(iS),
C(iC) { }
302 ThermalModelBase::ResetCalculatedFlags();
387 virtual void PrepareModelGCE();
388 void CleanModelGCE();
393 void EnforceSaddlePointLOForNonIdeal();
400 void ComputeSaddlePointPartitionFunctions();
401 void SolveSaddlePointEquations();
402 void SetupSaddlePointChargeIndices();
406 double ComputeSigmaLogDetFromModel();
434 void ComputeAnalyticCumulants(
bool computeCovariance =
false);
map< string, double > params
Abstract base class for an HRG model implementation.
ThermalModelBase(ThermalParticleSystem *TPS, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelBase object.
virtual void ConserveCharm(bool conserve=true)
Specifies whether the charm charge is treated canonically.
std::map< QuantumNumbers, int > m_QNMap
Maps QuantumNumbers combinations to a 1-dimensional index.
double m_MultExpBanalyt
Exponential multiplier for analytical baryon fugacity calculations.
int m_IntegrationIterationsMultiplier
A multiplier to increase the number of iterations during the numerical integration used to calculate ...
int m_BMAX
Maximum baryon number.
virtual double ParticleScalarDensity(int)
Returns the scalar density of a particle species.
int m_SaddlePointDim
Saddle-point approximation data (for SaddlePoint quadrature method)
int IntegrationIterationsMultiplier() const
The multiplier of the number of iterations in the numerical integration.
virtual void SetStatistics(bool stats)
std::vector< double > m_PartialZ
The computed canonical partition function.
int m_QCE
Flag indicating if electric charge is conserved canonically.
ThermalModelBase * m_modelgce_ext
External GCE model (not owned), set via SetModelGCE()
void SolveChemicalPotentialsGCE(bool resetInitialValues)
CanonicalMethod Method() const
Returns the method used for computing the canonical partition functions.
virtual void ConserveStrangeness(bool conserve=true)
Specifies whether the strangeness charge is treated canonically.
void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
virtual void CalculateTwoParticleCorrelations()
Computes the fluctuations and correlations of the primordial particle numbers.
double m_NLOEnergyDensity
ε = ε^GCE(μ*) - (1/2) Σ_j E_j G_jj (LO: ε^GCE(μ*))
int m_CCE
Flag indicating if charm is conserved canonically.
virtual void CalculateFluctuations()
Computes the fluctuation observables.
bool m_PartialZCalculatedFlucts
double m_NLOPressure
P = p^GCE(μ*) - d·T/(2·Vc) (LO: p^GCE(μ*))
double m_MultExp
Exponential multiplier for canonical partition function calculations.
virtual double ParticleScaledVariance(int part)
virtual double CalculateEnergyDensityDerivativeT()
void SetModelGCE(ThermalModelBase *model)
Sets an external GCE model to use in the saddle-point approach.
std::vector< QuantumNumbers > m_QNvec
A set of QuantumNumbers combinations for which it is necessary to compute the canonical partition fun...
std::vector< double > m_Corr
A vector of chemical factors.
virtual double GetGCEDensity(int i) const
Density of particle species i in the grand-canonical ensemble.
virtual bool IsParticleCanonical(const ThermalParticle &part)
Determines whether the specified ThermalParticle is treat canonically or grand-canonically in the pre...
bool IsPartialZCalculated() const
virtual double CalculateEntropyDensity()
ThermalModelBase * m_modelgce
virtual void CalculatePartitionFunctions(double Vc=-1.)
Calculates all necessary canonical partition functions.
double m_NLOEntropyDensity
LO entropy: s^GCE(μ*) (used only by SaddlePointLO; NLO uses lnZ_SP)
virtual ~ThermalModelCanonical(void)
Destroy the ThermalModelCanonical object.
void SetIntegrationIterationsMultiplier(int multiplier)
Assigns the multiplier of the number of iterations in the numerical integration.
virtual void CalculateQuantumNumbersRange(bool computeFluctuations=false)
Calculates the range of quantum numbers values for which it is necessary to compute the canonical par...
virtual void FixParametersNoReset()
Method which actually implements ConstrainChemicalPotentialsNoReset() (for backward compatibility).
virtual double CalculateEntropyDensityDerivativeT()
std::vector< int > m_SaddlePointChargeIndices
Which of {B=0,Q=1,S=2,C=3} are canonical.
virtual double CalculatePressure()
int m_QMAX
Maximum electric charge.
void SetMethod(CanonicalMethod method)
Sets the method for computing the canonical partition functions.
int m_SMAX
Maximum strangeness.
int m_BCE
Flag indicating if baryon charge is conserved canonically.
double m_SaddlePointLogDetSigma
log(det(Sigma))
virtual void ValidateCalculation()
Checks whether issues have occured during the calculation of particle densities in the CalculateDensi...
virtual bool IsConservedChargeCanonical(ConservedCharge::Name charge) const
bool m_PartialZCalculated
bool m_Banalyt
Flag indicating whether the analytical calculation of baryon fugacity is used.
virtual void ResetCalculatedFlags()
ThermalModelBase * m_modelgce_default
Default ideal-gas GCE model (owned, created once)
int m_SCE
Flag indicating if strangeness is conserved canonically.
void ResetPartialZCalculated()
std::vector< double > m_SaddlePointMu
Saddle-point mu*_a/T for each conserved charge (size 4)
std::vector< double > m_W2
Per-particle W^(2) = Vc * chi2 (for SaddlePointNLO)
CanonicalMethod m_Method
Method for computing the canonical partition functions.
bool IsPartialZCalculatedFlucts() const
virtual double CalculateEnergyDensity()
virtual void FixParameters()
Method which actually implements ConstrainChemicalPotentials() (for backward compatibility).
virtual void ConserveElectricCharge(bool conserve=true)
Specifies whether the electric charge is treated canonically.
virtual void CalculatePrimordialDensities()
Calculates the primordial densities of all species.
ThermalModelCanonical(ThermalParticleSystem *TPS, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelCanonical object.
virtual void ConserveBaryonCharge(bool conserve=true)
Specifies whether the baryon number is treated canonically.
std::vector< double > m_SaddlePointMuStar
Per-particle full chemical potential at saddle point.
Class containing all information about a particle specie.
Class containing the particle list.
The main namespace where all classes and functions of the Thermal-FIST library reside.
CanonicalMethod
Method used for computing the canonical partition functions.
@ SaddlePointLO
Saddle-point LO only (GCE densities/thermo, canonical LO fluctuations)
@ SaddlePoint
Saddle-point approximation (per-QN solve)
@ SaddlePointNLO
Saddle-point with systematic NLO expansion (preserves exact conservation laws)
@ GaussLegendre
Composite 10-point Gauss-Legendre on subintervals (default)
Name
Set of all conserved charges considered.
QuantumNumbers(int iB=0, int iQ=0, int iS=0, int iC=0)
Construct a new QuantumNumbers object.
const bool operator<(const QuantumNumbers &r) const
Structure containing all thermal parameters of the model.