13#include "ThermalFISTConfig.h"
17#ifdef ThermalFIST_USENAMESPACE
29int main(
int argc,
char *argv[])
33 string listname = string(ThermalFIST_INPUT_FOLDER) +
"/list/thermus23/list.dat";
46 config = atoi(argv[1]);
61 printf(
"#Fitting 2.76 TeV ALICE data at \\mu = 0 in Id-HRG model\n");
69 for (
int i = 0; i < model->TPS()->ComponentsNumber(); ++i) {
70 if (model->TPS()->Particle(i).BaryonCharge() == 0) model->
SetRadius(i, 0.);
74 printf(
"#Fitting 2.76 TeV ALICE data at \\mu = 0 in EV-HRG model with r = %lf fm for baryons, and r = 0 for mesons\n", rad);
76 modeltype =
"EV-HRG-TwoComponent";
81 double radProton = 0.5;
82 for (
int i = 0; i < model->TPS()->ComponentsNumber(); ++i) {
83 model->
SetRadius(i, radProton * pow(model->TPS()->Particle(i).Mass() / 0.938, 1/3.));
86 printf(
"#Fitting 2.76 TeV ALICE data at \\mu = 0 in Bag Model EV-HRG model with proton r = %lf fm\n", radProton);
88 modeltype =
"EV-HRG-BagModel";
99 for (
int i = 0; i < model->TPS()->ComponentsNumber(); ++i) {
100 for (
int j = 0; j < model->TPS()->ComponentsNumber(); ++j) {
101 int B1 = model->TPS()->Particle(i).BaryonCharge();
102 int B2 = model->TPS()->Particle(j).BaryonCharge();
104 if ((B1 > 0 && B2 > 0) || (B1 < 0 && B2 < 0))
117 printf(
"#Fitting 2.76 TeV ALICE data at \\mu = 0 in QvdW-HRG model\n");
119 modeltype =
"QvdW-HRG";
125 modeltype =
"Id-HRG";
167 printf(
"%15s%15s%15s%15s\n",
177 sprintf(tmpc,
"cpc2.%s.ALICE2_76.chi2.TDep.out", modeltype.c_str());
178 FILE *fout = fopen(tmpc,
"w");
180 fprintf(fout,
"%15s%15s%15s%15s\n",
193 double Tmax = 0.2501;
204 for (
double T = Tmin; T <= Tmax; T += dT) {
211 double Rfit = result.
R.
value;
212 double chi2 = result.
chi2;
213 double chi2dof = result.
chi2ndf;
215 printf(
"%15lf%15lf%15lf%15lf\n", T * 1000., Rfit, chi2, chi2 / (result.
ndf - 1.));
217 fprintf(fout,
"%15lf%15lf%15lf%15lf\n", T * 1000., Rfit, chi2, chi2 / (result.
ndf - 1.));
232 printf(
"%30s %lf s\n",
"Running time:", (wt2 - wt1));
233 printf(
"%30s %lf s\n",
"Time per single calculation:", (wt2 - wt1) / iters);
Abstract base class for an HRG model implementation.
virtual void SetVirial(int, int, double)
Set the excluded volume coefficient .
virtual void FillChemicalPotentials()
Sets the chemical potentials of all particles.
void SetUseWidth(bool useWidth)
Sets whether finite resonance widths are used. Deprecated.
virtual void SetBaryonChemicalPotential(double muB)
Set the baryon chemical potential.
virtual void SetRadius(double)
Set the same excluded volume radius parameter for all species.
virtual void SetElectricChemicalPotential(double muQ)
Set the electric chemical potential.
virtual void SetStrangenessChemicalPotential(double muS)
Set the strangeness chemical potential.
virtual void SetAttraction(int, int, double)
Set the vdW mean field attraction coefficient .
virtual void SetCharmChemicalPotential(double muC)
Set the charm chemical potential.
virtual void SetStatistics(bool stats)
Class implementing the diagonal excluded-volume model.
Class implementing the thermal model fit procedure.
void SetParameter(const std::string &name, const FitParameter ¶m)
Sets the fit parameter with a given name.
void SetParameterFitFlag(const std::string &name, bool toFit)
Sets whether the fit parameter with a given name is fitted.
void SetQuantities(const std::vector< FittedQuantity > &inQuantities)
Same as SetData()
static std::vector< FittedQuantity > loadExpDataFromFile(const std::string &filename)
Load the experimental data from a file.
void SetParameterValue(const std::string &name, double value)
Sets the (initial) value for the fit parameter with a given name.
ThermalModelFitParameters PerformFit(bool verbose=true, bool AsymmErrors=false)
The thermal fit procedure.
Class implementing the Ideal HRG model.
@ BWTwoGamma
Energy-independent Breit-Wigner in +-2\Gamma interval.
Class containing the particle list.
int main(int argc, char *argv[])
The main namespace where all classes and functions of the Thermal-FIST library reside.
ThermalModelVDW ThermalModelVDWFull
For backward compatibility.
Structure holding information about parameters of a thermal fit.
int ndf
Number of degrees of freedom.
double chi2
Value of the function.