20 #include "ThermalFISTConfig.h" 24 #ifdef ThermalFIST_USENAMESPACE 30 int main(
int argc,
char *argv[])
34 ModelType = atoi(argv[1]);
36 std::string prefix =
"QvdW-HRG";
41 vector<double> Tvalues, muvalues;
47 Tvalues.push_back(0.100); muvalues.push_back(0.600);
49 Tvalues.push_back(0.130); muvalues.push_back(0.500);
51 Tvalues.push_back(0.160); muvalues.push_back(0.000);
76 for (
int i1 = 0; i1 < model->
TPS()->
Particles().size(); ++i1) {
77 for (
int i2 = 0; i2 < model->
TPS()->
Particles().size(); ++i2) {
117 printf(
"%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s\n",
118 "T[GeV]",
"muB[GeV]",
119 "P[GeV/fm3]",
"e[GeV/fm3]",
"s[fm-3]",
120 "<K+>",
"<pi+>",
"<K+>/<pi+>",
123 "chi3B/chi2B",
"chi4B/chi2B",
124 "chi3Q/chi2Q",
"chi4Q/chi2Q",
125 "chi3S/chi2S",
"chi4S/chi2S");
128 std::string filename = prefix +
".CalculationTmu.dat";
129 FILE *f = fopen(filename.c_str(),
"w");
130 fprintf(f,
"%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s\n",
131 "T[GeV]",
"muB[GeV]",
132 "P[GeV/fm3]",
"e[GeV/fm3]",
"s[fm-3]",
133 "<K+>",
"<pi+>",
"<K+>/<pi+>",
136 "chi3B/chi2B",
"chi4B/chi2B",
137 "chi3Q/chi2Q",
"chi4Q/chi2Q",
138 "chi3S/chi2S",
"chi4S/chi2S");
141 for (
int i = 0; i < Tvalues.size(); ++i) {
142 double T = Tvalues[i];
143 double muB = muvalues[i];
191 double yieldKplus = model->
GetDensity(321, Feeddown::StabilityFlag) * model->
Volume();
192 double yieldpiplus = model->
GetDensity(211, Feeddown::StabilityFlag) * model->
Volume();
216 vector<double> chchis;
219 for (
int i = 0; i < model->
TPS()->
Particles().size(); ++i) {
220 chargesB[i] = model->
TPS()->
Particles()[i].BaryonCharge();
225 double chi2B = chchis[1];
226 double chi3B = chchis[2];
227 double chi4B = chchis[3];
230 for (
int i = 0; i < model->
TPS()->
Particles().size(); ++i) {
231 chargesQ[i] = model->
TPS()->
Particles()[i].ElectricCharge();
235 double chi2Q = chchis[1];
236 double chi3Q = chchis[2];
237 double chi4Q = chchis[3];
240 for (
int i = 0; i < model->
TPS()->
Particles().size(); ++i) {
241 chargesS[i] = model->
TPS()->
Particles()[i].Strangeness();
245 double chi2S = chchis[1];
246 double chi3S = chchis[2];
247 double chi4S = chchis[3];
250 printf(
"%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf\n",
258 yieldKplus/yieldpiplus,
270 fprintf(f,
"%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf\n",
278 yieldKplus / yieldpiplus,
Abstract base class for an HRG model implementation.
const std::vector< double > & Densities() const
virtual void SetGammaS(double gammaS)
Set the strange quark fugacity factor.
virtual void SetBaryonChemicalPotential(double muB)
Set the baryon chemical potential.
virtual void SetStatistics(bool stats)
virtual void FixParameters()
Method which actually implements ConstrainChemicalPotentials() (for backward compatibility).
void SetUseWidth(bool useWidth)
Sets whether finite resonance widths are used. Deprecated.
int PdgToId(long long pdgid)
Transforms PDG ID to a 0-based particle id number.
Class containing the particle list.
virtual void SetTemperature(double T)
Set the temperature.
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 void SetVirial(int, int, double)
Set the excluded volume coefficient .
double ChargedMultiplicityFinal(int type=0)
Multiplicity of charged particles including the feeddown contributions in accordance with the stabili...
int BaryonCharge() const
Particle's baryon number.
Class containing all information about a particle specie.
double ChargedScaledVarianceFinal(int type=0)
Scaled variance of charged particles including the feeddown contributions in accordance with the stab...
double GetDensity(long long PDGID, int feeddown)
Same as GetDensity(int,Feeddown::Type)
const std::vector< ThermalParticle > & Particles() const
Returns the vector of all particle species.
virtual double CalculateEnergyDensity()=0
virtual double CalculateEntropyDensity()=0
virtual void CalculateDensities()
Calculates the primordial and total (after decays) densities of all species.
virtual double CalculatePressure()=0
Implementation of the equation of state functions.
bool ConstrainMuQ() const
virtual void CalculateFluctuations()
Computes the fluctuation observables.
virtual std::vector< double > CalculateChargeFluctuations(const std::vector< double > &chgs, int order=4)
Calculates fluctuations (diagonal susceptibilities) of an arbitrary "conserved" charge.
virtual void SetAttraction(int, int, double)
Set the vdW mean field attraction coefficient .
Class implementing the Ideal HRG model.
double ScaledVarianceTotal(int id) const
Scaled variance of final particle number fluctuations for particle species id.
ThermalModelVDW ThermalModelVDWFull
For backward compatibility.
int main(int argc, char *argv[])
The main namespace where all classes and functions of the Thermal-FIST library reside.
double Volume() const
System volume (fm )
ThermalParticleSystem * TPS()
void SetVolumeRadius(double R)
Sets the system radius.
bool ConstrainMuS() const