Calculates the temperature profile of \( \chi^2 \) of a fit to the ALICE 2.76 TeV data, 0-5% centrality, as in 1512.08046
#include <string.h>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <ctime>
#include <cstdio>
#include "ThermalFISTConfig.h"
#ifdef ThermalFIST_USENAMESPACE
#endif
int main(
int argc,
char *argv[])
{
string listname = string(ThermalFIST_INPUT_FOLDER) + "/list/thermus23/list.dat";
int config = 0;
if (argc > 1)
config = atoi(argv[1]);
string modeltype;
if (config == 0)
{
printf("#Fitting 2.76 TeV ALICE data at \\mu = 0 in Id-HRG model\n");
modeltype = "Id-HRG";
}
else if (config == 1)
{
double rad = 0.3;
}
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);
modeltype = "EV-HRG-TwoComponent";
}
else if (config == 2)
{
double radProton = 0.5;
}
printf("#Fitting 2.76 TeV ALICE data at \\mu = 0 in Bag Model EV-HRG model with proton r = %lf fm\n", radProton);
modeltype = "EV-HRG-BagModel";
}
else if (config == 3)
{
double a = 0.329;
double b = 3.42;
if ((B1 > 0 && B2 > 0) || (B1 < 0 && B2 < 0))
{
}
else
{
}
}
}
printf("#Fitting 2.76 TeV ALICE data at \\mu = 0 in QvdW-HRG model\n");
modeltype = "QvdW-HRG";
}
else
{
modeltype = "Id-HRG";
}
double Rinit = 10.0;
double Rdelta = 1.0;
double Rmin = 0.0;
double Rmax = 30.0;
vector<FittedQuantity> quantities = ThermalModelFit::loadExpDataFromFile(string(ThermalFIST_INPUT_FOLDER) + "/data/ALICE-PbPb2.76TeV-0-5-1512.08046.dat");
printf("%15s%15s%15s%15s\n",
"T[MeV]",
"R[fm]",
"chi2",
"chi2_dof"
);
char tmpc[1000];
sprintf(tmpc, "cpc2.%s.ALICE2_76.chi2.TDep.out", modeltype.c_str());
FILE *fout = fopen(tmpc, "w");
fprintf(fout, "%15s%15s%15s%15s\n",
"T[MeV]",
"R[fm]",
"chi2",
"chi2_dof"
);
int iters = 0;
double Tmin = 0.100;
double Tmax = 0.2501;
double dT = 0.002;
if (config == 0)
dT = 0.001;
if (config == 2) {
dT = 0.005;
Tmax = 0.4001;
}
for (double T = Tmin; T <= Tmax; T += dT) {
printf(
"%15lf%15lf%15lf%15lf\n", T * 1000., Rfit, chi2, chi2 / (result.
ndf - 1.));
fprintf(fout,
"%15lf%15lf%15lf%15lf\n", T * 1000., Rfit, chi2, chi2 / (result.
ndf - 1.));
iters++;
fflush(stdout);
}
fclose(fout);
delete model;
printf("%30s %lf s\n", "Running time:", (wt2 - wt1));
printf("%30s %lf s\n", "Time per single calculation:", (wt2 - wt1) / iters);
return 0;
}