Thermal-FIST  1.3
Package for hadron resonance gas model applications
ThermalModelBase.h
Go to the documentation of this file.
1 /*
2  * Thermal-FIST package
3  *
4  * Copyright (c) 2014-2019 Volodymyr Vovchenko
5  *
6  * GNU General Public License (GPLv3 or later)
7  */
8 #ifndef THERMALMODELBASE_H
9 #define THERMALMODELBASE_H
10 
11 #include <string>
12 
14 #include "HRGBase/xMath.h"
15 #include "HRGBase/Broyden.h"
16 
17 
18 namespace thermalfist {
19 
29  {
30  public:
36  GCE = 0,
37  CE = 1,
38  SCE = 2,
39  CCE = 3
40  };
41 
47  Ideal = 0,
48  DiagonalEV = 1,
50  QvdW = 3,
51  RealGas = 4,
52  MeanField = 5
53  };
54 
62 
63  virtual ~ThermalModelBase(void) { }
64 
66  int ComponentsNumber() const { return static_cast<int>(m_densities.size()); }
67 
79  virtual void FillVirial(const std::vector<double> & ri = std::vector<double>(0));
80 
82  bool UseWidth() const { return m_UseWidth; }
83 
92  void SetUseWidth(bool useWidth);
93 
100 
102 
107  void SetNormBratio(bool normBratio);
108  bool NormBratio() const { return m_NormBratio; }
110 
112  void SetOMP(bool openMP) { m_useOpenMP = openMP; }
113 
115 
120  virtual void SetParameters(const ThermalModelParameters& params);
121  const ThermalModelParameters& Parameters() const { return m_Parameters; }
123 
129 
135  virtual void SetTemperature(double T);
136 
142  virtual void SetBaryonChemicalPotential(double muB);
143 
149  virtual void SetElectricChemicalPotential(double muQ);
150 
156  virtual void SetStrangenessChemicalPotential(double muS);
157 
163  virtual void SetCharmChemicalPotential(double muC);
164 
170  virtual void SetGammaq(double gammaq);
171 
177  virtual void SetGammaS(double gammaS);
178 
184  virtual void SetGammaC(double gammaC);
185 
191  virtual void SetBaryonCharge(int B);
192 
198  virtual void SetElectricCharge(int Q);
199 
205  virtual void SetStrangeness(int S);
206 
212  virtual void SetCharm(int C);
213 
219  virtual void SetRadius(double /*rad*/) { }
220 
227  virtual void SetRadius(int /*i*/, double /*rad*/) { }
228 
239  virtual void SetVirial(int /*i*/, int /*j*/, double /*b*/) { }
240 
248  virtual void SetAttraction(int /*i*/, int /*j*/, double /*a*/) { }
249 
251  virtual void DisableMesonMesonVirial();
256 
259  virtual void DisableMesonMesonAttraction();
260 
262  virtual void DisableMesonBaryonVirial();
267 
270  virtual void DisableMesonBaryonAttraction();
271 
273  virtual void DisableBaryonBaryonVirial();
278 
281  virtual void DisableBaryonBaryonAttraction();
282 
284  virtual void DisableBaryonAntiBaryonVirial();
289 
292  virtual void DisableBaryonAntiBaryonAttraction();
293 
301  virtual void ReadInteractionParameters(const std::string & /*filename*/) { }
302 
310  virtual void WriteInteractionParameters(const std::string & /*filename*/) { }
311 
317  virtual void ChangeTPS(ThermalParticleSystem *TPS);
318 
320 
330  virtual double VirialCoefficient(int /*i*/, int /*j*/) const { return 0.; }
331  double RepulsionCoefficient(int i, int j) const { return VirialCoefficient(i,j); }
333 
341  virtual double AttractionCoefficient(int /*i*/, int /*j*/) const { return 0.; }
342 
345  bool QuantumStatistics() const { return m_QuantumStats; }
346 
349  virtual void SetStatistics(bool stats);
350 
358 
369  virtual void SetClusterExpansionOrder(int order) { m_TPS->SetClusterExpansionOrder(order); }
370 
381 
389  void SetResonanceWidthIntegrationType(ThermalParticle::ResonanceWidthIntegration type);// { m_TPS->SetResonanceWidthIntegrationType(type); }
390 
398  virtual void FillChemicalPotentials();
399 
408  virtual void SetChemicalPotentials(const std::vector<double> & chem = std::vector<double>(0));
409 
415  const std::vector<double>& ChemicalPotentials() const { return m_Chem; }
416 
423  double ChemicalPotential(int i) const;
424 
433  virtual double FullIdealChemicalPotential(int i) const;
434 
435 
438  bool ConstrainMuB() const { return m_ConstrainMuB; }
439 
442  void ConstrainMuB(bool constrain) { m_ConstrainMuB = constrain; }
443 
446  bool ConstrainMuQ() const { return m_ConstrainMuQ; }
447 
450  void ConstrainMuQ(bool constrain) { m_ConstrainMuQ = constrain; }
451 
454  bool ConstrainMuS() const { return m_ConstrainMuS; }
455 
458  void ConstrainMuS(bool constrain) { m_ConstrainMuS = constrain; }
459 
462  bool ConstrainMuC() const { return m_ConstrainMuC; }
463 
466  void ConstrainMuC(bool constrain) { m_ConstrainMuC = constrain; }
467 
469  void UsePartialChemicalEquilibrium(bool usePCE) { m_PCE = usePCE; }
470 
473 
475 
482  void SetSoverB(double SB) { m_SBgoal = SB; }
483  double SoverB() const { return m_SBgoal; }
485 
487 
494  void SetQoverB(double QB) { m_QBgoal = QB; }
495  double QoverB() const { return m_QBgoal; }
497 
505  double Volume() const { return m_Parameters.V; }
506 
515  void SetVolumeRadius(double R) { m_Volume = 4. / 3.*xMath::Pi() * R * R * R; m_Parameters.V = m_Volume; }
516 
518  double CanonicalVolume() const { return m_Parameters.SVc; }
526 
535  void SetCanonicalVolumeRadius(double Rc) { m_Parameters.SVc = 4. / 3. * xMath::Pi() * Rc * Rc * Rc; }
536 
537 
538  //double StrangenessCanonicalVolume() const { return CanonicalVolume(); }
539  //void SetStrangenessCanonicalVolume(double Volume) { SetCanonicalVolume(Volume); }
540  //void SetStrangenessCanonicalVolumeRadius(double Radius) { SetCanonicalVolumeRadius(Radius); }
541 
542  // Same as FixParameters but with a more clear name on what is actually does
558  void ConstrainChemicalPotentials(bool resetInitialValues = true);
559 
560 
566  virtual void FixParameters();
567 
573  virtual void FixParametersNoReset();
574 
602  virtual bool SolveChemicalPotentials(double totB = 0., double totQ = 0., double totS = 0., double totC = 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);
605 
611  virtual void CalculatePrimordialDensities() = 0;
612 
618  virtual void CalculateDensities();
619 
626  virtual void ValidateCalculation();
627 
634  std::string ValidityCheckLog() const { return m_ValidityLog; }
635 
643 
651  virtual void CalculateFeeddown();
652 
661  virtual void CalculateFluctuations();
662 
672  virtual void CalculateTwoParticleCorrelations();
673 
692 
698  virtual double TwoParticleSusceptibilityPrimordial(int i, int j) const;
699 
705  virtual double TwoParticleSusceptibilityPrimordialByPdg(long long id1, long long id2);
706 
712  virtual double NetParticleSusceptibilityPrimordialByPdg(long long id1, long long id2);
713 
719  virtual double TwoParticleSusceptibilityFinal(int i, int j) const;
720 
726  virtual double TwoParticleSusceptibilityFinalByPdg(long long id1, long long id2);
727 
733  virtual double NetParticleSusceptibilityFinalByPdg(long long id1, long long id2);
734 
740  virtual double PrimordialParticleChargeSusceptibility(int i, ConservedCharge::Name chg) const;
741 
747  virtual double PrimordialParticleChargeSusceptibilityByPdg(long long id1, ConservedCharge::Name chg);
748 
755 
756 
762  virtual double FinalParticleChargeSusceptibility(int i, ConservedCharge::Name chg) const;
763 
769  virtual double FinalParticleChargeSusceptibilityByPdg(long long id1, ConservedCharge::Name chg);
770 
776  virtual double FinalNetParticleChargeSusceptibilityByPdg(long long id1, ConservedCharge::Name chg);
777 
788  virtual void CalculateSusceptibilityMatrix();
789 
804  virtual void CalculateProxySusceptibilityMatrix();
805 
815 
830  virtual std::vector<double> CalculateChargeFluctuations(const std::vector<double> &chgs, int order = 4);
831 
832  //virtual double GetParticlePrimordialDensity(unsigned int);
833  //virtual double GetParticleTotalDensity(unsigned int);
834 
835  // Equation of state etc.
836 
838  double Pressure() { return CalculatePressure(); }
839 
841  double EnergyDensity() { return CalculateEnergyDensity(); }
842 
845 
847  double HadronDensity() { return CalculateHadronDensity(); }
848 
850  double BaryonDensity() { return CalculateBaryonDensity(); }
851 
854 
857 
859  double CharmDensity() { return CalculateCharmDensity(); }
860 
863 
866 
869 
872 
874  virtual double CalculatePressure() = 0;
876  virtual double CalculateEnergyDensity() = 0;
877  virtual double CalculateEntropyDensity() = 0;
878  virtual double CalculateHadronDensity();
879  virtual double CalculateBaryonDensity();
880  virtual double CalculateChargeDensity();
881  virtual double CalculateStrangenessDensity();
882  virtual double CalculateCharmDensity();
883  virtual double CalculateAbsoluteBaryonDensity();
884  virtual double CalculateAbsoluteChargeDensity();
885  virtual double CalculateAbsoluteStrangenessDensity();
886  virtual double CalculateAbsoluteCharmDensity();
888 
890  virtual double CalculateArbitraryChargeDensity();
891 
893  virtual double CalculateBaryonMatterEntropyDensity() { return 0.; }
894 
896  virtual double CalculateMesonMatterEntropyDensity() { return 0.; }
897 
899  virtual double ParticleScaledVariance(int) { return 1.; }
900 
902  virtual double ParticleSkewness(int) { return 1.; }
903 
905  virtual double ParticleKurtosis(int) { return 1.; }
906 
909  virtual double CalculateEigenvolumeFraction() { return 0.; }
910 
912  virtual double ParticleScalarDensity(int i) = 0;
913 
914  virtual double GetMaxDiff() const { return m_MaxDiff; }
915 
919  virtual bool IsLastSolutionOK() const { return m_LastCalculationSuccessFlag; }
920 
926  double GetDensity(long long PDGID, int feeddown) { return GetDensity(PDGID, static_cast<Feeddown::Type>(feeddown)); }
927 
936  double GetDensity(long long PDGID, Feeddown::Type feeddown);
937 
946  double GetYield(long long PDGID, Feeddown::Type feeddown) { return GetDensity(PDGID, feeddown) * Volume(); }
947 
948  std::vector<double> GetIdealGasDensities() const;
949 
953 
958  const std::vector<double>& Densities() const { return m_densities; }
959 
966  const std::vector<double>& TotalDensities() const { return m_densitiestotal; }
967 
971  const std::vector< std::vector<double> >& AllDensities() const { return m_densitiesbyfeeddown; }
972 
978  void SetTAG(const std::string & tag) { m_TAG = tag; }
979 
981  const std::string& TAG() const { return m_TAG; }
982 
984  void ResetCalculatedFlags();
985 
988  bool IsCalculated() const { return m_Calculated; }
989 
993 
996  bool IsGCECalculated() const { return m_GCECalculated; }
997 
1005  double ScaledVariancePrimordial(int id) const { return (id >= 0 && id < static_cast<int>(m_wprim.size())) ? m_wprim[id] : 1.; }
1006 
1017  double ScaledVarianceTotal(int id) const { return (id >= 0 && id < static_cast<int>(m_wtot.size())) ? m_wtot[id] : 1.; }
1018 
1026  double SkewnessPrimordial(int id) const { return (id >= 0 && id < static_cast<int>(m_skewprim.size())) ? m_skewprim[id] : 1.; }
1027 
1038  double SkewnessTotal(int id) const { return (id >= 0 && id < static_cast<int>(m_skewtot.size())) ? m_skewtot[id] : 1.; }
1039 
1047  double KurtosisPrimordial(int id) const { return (id >= 0 && id < static_cast<int>(m_kurtprim.size())) ? m_kurtprim[id] : 1.; }
1048 
1059  double KurtosisTotal(int id) const { return (id >= 0 && id < static_cast<int>(m_kurttot.size())) ? m_kurttot[id] : 1.; }
1060 
1070 
1080  double Susc(ConservedCharge::Name i, ConservedCharge::Name j) const { return m_Susc[i][j]; }
1081 
1098 
1109  double ChargedMultiplicity(int type = 0);
1110 
1121  double ChargedScaledVariance(int type = 0);
1122 
1130  double ChargedMultiplicityFinal(int type = 0);
1131 
1139  double ChargedScaledVarianceFinal(int type = 0);
1140 
1147 
1148 
1152  virtual bool IsConservedChargeCanonical(ConservedCharge::Name charge) const { return 0; }
1153 
1160 
1161  protected:
1164 
1166  double m_MaxDiff;
1167 
1175  double m_QBgoal;
1176  double m_SBgoal;
1177  double m_Volume;
1178 
1183 
1184  bool m_PCE;
1185 
1187 
1188  std::vector<double> m_densities;
1189  std::vector<double> m_densitiestotal;
1190  //std::vector<double> m_densitiestotalweak;
1191  std::vector< std::vector<double> > m_densitiesbyfeeddown;
1192  std::vector<double> m_Chem;
1193 
1194  // Scaled variance
1195  std::vector<double> m_wprim;
1196  std::vector<double> m_wtot;
1197 
1198  // Skewness
1199  std::vector<double> m_skewprim;
1200  std::vector<double> m_skewtot;
1201 
1202  // Kurtosis
1203  std::vector<double> m_kurtprim;
1204  std::vector<double> m_kurttot;
1205 
1206  // 2nd order correlations of primordial and total numbers
1207  std::vector< std::vector<double> > m_PrimCorrel;
1208  std::vector< std::vector<double> > m_TotalCorrel;
1209 
1210  // Particle number-conserved charge correlators
1211  std::vector< std::vector<double> > m_PrimChargesCorrel;
1212  std::vector< std::vector<double> > m_FinalChargesCorrel;
1213 
1214  // Conserved charges susceptibility matrix
1215  std::vector< std::vector<double> > m_Susc;
1216 
1217  // Susceptibility matrix of net-p, net-Q, and net-K
1218  std::vector< std::vector<double> > m_ProxySusc;
1219 
1220  // Cumulants of arbitrary charge calculation
1221  //std::vector< std::vector<double> > m_chi;
1222 
1223  // Contains log of possible errors when checking the calculation
1224  std::string m_ValidityLog;
1225 
1226  double m_wnSum;
1227 
1228  std::string m_TAG;
1229 
1232 
1233 
1234 
1236  virtual double MuShift(int /*id*/) const { return 0.; }
1237 
1238  private:
1239  void ResetChemicalPotentials();
1240 
1241  double GetDensity(long long PDGID, const std::vector<double> *dens);
1242 
1243  class BroydenEquationsChem : public BroydenEquations
1244  {
1245  public:
1246  BroydenEquationsChem(ThermalModelBase *model) : BroydenEquations(), m_THM(model) { m_N = 2; }
1247  std::vector<double> Equations(const std::vector<double> &x);
1248  private:
1249  ThermalModelBase *m_THM;
1250  };
1251 
1252  class BroydenJacobianChem : public BroydenJacobian
1253  {
1254  public:
1255  BroydenJacobianChem(ThermalModelBase *model) : BroydenJacobian(), m_THM(model) { }
1256  std::vector<double> Jacobian(const std::vector<double> &x);
1257  private:
1258  ThermalModelBase *m_THM;
1259  };
1260 
1261  class BroydenChem : public Broyden
1262  {
1263  public:
1264  BroydenChem(ThermalModelBase *THM, BroydenEquations *eqs = NULL, BroydenJacobian *jaco = NULL) : Broyden(eqs, jaco) { m_THM = THM; }
1265  ~BroydenChem(void) { }
1266  std::vector<double> Solve(const std::vector<double> &x0, BroydenSolutionCriterium *solcrit = NULL, int max_iterations = MAX_ITERS);
1267  private:
1268  ThermalModelBase *m_THM;
1269  };
1270 
1271 
1272  class BroydenEquationsChemTotals : public BroydenEquations
1273  {
1274  public:
1275  BroydenEquationsChemTotals(const std::vector<int> & vConstr, const std::vector<int> & vType, const std::vector<double> & vTotals, ThermalModelBase *model);// : BroydenEquations(), m_THM(model) { m_N = 3; }
1276  std::vector<double> Equations(const std::vector<double> &x);
1277  private:
1278  std::vector<int> m_Constr;
1279  std::vector<int> m_Type;
1280  std::vector<double> m_Totals;
1281  ThermalModelBase *m_THM;
1282  };
1283 
1284  class BroydenJacobianChemTotals : public BroydenJacobian
1285  {
1286  public:
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);
1289  private:
1290  std::vector<int> m_Constr;
1291  std::vector<int> m_Type;
1292  std::vector<double> m_Totals;
1293  ThermalModelBase *m_THM;
1294  };
1295  };
1296 
1297 } // namespace thermalfist
1298 
1299 #endif // THERMALMODELBASE_H
void ConstrainChemicalPotentials(bool resetInitialValues=true)
Constrains the chemical potentials by the conservation laws imposed.
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.
Definition: Broyden.h:131
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)
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.
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.
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).
virtual void SetStrangeness(int S)
Set the total strangeness (for canonical ensemble only)
std::vector< std::vector< double > > m_ProxySusc
double Pi()
Pi constant.
Definition: xMath.h:24
virtual double CalculateEigenvolumeFraction()
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.
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 &params)
The thermal parameters.
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&#39;s method...
Definition: Broyden.h:31
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...
void SetNormBratio(bool normBratio)
Whether branching ratios are renormalized to 100%.
virtual double ParticleKurtosis(int)
Kurtosis of primordial particle number fluctuations for species i.
double KurtosisPrimordial(int id) const
Normalized excess kurtosis of primordial particle number fluctuations for particle species id...
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
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 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...
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...
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 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)
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.
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&#39;s method.
Definition: Broyden.h:76
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&#39;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 .
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
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 &params=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()...
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.
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
void SetVolume(double Volume)
Sets the system volume.
const std::vector< double > & TotalDensities() const