8 #ifndef THERMALMODELBASE_H 9 #define THERMALMODELBASE_H 79 virtual void FillVirial(
const std::vector<double> & ri = std::vector<double>(0));
603 double muBinit = 0.,
double muQinit = 0.,
double muSinit = 0.,
double muCinit = 0.,
604 bool ConstrMuB =
true,
bool ConstrMuQ =
true,
bool ConstrMuS =
true,
bool ConstrMuC =
true);
926 double GetDensity(
long long PDGID,
int feeddown) {
return GetDensity(PDGID, static_cast<Feeddown::Type>(feeddown)); }
1239 void ResetChemicalPotentials();
1241 double GetDensity(
long long PDGID,
const std::vector<double> *dens);
1247 std::vector<double> Equations(
const std::vector<double> &x);
1256 std::vector<double> Jacobian(
const std::vector<double> &x);
1261 class BroydenChem :
public Broyden 1265 ~BroydenChem(
void) { }
1266 std::vector<double> Solve(
const std::vector<double> &x0, BroydenSolutionCriterium *solcrit = NULL,
int max_iterations = MAX_ITERS);
1275 BroydenEquationsChemTotals(
const std::vector<int> & vConstr,
const std::vector<int> & vType,
const std::vector<double> & vTotals,
ThermalModelBase *model);
1276 std::vector<double> Equations(
const std::vector<double> &x);
1278 std::vector<int> m_Constr;
1279 std::vector<int> m_Type;
1280 std::vector<double> m_Totals;
1287 BroydenJacobianChemTotals(
const std::vector<int> & vConstr,
const std::vector<int> & vType,
const std::vector<double> & vTotals,
ThermalModelBase *model) :
BroydenJacobian(), m_Constr(vConstr), m_Type(vType), m_Totals(vTotals), m_THM(model) { }
1288 std::vector<double> Jacobian(
const std::vector<double> &x);
1290 std::vector<int> m_Constr;
1291 std::vector<int> m_Type;
1292 std::vector<double> m_Totals;
1299 #endif // THERMALMODELBASE_H bool QuantumStatistics() const
void ConstrainChemicalPotentials(bool resetInitialValues=true)
Constrains the chemical potentials by the conservation laws imposed.
virtual void DisableMesonBaryonAttraction()
Abstract base class for an HRG model implementation.
virtual void SetRadius(int, double)
Set the radius parameter for particle species i.
virtual double PrimordialParticleChargeSusceptibility(int i, ConservedCharge::Name chg) const
Returns the computed primordial particle vs conserved charge (cross-)susceptibility for particle wit...
virtual double CalculateArbitraryChargeDensity()
Computes the density of the auxiliary ArbitraryCharge()
virtual void CalculateTwoParticleFluctuationsDecays()
Computes particle number correlations and fluctuations for all final-state particles which are marked...
virtual double PrimordialNetParticleChargeSusceptibilityByPdg(long long id1, ConservedCharge::Name chg)
Returns the computed primordial net particle vs conserved charge (cross-)susceptibility for particle...
virtual void SetStrangenessChemicalPotential(double muS)
Set the strangeness chemical potential.
double ScaledVariancePrimordial(int id) const
Scaled variance of primordial particle number fluctuations for particle species id.
std::vector< double > m_Chem
Quantum van der Waals model.
virtual double FinalParticleChargeSusceptibilityByPdg(long long id1, ConservedCharge::Name chg)
Returns the computed final (after decays) particle vs conserved charge (cross-)susceptibility for pa...
double AbsoluteElectricChargeDensity()
Absolute electric charge density (Q+ + Q-) (fm )
virtual double FinalNetParticleChargeSusceptibilityByPdg(long long id1, ConservedCharge::Name chg)
Returns the computed final (after decays) net particle vs conserved charge (cross-)susceptibility fo...
const std::vector< double > & Densities() const
virtual double NetParticleSusceptibilityFinalByPdg(long long id1, long long id2)
Returns the computed (cross-)susceptibility between final net-particle numbers for pdg codes id1 and...
virtual void SetGammaS(double gammaS)
Set the strange quark fugacity factor.
double CanonicalVolume() const
The canonical correlation volume V (fm )
Class implementing the Broyden method to solve a system of non-linear equations.
virtual void SetElectricChemicalPotential(double muQ)
Set the electric chemical potential.
virtual double CalculateBaryonMatterEntropyDensity()
The fraction of entropy carried by baryons (Ideal GCE only)
virtual void SetElectricCharge(int Q)
Set the total electric charge (for canonical ensemble only)
void DisableBaryonBaryonRepulsion()
double EntropyDensity()
Entropy density (fm )
std::vector< double > m_kurttot
virtual void CalculateDensitiesGCE()
Calculates the particle densities in a grand-canonical ensemble.
std::vector< double > m_wprim
virtual void SetBaryonCharge(int B)
Set the total baryon number (for canonical ensemble only)
virtual double CalculateAbsoluteCharmDensity()
ThermalModelInteraction InteractionModel()
The interactions present in the current HRG model.
bool ConstrainMuC() const
virtual void SetBaryonChemicalPotential(double muB)
Set the baryon chemical potential.
std::vector< std::vector< double > > m_FinalChargesCorrel
double KurtosisTotal(int id) const
Normalized excess kurtosis of final particle number fluctuations for particle species id...
virtual double AttractionCoefficient(int, int) const
QvdW mean field attraction coefficient .
void SetOMP(bool openMP)
OpenMP support. Currently not used.
bool ConstrainMuB() const
virtual double ParticleSkewness(int)
Skewness of primordial particle number fluctuations for species i.
std::vector< double > m_skewprim
virtual void SetStatistics(bool stats)
virtual void FixParameters()
Method which actually implements ConstrainChemicalPotentials() (for backward compatibility).
bool m_FluctuationsCalculated
virtual void SetStrangeness(int S)
Set the total strangeness (for canonical ensemble only)
std::vector< std::vector< double > > m_ProxySusc
virtual double CalculateEigenvolumeFraction()
bool m_FeeddownCalculated
virtual void DisableBaryonAntiBaryonAttraction()
void SetUseWidth(bool useWidth)
Sets whether finite resonance widths are used. Deprecated.
std::vector< std::vector< double > > m_Susc
virtual double TwoParticleSusceptibilityPrimordial(int i, int j) const
Returns the computed primordial particle number (cross-)susceptibility for particles with ids i and ...
std::string ValidityCheckLog() const
All messaged which occured during the validation procedure in the ValidateCalculation() method...
double ChargedMultiplicity(int type=0)
Multiplicity of charged particles.
virtual double CalculateAbsoluteChargeDensity()
virtual void SetGammaC(double gammaC)
Set the charm quark fugacity factor.
Class containing the particle list.
double HadronDensity()
Total number density of all particle (fm )
virtual void CalculatePrimordialDensities()=0
Calculates the primordial densities of all species.
Grand canonical ensemble.
const std::string & TAG() const
The tag of this ThermalModelBase object.
bool IsCalculated() const
const std::vector< double > & ChemicalPotentials() const
A vector of chemical potentials of all particles.
double SkewnessTotal(int id) const
Normalized skewness of final particle number fluctuations for particle species id.
double Susc(ConservedCharge::Name i, ConservedCharge::Name j) const
A 2nd order susceptibility of conserved charges.
virtual void SetParameters(const ThermalModelParameters ¶ms)
The thermal parameters.
virtual void DisableMesonMesonVirial()
virtual void ReadInteractionParameters(const std::string &)
Reads the QvdW interaction parameters from a file.
ThermalModelParameters m_Parameters
Crossterms excluded volume model.
Structure containing all thermal parameters of the model.
virtual double CalculateStrangenessDensity()
void ConstrainMuB(bool constrain)
void ConstrainMuQ(bool constrain)
virtual void SetRadius(double)
Set the same excluded volume radius parameter for all species.
virtual double ParticleScaledVariance(int)
Scaled variance of primordial particle number fluctuations for species i.
Abstract class which defines the system of non-linear equations to be solved by the Broyden's method...
void SetResonanceWidthShape(ThermalParticle::ResonanceWidthShape shape)
Set (or get) the ThermalParticle::ResonanceWidthShape for all particles.
virtual void SetTemperature(double T)
Set the temperature.
const std::vector< std::vector< double > > & AllDensities() const
Charm-canonical ensemble.
virtual double MuShift(int) const
Shift in chemical potential of particle species id due to interactions.
virtual void SetGammaq(double gammaq)
Set the light quark fugacity factor.
void SetQoverB(double QB)
The electric-to-baryon charge ratio to be used to constrain the electric chemical potential...
virtual double CalculateHadronDensity()
void SetNormBratio(bool normBratio)
Whether branching ratios are renormalized to 100%.
virtual double ParticleKurtosis(int)
Kurtosis of primordial particle number fluctuations for species i.
virtual double CalculateBaryonDensity()
double KurtosisPrimordial(int id) const
Normalized excess kurtosis of primordial particle number fluctuations for particle species id...
virtual void DisableBaryonBaryonVirial()
virtual double CalculateCharmDensity()
void SetCalculationType(IdealGasFunctions::QStatsCalculationType type)
Sets the CalculationType() method to evaluate quantum statistics.
virtual void SetVirial(int, int, double)
Set the excluded volume coefficient .
virtual double VirialCoefficient(int, int) const
Excluded volume coefficient .
virtual double FullIdealChemicalPotential(int i) const
Chemical potential entering the ideal gas expressions of particle species i.
virtual void CalculateSusceptibilityMatrix()
Calculates the conserved charges susceptibility matrix.
Contains some extra mathematical functions used in the code.
ThermalParticleSystem * m_TPS
std::vector< double > m_wtot
std::string m_ValidityLog
void SetTAG(const std::string &tag)
Set the tag for this ThermalModelBase object.
void SetResonanceWidthShape(ThermalParticle::ResonanceWidthShape shape)
Set the ThermalParticle::ResonanceWidthShape for all particles. Calls the corresponding method in TPS...
double ChargedMultiplicityFinal(int type=0)
Multiplicity of charged particles including the feeddown contributions in accordance with the stabili...
ThermalModelEnsemble Ensemble()
The statistical ensemble of the current HRG model.
virtual void DisableBaryonBaryonAttraction()
virtual void FillChemicalPotentials()
Sets the chemical potentials of all particles.
double SkewnessPrimordial(int id) const
Normalized skewness of primordial particle number fluctuations for particle species id...
void ResetCalculatedFlags()
Reset all flags which correspond to a calculation status.
ThermalModelEnsemble
The list of statistical ensembles.
virtual double ParticleScalarDensity(int i)=0
The scalar density of the particle species i.
virtual void FixParametersNoReset()
Method which actually implements ConstrainChemicalPotentialsNoReset() (for backward compatibility)...
double ChemicalPotential(int i) const
Chemical potential of particle species i.
ResonanceWidthIntegration
Treatment of finite resonance widths.
void SetClusterExpansionOrder(int order)
Set the number of terms in the cluster expansion method.
double ChargedScaledVarianceFinal(int type=0)
Scaled variance of charged particles including the feeddown contributions in accordance with the stab...
ResonanceWidthShape
Relativistic vs non-relativistic Breit-Wigner shape.
virtual void CalculateProxySusceptibilityMatrix()
Calculates the susceptibility matrix of conserved charges proxies.
void UpdateParameters()
Calls SetParameters() with current m_Parameters.
void ConstrainMuS(bool constrain)
Real gas model. Not yet fully implemented.
virtual double PrimordialParticleChargeSusceptibilityByPdg(long long id1, ConservedCharge::Name chg)
Returns the computed primordial particle vs conserved charge (cross-)susceptibility for particle wit...
virtual double CalculateChargeDensity()
virtual void CalculateTwoParticleCorrelations()
Computes the fluctuations and correlations of the primordial particle numbers.
virtual double GetMaxDiff() const
void SetResonanceWidthIntegrationType(ThermalParticle::ResonanceWidthIntegration type)
Set the ThermalParticle::ResonanceWidthIntegration scheme for all particles. Calls the corresponding ...
virtual void SetCalculationType(IdealGasFunctions::QStatsCalculationType type)
Sets the CalculationType() method to evaluate quantum statistics. Calls the corresponding method in T...
double GetDensity(long long PDGID, int feeddown)
Same as GetDensity(int,Feeddown::Type)
std::vector< double > m_kurtprim
ThermalModelInteraction
Type of interactions included in the HRG model.
std::vector< std::vector< double > > m_TotalCorrel
double ProxySusc(ConservedCharge::Name i, ConservedCharge::Name j) const
A 2nd order susceptibility of conserved charges proxies.
double ConservedChargeDensity(ConservedCharge::Name chg)
A density of a conserved charge (in fm^-3)
double ChargedScaledVariance(int type=0)
Scaled variance of charged particles.
ThermalModelInteraction m_InteractionModel
virtual double CalculateEnergyDensity()=0
virtual void ValidateCalculation()
Checks whether issues have occured during the calculation of particle densities in the CalculateDensi...
void DisableMesonBaryonRepulsion()
void DisableMesonMesonRepulsion()
virtual double CalculateAbsoluteStrangenessDensity()
virtual bool SolveChemicalPotentials(double totB=0., double totQ=0., double totS=0., double totC=0., double muBinit=0., double muQinit=0., double muSinit=0., double muCinit=0., bool ConstrMuB=true, bool ConstrMuQ=true, bool ConstrMuS=true, bool ConstrMuC=true)
The procedure which calculates the chemical potentials which reproduce the specified total baryon...
void DisableBaryonAntiBaryonRepulsion()
virtual void SetCharmChemicalPotential(double muC)
Set the charm chemical potential.
virtual void FillVirial(const std::vector< double > &ri=std::vector< double >(0))
Fills the excluded volume coefficients based on the provided radii parameters for all species...
virtual double TwoParticleSusceptibilityPrimordialByPdg(long long id1, long long id2)
Returns the computed primordial particle number (cross-)susceptibility for particles with pdg codes ...
double GetYield(long long PDGID, Feeddown::Type feeddown)
Particle number yield of species with a specified PDG ID and feeddown.
virtual double TwoParticleSusceptibilityFinal(int i, int j) const
Returns the computed final particle number (cross-)susceptibility for particles with ids i and j...
Name
Set of all conserved charges considered.
bool UseWidth() const
Whether finite resonance widths are considered.
double ElectricChargeDensity()
Electric charge density (fm )
virtual void DisableMesonBaryonVirial()
virtual double CalculateMesonMatterEntropyDensity()
The fraction of entropy carried by mesons (Ideal GCE only)
virtual double CalculateEntropyDensity()=0
void UsePartialChemicalEquilibrium(bool usePCE)
Sets whether partial chemical equilibrium with additional chemical potentials is used.
virtual void CalculateDensities()
Calculates the primordial and total (after decays) densities of all species.
double BaryonDensity()
Net baryon density (fm )
double AbsoluteBaryonDensity()
Absolute baryon number density (baryons + antibaryons) (fm )
virtual void SetCharm(int C)
Set the total charm (for canonical ensemble only)
virtual void DisableMesonMesonAttraction()
Mean field model. Not yet fully implemented.
Diagonal excluded volume model.
double CharmDensity()
Net charm density (fm )
virtual double CalculatePressure()=0
Implementation of the equation of state functions.
bool ConstrainMuQ() const
void SetSoverB(double SB)
The entropy per baryon ratio to be used to constrain the baryon chemical potential.
double AbsoluteStrangenessDensity()
Absolute strange quark content density (fm )
double AbsoluteCharmDensity()
Absolute charm quark content density (fm )
std::vector< double > m_densities
virtual double FinalParticleChargeSusceptibility(int i, ConservedCharge::Name chg) const
Returns the computed final (after decays) particle vs conserved charge (cross-)susceptibility for pa...
Class which implements calculation of the Jacobian needed for the Broyden's method.
virtual double NetParticleSusceptibilityPrimordialByPdg(long long id1, long long id2)
Returns the computed (cross-)susceptibility between primordial net-particle numbers for pdg codes id...
virtual void CalculateFluctuations()
Computes the fluctuation observables.
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
std::vector< std::vector< double > > m_PrimCorrel
void SetCanonicalVolume(double Volume)
Set the canonical correlation volume V .
Implementation of the generic Broyden's method routines.
bool UsePartialChemicalEquilibrium()
Whether partial chemical equilibrium with additional chemical potentials is used. ...
virtual std::vector< double > CalculateChargeFluctuations(const std::vector< double > &chgs, int order=4)
Calculates fluctuations (diagonal susceptibilities) of an arbitrary "conserved" charge.
Strangeness-canonical ensemble.
void ConstrainMuC(bool constrain)
ThermalModelEnsemble m_Ensemble
virtual void SetAttraction(int, int, double)
Set the vdW mean field attraction coefficient .
virtual ~ThermalModelBase(void)
std::vector< double > GetIdealGasDensities() const
std::vector< std::vector< double > > m_densitiesbyfeeddown
virtual void CalculateFeeddown()
Calculates the total densities which include feeddown contributions.
std::vector< double > m_skewtot
virtual bool IsLastSolutionOK() const
bool IsGCECalculated() const
virtual void CalculateParticleChargeCorrelationMatrix()
Calculates the matrix of correlators between primordial (and also final) particle numbers and conserv...
double RepulsionCoefficient(int i, int j) const
virtual double TwoParticleSusceptibilityFinalByPdg(long long id1, long long id2)
Returns the computed final particle number (cross-)susceptibility for particles with pdg codes id1 a...
double ScaledVarianceTotal(int id) const
Scaled variance of final particle number fluctuations for particle species id.
virtual void DisableBaryonAntiBaryonVirial()
std::vector< double > m_densitiestotal
double EnergyDensity()
Energy density (GeV fm )
QStatsCalculationType
Identifies whether quantum statistics are to be computed using the cluster expansion or numerical int...
const ThermalModelParameters & Parameters() const
virtual double CalculateAbsoluteBaryonDensity()
ThermalModelBase(ThermalParticleSystem *TPS, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelBase object.
virtual void SetClusterExpansionOrder(int order)
Set the number of terms in the cluster expansion method. Calls the corresponding method in TPS()...
bool m_LastCalculationSuccessFlag
double Pressure()
System pressure (GeV fm )
The main namespace where all classes and functions of the Thermal-FIST library reside.
virtual void SetChemicalPotentials(const std::vector< double > &chem=std::vector< double >(0))
Sets the chemical potentials of all particles.
void SetCanonicalVolumeRadius(double Rc)
Set the canonical correlation system radius.
bool IsFluctuationsCalculated() const
double StrangenessDensity()
Net strangeness density (fm )
virtual bool IsConservedChargeCanonical(ConservedCharge::Name charge) const
Whether the given conserved charge is treated canonically.
int ComponentsNumber() const
Number of different particle species in the list.
double Volume() const
System volume (fm )
ThermalParticleSystem * TPS()
virtual void WriteInteractionParameters(const std::string &)
Write the QvdW interaction parameters to a file.
void SetVolumeRadius(double R)
Sets the system radius.
std::vector< std::vector< double > > m_PrimChargesCorrel
bool ConstrainMuS() const
void SetVolume(double Volume)
Sets the system volume.
const std::vector< double > & TotalDensities() const