13 #include "ThermalFISTConfig.h" 17 #ifdef ThermalFIST_USENAMESPACE 27 int main(
int argc,
char *argv[])
34 string listname = string(ThermalFIST_INPUT_FOLDER) +
"/list/PDG2014/list.dat";
45 config = atoi(argv[1]);
71 sprintf(tmpc,
"cpc3.%s.chi2.out", fittype.c_str());
72 FILE *fout = fopen(tmpc,
"w");
82 printf(
"%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s\n",
98 fprintf(fout,
"%15s%15s%15s%15s%15s%15s%15s%15s%15s%15s\n",
113 vector<string> names;
114 vector<string> filenames;
116 names.push_back(
"NA49-30GeV-4pi");
117 filenames.push_back(
string(ThermalFIST_INPUT_FOLDER) +
"/data/NA49/NA49-PbPb30AGeV-4pi.dat");
119 names.push_back(
"NA49-40GeV-4pi");
120 filenames.push_back(
string(ThermalFIST_INPUT_FOLDER) +
"/data/NA49/NA49-PbPb40AGeV-4pi.dat");
122 names.push_back(
"NA49-80GeV-4pi");
123 filenames.push_back(
string(ThermalFIST_INPUT_FOLDER) +
"/data/NA49/NA49-PbPb80AGeV-4pi.dat");
125 names.push_back(
"NA49-158GeV-4pi");
126 filenames.push_back(
string(ThermalFIST_INPUT_FOLDER) +
"/data/NA49/NA49-PbPb158AGeV-4pi.dat");
128 names.push_back(
"ALICE-2_76-0-5");
129 filenames.push_back(
string(ThermalFIST_INPUT_FOLDER) +
"/data/ALICE-PbPb2.76TeV-0-5-1512.08046.dat");
139 for(
size_t ind = 0; ind < names.size(); ++ind)
142 vector<FittedQuantity> quantities = ThermalModelFit::loadExpDataFromFile(filenames[ind]);
147 double Tinit = 0.140;
148 double Tdelta = 0.030;
155 double muBinit = 0.250;
156 double muBdelta = 0.150;
157 double muBmin = -0.050;
158 double muBmax = 1.000;
159 fitter.
SetParameter(
"muB", muBinit, muBdelta, muBmin, muBmax);
174 double gqdelta = 0.6;
175 double gqmin = 0.001;
176 double gqmax = 1.800;
179 fitter.
SetParameter(
"gammaq", gqinit, gqdelta, gqmin, gqmax);
187 double gSdelta = 0.6;
188 double gSmin = 0.001;
189 double gSmax = 3.000;
191 fitter.
SetParameter(
"gammaS", gSinit, gSdelta, gSmin, gSmax);
197 double Tfit = result.
T.
value;
198 double Terr = result.
T.
error;
201 double Rfit = result.
R.
value;
202 double Rerr = result.
R.
error;
208 double chi2dof = result.
chi2ndf;
210 printf(
"%15s%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15lf",
228 fprintf(fout,
"%15s%15lf%15lf%15lf%15lf%15lf%15lf%15lf%15E%15E\n",
251 printf(
"%30s %lf s\n",
"Running time:", (wt2 - wt1));
252 printf(
"%30s %lf s\n",
"Time per single calculation:", (wt2 - wt1) / iters);
Abstract base class for an HRG model implementation.
FitParameter T
All the fit parameters.
virtual void SetStatistics(bool stats)
void SetParameter(const std::string &name, const FitParameter ¶m)
Sets the fit parameter with a given name.
void SetUseWidth(bool useWidth)
Sets whether finite resonance widths are used. Deprecated.
void SetQuantities(const std::vector< FittedQuantity > &inQuantities)
Same as SetData()
Class containing the particle list.
double chi2
Value of the function.
virtual double CalculateStrangenessDensity()
virtual double CalculateBaryonDensity()
Class implementing the thermal model fit procedure.
int main(int argc, char *argv[])
virtual double CalculateChargeDensity()
virtual void SetCalculationType(IdealGasFunctions::QStatsCalculationType type)
Sets the CalculationType() method to evaluate quantum statistics. Calls the corresponding method in T...
virtual double CalculateAbsoluteStrangenessDensity()
void SetParameterFitFlag(const std::string &name, bool toFit)
Sets whether the fit parameter with a given name is fitted.
Structure holding information about parameters of a thermal fit.
Class implementing the Ideal HRG model.
ThermalModelFitParameters PerformFit(bool verbose=true, bool AsymmErrors=false)
The thermal fit procedure.
double error
Parameter error (symmetric)
The main namespace where all classes and functions of the Thermal-FIST library reside.