An example of doing partial chemical equilibrium HRG model calculations at the LHC energies using Thermal-FIST
Calculates the evolution of the non-equilibrium chemical potentials (fugacities) and various particle ratios in the hadronic phase of 0-10% central 2.76 TeV Pb-Pb collisions at the LHC.
The particle yield ratios at each temperature are written to a file `PCE.LHC.Ratios.dat'.
The abundances of light nuclei are calculated using the Saha equation.
The source code can be modified to obtain other particle yields, to change the particle list or or the HRG model type (e.g. an excluded volume HRG instead of an ideal HRG), or to explore other collision energies.
#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[])
{
params_chemical_freezeout.
T = 0.155;
params_chemical_freezeout.
muB = 0.;
params_chemical_freezeout.
V = 4700.;
vector<long long> pdgcodes_stable;
pdgcodes_stable.push_back(211);
pdgcodes_stable.push_back(321);
pdgcodes_stable.push_back(2212);
pdgcodes_stable.push_back(3122);
pdgcodes_stable.push_back(3222);
pdgcodes_stable.push_back(3312);
pdgcodes_stable.push_back(3334);
vector< pair<long long, long long> > ratios;
ratios.push_back(make_pair(1000010020, 2212));
ratios.push_back(make_pair(1000020030, 2212));
ratios.push_back(make_pair(1000010030, 2212));
ratios.push_back(make_pair(1000020040, 2212));
ratios.push_back(make_pair(1010010030, 2212));
ratios.push_back(make_pair(1010010040, 2212));
ratios.push_back(make_pair(313, -321));
ratios.push_back(make_pair(113, 211));
ratios.push_back(make_pair(3124, 3122));
ratios.push_back(make_pair(9010221, 211));
ratios.push_back(make_pair(2224, 2212));
FILE* fout_params = fopen("PCE.LHC.Parameters.dat", "w");
fprintf(fout_params, "%15s %15s %15s ", "T[MeV]", "V/Vch", "S/Sch");
for (int i = 0; i < pdgcodes_stable.size(); ++i) {
fprintf(fout_params,
"%15s ", (
"mu_" +
string(parts.
ParticleByPDG(pdgcodes_stable[i]).
Name())).c_str());
}
fprintf(fout_params, "\n");
FILE* fout_ratios = fopen("PCE.LHC.Ratios.dat", "w");
fprintf(fout_ratios, "%15s ", "T[MeV]");
for (int i = 0; i < ratios.size(); ++i) {
}
fprintf(fout_ratios, "\n");
double T0 = params_chemical_freezeout.
T;
double dT = 0.001;
double Tmin = 0.070;
for (double T = T0; T >= Tmin - 1.e-9; T -= dT) {
printf("T = %lf MeV\n", T * 1.e3);
fprintf(fout_params, "%15lf %15lf %15lf ",
T * 1.e3,
);
for (int i = 0; i < pdgcodes_stable.size(); ++i) {
fprintf(fout_params, "%15lf ",
);
}
fprintf(fout_params, "\n");
fprintf(fout_ratios, "%15lf ", T * 1.e3);
for (int i = 0; i < ratios.size(); ++i) {
fprintf(fout_ratios, "%15E ",
}
fprintf(fout_ratios, "\n");
}
fclose(fout_params);
fclose(fout_ratios);
return 0;
}