Thermal-FIST 1.6
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
CosmicEoS.cpp
Go to the documentation of this file.
2
3#include <iostream>
4#include <stdexcept>
5
7
8using namespace std;
9
10namespace thermalfist {
11
13 double CosmicEoS::fpi = 0.133;
14
15// Deprecated, the masses and quantum numbers are now taken from ExtraParticles.h/cpp
17 double LeptonFlavor::m_e = 0.000511;
18
20 double LeptonFlavor::m_mu = 0.105658;
21
23 double LeptonFlavor::m_tau = 1.77684;
24
25 CosmicEoS::CosmicEoS(ThermalModelBase* THMbase, bool pionsinteract) :
26 m_modelHRG(THMbase)
27 {
28 // No strangeness of charm conservation
29 m_modelHRG->SetStrangenessChemicalPotential(0.);
30 m_modelHRG->SetCharmChemicalPotential(0.);
31
32 m_ChemCurrent = std::vector<double>(2 + LeptonFlavor::NumberOfFlavors, 0.);
33 m_Asymmetries = std::vector<double>(2 + LeptonFlavor::NumberOfFlavors, 0.);
34
35 // Default baryon asymmetry
36 double b = 8.6e-11;
37
38 // Default lepton asymmetry (uniform across the three flavors)
39 double l = -(51. / 28.) * b;
40 m_Asymmetries[0] = b;
41 m_Asymmetries[1] = 0.;
42 m_Asymmetries[2] = l / 3.;
43 m_Asymmetries[3] = l / 3.;
44 m_Asymmetries[4] = l / 3.;
45
46 if (true) {
47 vector<long long> pdgs = {22, // photon
48 11, 13, 15, // charged leptons
49 12, 14, 16 // neutrinos
50 };
51 m_ChargedLeptons.resize(3);
52 m_Neutrinos.resize(3);
53
54 std::vector<ThermalParticle *> parts = {
55 &m_Photon,
58 };
59 std::vector<double> degeneracies = {
60 2., 2., 2., 2., 1., 1., 1.
61 };
62 //for (auto pdg : pdgs) {
63 for (int ipdg = 0; ipdg < pdgs.size(); ++ipdg) {
64 long long pdg = pdgs[ipdg];
65
66 *parts[ipdg] = ExtraParticles::ParticleByPdg(pdg);
67 // Check if the particle is already in the "HRG" particle list
68 // if so, take it from there and set its degeneracy to zero in "HRG" to avoid double counting
70 if (m_modelHRG->TPS()->PdgToId(pdg) != -1) {
71 *parts[ipdg] = m_modelHRG->TPS()->Particle(m_modelHRG->TPS()->PdgToId(pdg));
72 m_modelHRG->TPS()->ParticleByPDG(pdg).SetDegeneracy(0.);
73 if (m_modelHRG->TPS()->PdgToId(-pdg) != -1)
74 m_modelHRG->TPS()->ParticleByPDG(-pdg).SetDegeneracy(0.);
75 }
76 if (parts[ipdg]->Degeneracy() == 0)
77 parts[ipdg]->SetDegeneracy(degeneracies[ipdg]);
78 }
79 }
80 else { // Legacy implementation
81
82 // Photon
83 m_Photon = ThermalParticle(true, "photon", 22, 2., -1, 0.);
84
85 // Charged leptons
86 m_ChargedLeptons.push_back(ThermalParticle(true, "e", 11, 2., 1, LeptonFlavor::m_e, 0, 0, -1));
87 m_ChargedLeptons.push_back(ThermalParticle(true, "mu", 13, 2., 1, LeptonFlavor::m_mu, 0, 0, -1));
88 m_ChargedLeptons.push_back(ThermalParticle(true, "tau", 15, 2., 1, LeptonFlavor::m_tau, 0, 0, -1));
89
90 // Neutrinos
91 m_Neutrinos.push_back(ThermalParticle(true, "nu_e", 12, 1., 1, 0.));
92 m_Neutrinos.push_back(ThermalParticle(true, "nu_m", 14, 1., 1, 0.));
93 m_Neutrinos.push_back(ThermalParticle(true, "nu_t", 16, 1., 1, 0.));
94 }
95
96 SetPionsInteracting(pionsinteract);
97 }
98
100 {
101 m_T = T;
102 m_modelHRG->SetTemperature(T);
103 }
104
106 {
107 m_ChemCurrent[1] = muQ;
108 m_modelHRG->SetElectricChemicalPotential(muQ);
109 }
110
112 {
113 m_modelHRG->CalculatePrimordialDensities();
114 }
115
117 {
118 double ret = EntropyDensityHRG();
119
120 ret += m_Photon.Density(m_modelHRG->Parameters(), IdealGasFunctions::EntropyDensity, false, 0.0);
121
122 double muB = m_ChemCurrent[0];
123 double muQ = m_ChemCurrent[1];
124 for (int iL = 0; iL < 3; ++iL) {
125 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EntropyDensity, false, m_ChemCurrent[2 + iL] - muQ);
126 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EntropyDensity, false, -(m_ChemCurrent[2 + iL] - muQ));
127 ret += m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EntropyDensity, false, m_ChemCurrent[2 + iL]);
128 ret += m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EntropyDensity, false, -m_ChemCurrent[2 + iL]);
129 }
130
131 return ret;
132 }
133
135 {
136 double ret = m_modelHRG->EntropyDensity();
137
138 return ret;
139 }
140
142 {
143 //double ret = m_modelHRG->Pressure();
144 double ret = PressureHRG();
145
146 ret += m_Photon.Density(m_modelHRG->Parameters(), IdealGasFunctions::Pressure, false, 0.0);
147
148 double muB = m_ChemCurrent[0];
149 double muQ = m_ChemCurrent[1];
150 for (int iL = 0; iL < 3; ++iL) {
151 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::Pressure, false, m_ChemCurrent[2 + iL] - muQ);
152 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::Pressure, false, -(m_ChemCurrent[2 + iL] - muQ));
153 ret += m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::Pressure, false, m_ChemCurrent[2 + iL]);
154 ret += m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::Pressure, false, -m_ChemCurrent[2 + iL]);
155 }
156
157 return ret;
158 }
159
161 {
162 double ret = m_modelHRG->Pressure();
163
164 return ret;
165 }
166
168 {
169 double ret = EnergyDensityHRG();
170
171 ret += m_Photon.Density(m_modelHRG->Parameters(), IdealGasFunctions::EnergyDensity, false, 0.0);
172
173 double muB = m_ChemCurrent[0];
174 double muQ = m_ChemCurrent[1];
175 for (int iL = 0; iL < 3; ++iL) {
176 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EnergyDensity, false, m_ChemCurrent[2 + iL] - muQ);
177 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EnergyDensity, false, -(m_ChemCurrent[2 + iL] - muQ));
178 ret += m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EnergyDensity, false, m_ChemCurrent[2 + iL]);
179 ret += m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EnergyDensity, false, -m_ChemCurrent[2 + iL]);
180 }
181
182 return ret;
183 }
184
186 {
187 double ret = m_modelHRG->EnergyDensity();
188
189 return ret;
190 }
191
193 {
194 double ret = 0.0;
195
196 double muQ = m_ChemCurrent[1];
197 ret += (-1.) * m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, m_ChemCurrent[2 + iL] - muQ);
198 ret += ( 1.) * m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, -(m_ChemCurrent[2 + iL] - muQ));
199
200 return ret;
201 }
202
204 {
205 double ret = 0.0;
206 double muQ = m_ChemCurrent[1];
207 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::Pressure, false, m_ChemCurrent[2 + iL] - muQ);
208 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::Pressure, false, -(m_ChemCurrent[2 + iL] - muQ));
209 return ret;
210 }
211
213 {
214 double ret = 0.0;
215 double muQ = m_ChemCurrent[1];
216 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EnergyDensity, false, m_ChemCurrent[2 + iL] - muQ);
217 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::EnergyDensity, false, -(m_ChemCurrent[2 + iL] - muQ));
218 return ret;
219 }
220
221 double CosmicEoS::BaryonDensity(bool absolute)
222 {
223 if (!absolute) return m_modelHRG->BaryonDensity();
224 else return m_modelHRG->AbsoluteBaryonDensity();
225 }
226
228 {
229 double ret = ElectricChargeDensityHRG(absolute);
230
231 double mn = -1.;
232 if (absolute)
233 mn = 1.;
234
235 double muB = m_ChemCurrent[0];
236 double muQ = m_ChemCurrent[1];
237 for (int iL = 0; iL < 3; ++iL) {
238 ret += mn * m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, m_ChemCurrent[2 + iL] - muQ);
239 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, -(m_ChemCurrent[2 + iL] - muQ));
240 }
241
242 return ret;
243 }
244
246 {
247 double ret = 0.;
248 if (!absolute) ret = m_modelHRG->ElectricChargeDensity();
249 else ret = m_modelHRG->AbsoluteElectricChargeDensity();
250
251 return ret;
252 }
253
255 {
256 double nI = 0.0;
257 for (int ipart = 0; ipart < HRGModel()->TPS()->Particles().size(); ++ipart) {
258 double iso_chg = IsospinCharge(HRGModel()->TPS()->Particle(ipart));
259 if (absolute)
260 iso_chg = abs(iso_chg);
261 nI += iso_chg * HRGModel()->Densities()[ipart];
262 }
263
264 return nI;
265 }
266
268 {
269 double ret = 0.0;
270
271 double mn = -1.;
272 if (absolute)
273 mn = 1.;
274
275 double muQ = m_ChemCurrent[1];
276 {
277 int iL = static_cast<int>(flavor);
278 ret += m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, m_ChemCurrent[2 + iL] - muQ);
279 ret += mn * m_ChargedLeptons[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, -(m_ChemCurrent[2 + iL] - muQ));
280 ret += m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, m_ChemCurrent[2 + iL]);
281 ret += mn * m_Neutrinos[iL].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, -m_ChemCurrent[2 + iL]);
282 }
283
284 return ret;
285 }
286
287 std::vector<double> CosmicEoS::SolveChemicalPotentials(double T, const std::vector<double>& muInit)
288 {
289 std::vector<double> ret = m_ChemCurrent;
290
291 if (muInit.size() == m_Asymmetries.size())
292 m_ChemCurrent = muInit;
293 else
294 m_ChemCurrent = std::vector<double>(m_Asymmetries.size(), 0);
295
297
299 Broyden broydn(&eqs);
300 //broydn.UseNewton(true);
301
302 Broyden::BroydenSolutionCriterium criterium(1.e-6);
303
304 return broydn.Solve(m_ChemCurrent, &criterium);
305 }
306
308 {
309 int pionid = m_modelHRG->TPS()->PdgToId(211);
310 if (pionid != -1)
311 return m_modelHRG->TPS()->Particle(pionid).Mass();
312 return 0.138;
313 }
314
315 void CosmicEoS::SetPionsInteracting(bool pionsinteract, double fpiChPT)
316 {
317 m_InteractingPions = pionsinteract;
318 ClearEMMs();
319 if (pionsinteract) {
320 HRGModel()->TPS()->ParticleByPDG(211).SetGeneralizedDensity(
322 HRGModel()->TPS()->ParticleByPDG(211),
323 new EMMFieldPressureChPT(HRGModel()->TPS()->ParticleByPDG(211).Mass(), fpiChPT)
324 ));
325 HRGModel()->TPS()->ParticleByPDG(111).SetGeneralizedDensity(
327 HRGModel()->TPS()->ParticleByPDG(111),
328 new EMMFieldPressureChPT(HRGModel()->TPS()->ParticleByPDG(111).Mass(), fpiChPT)
329 ));
330 HRGModel()->TPS()->ParticleByPDG(-211).SetGeneralizedDensity(
332 HRGModel()->TPS()->ParticleByPDG(-211),
333 new EMMFieldPressureChPT(HRGModel()->TPS()->ParticleByPDG(-211).Mass(), fpiChPT)
334 ));
335 }
336 }
337
338 void CosmicEoS::SetKaonsInteracting(bool kaonsinteract, double fkaChPT)
339 {
340 //m_InteractingKaons = kaonsinteract;
341 ClearEMMByPdg(321);
342 ClearEMMByPdg(311);
343 ClearEMMByPdg(-311);
344 ClearEMMByPdg(-321);
345 if (kaonsinteract) {
346 HRGModel()->TPS()->ParticleByPDG(321).SetGeneralizedDensity(
348 HRGModel()->TPS()->ParticleByPDG(321),
349 new EMMFieldPressureChPT(HRGModel()->TPS()->ParticleByPDG(321).Mass(), fkaChPT)
350 ));
351 HRGModel()->TPS()->ParticleByPDG(-321).SetGeneralizedDensity(
353 HRGModel()->TPS()->ParticleByPDG(-321),
354 new EMMFieldPressureChPT(HRGModel()->TPS()->ParticleByPDG(-321).Mass(), fkaChPT)
355 ));
356 HRGModel()->TPS()->ParticleByPDG(311).SetGeneralizedDensity(
358 HRGModel()->TPS()->ParticleByPDG(311),
359 new EMMFieldPressureChPT(HRGModel()->TPS()->ParticleByPDG(311).Mass(), fkaChPT)
360 ));
361 HRGModel()->TPS()->ParticleByPDG(-311).SetGeneralizedDensity(
363 HRGModel()->TPS()->ParticleByPDG(-311),
364 new EMMFieldPressureChPT(HRGModel()->TPS()->ParticleByPDG(-311).Mass(), fkaChPT)
365 ));
366 }
367 }
368
370 {
371 if (!InteractingPions())
372 return abs(ElectricChemicalPotential()) >= GetPionMass();
373 else {
374 return HRGModel()->TPS()->ParticleByPDG(211).GetGeneralizedDensity()->IsBECPhase()
375 || HRGModel()->TPS()->ParticleByPDG(111).GetGeneralizedDensity()->IsBECPhase()
376 || HRGModel()->TPS()->ParticleByPDG(-211).GetGeneralizedDensity()->IsBECPhase();
377 }
378 return false;
379 }
380
381 std::string CosmicEoS::GetSpeciesName(int id) const
382 {
383 if (id == 0)
384 return m_Photon.Name();
385 else {
386 int iL = id - 1;
387 if (iL/2 < m_ChargedLeptons.size())
388 if (iL % 2 == 0)
389 return m_ChargedLeptons[iL/2].Name();
390 else
391 return "anti-" + m_ChargedLeptons[iL/2].Name();
392 else {
393 iL -= 2 * m_ChargedLeptons.size();
394 if (iL/2 < m_Neutrinos.size())
395 if (iL % 2 == 0)
396 return m_Neutrinos[iL/2].Name();
397 else
398 return "anti-" + m_Neutrinos[iL/2].Name();
399 else {
400 throw std::out_of_range("CosmicEoS::GetSpeciesName: id = " + std::to_string(id) + " is out of range!");
401 }
402 }
403 }
404 }
405
406 double CosmicEoS::GetDensity(int id) const
407 {
408 if (id == 0)
409 return m_Photon.Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, 0.);
410 else {
411 double muQ = m_ChemCurrent[1];
412 int iL = id - 1;
413 if (iL/2 < m_ChargedLeptons.size())
414 if (iL % 2 == 0)
415 return m_ChargedLeptons[iL/2].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, m_ChemCurrent[2 + iL/2] - muQ);
416 else
417 return m_ChargedLeptons[iL/2].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, -(m_ChemCurrent[2 + iL/2] - muQ));
418 else {
419 iL -= 2 * m_ChargedLeptons.size();
420 if (iL/2 < m_Neutrinos.size())
421 if (iL % 2 == 0)
422 return m_Neutrinos[iL/2].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, m_ChemCurrent[2 + iL/2]);
423 else
424 return m_Neutrinos[iL/2].Density(m_modelHRG->Parameters(), IdealGasFunctions::ParticleDensity, false, -m_ChemCurrent[2 + iL/2]);
425 else {
426 throw std::out_of_range("CosmicEoS::GetDensity: id = " + std::to_string(id) + " is out of range!");
427 }
428 }
429 }
430 }
431
433 {
434 for (auto& part :m_modelHRG->TPS()->Particles()) {
435 part.ClearGeneralizedDensity();
436 }
437 }
438
439 void CosmicEoS::ClearEMMByPdg(long long pdg)
440 {
441 auto id = m_modelHRG->PdgToId(pdg);
442 if (id != -1)
443 m_modelHRG->TPS()->Particle(id).ClearGeneralizedDensity();
444 else
445 printf("**WARNING** CosmicEoS::ClearEMMByPdg: PDG code %lld not found!\n", pdg);
446 }
447
448 std::vector<double> CosmicEoS::BroydenEquationsCosmology::Equations(const std::vector<double> &x)
449 {
450 std::vector<double> ret(x.size(), 0.);
451
452 // printf("Chemicals: %E %E %E %E %E\n", x[0], x[1], x[2], x[3], x[4]);
453
454 double muB = x[0];
455 double muQ = x[1];
456
457 m_THM->SetBaryonChemicalPotential(muB);
458 m_THM->SetElectricChemicalPotential(muQ);
459 for (int iL = 0; iL < LeptonFlavor::NumberOfFlavors; iL++)
460 {
461 auto flavor = static_cast<LeptonFlavor::Name>(iL);
462 m_THM->SetLeptonChemicalPotential(flavor, x[2 + iL]);
463 }
464
465 m_THM->CalculatePrimordialDensities();
466
467
468 vector<double> constraints = m_THM->m_Asymmetries;
469
470 double s = m_THM->EntropyDensity();
471 double nB = m_THM->BaryonDensity();
472
473 if (constraints[0] != 0.0)
474 ret[0] = (nB / s - constraints[0]) / constraints[0];
475 else
476 ret[0] = nB / m_THM->BaryonDensity(true);
477
478 double nQ = m_THM->ElectricChargeDensity();
479
480 if (constraints[1] != 0.0)
481 ret[1] = (nQ / s - constraints[1]) / constraints[1];
482 // else if (constraints[0] != 0.0)
483 // ret[1] = nQ / nB;
484 else
485 ret[1] = nQ / m_THM->ElectricChargeDensity(true);
486
487 vector<double> nLs(LeptonFlavor::NumberOfFlavors, 0.);
488
489 for (int iL = 0; iL < LeptonFlavor::NumberOfFlavors; iL++)
490 {
491 auto flavor = static_cast<LeptonFlavor::Name>(iL);
492 nLs[iL] = m_THM->LeptonFlavorDensity(flavor);
493
494 if (constraints[2 + iL] != 0.0)
495 ret[2 + iL] = (nLs[iL] / s - constraints[2 + iL]) / constraints[2 + iL];
496 else
497 ret[2 + iL] = nLs[iL] / m_THM->LeptonFlavorDensity(flavor, true);
498 }
499
500 return ret;
501 }
502
503 double IsospinCharge(const ThermalParticle& part)
504 {
505 return 0.5 * (2. * part.ElectricCharge() - part.BaryonCharge() - part.Strangeness() - part.Charm());
506 }
507}
Sub-class where it is determined whether the required accuracy is achieved in the Broyden's method.
Definition Broyden.h:144
Class implementing the Broyden method to solve a system of non-linear equations.
Definition Broyden.h:132
virtual std::vector< double > Solve(const std::vector< double > &x0, BroydenSolutionCriterium *solcrit=NULL, int max_iterations=MAX_ITERS)
Definition Broyden.cpp:83
Class implementing the Broyden equations for cosmology.
Definition CosmicEoS.h:443
std::vector< double > Equations(const std::vector< double > &x)
Implements the equations to be solved.
double PressureHRG()
Calculates the partial pressure of the HRG part.
std::string GetSpeciesName(int id) const
Gets the name of particle species of given id.
void ClearEMMByPdg(long long pdg)
Clears the effective mass model by PDG code.
bool m_InteractingPions
Whether to include pion interactions.
Definition CosmicEoS.h:412
std::vector< double > SolveChemicalPotentials(double T, const std::vector< double > &muInit=std::vector< double >())
Calculates the values of the chemical potential (B,Q,{L}) that satisfy the given asymmetry constraint...
double EnergyDensity()
Calculates the total energy density.
virtual void SetElectricChemicalPotential(double muQ)
Set the electric chemical potential.
std::vector< ThermalParticle > m_Neutrinos
Neutrinos.
Definition CosmicEoS.h:406
ThermalParticle m_Photon
Photons.
Definition CosmicEoS.h:400
static double fpi
Pion decay constant for pion interactions a la ChPT.
Definition CosmicEoS.h:321
double EntropyDensityHRG()
Calculates the entropy density of the HRG part.
std::vector< double > m_Asymmetries
Vector of asymmetries (baryon, charge, lepton flavors)
Definition CosmicEoS.h:424
CosmicEoS(ThermalModelBase *THMbase, bool pionsinteract=false)
Constructor.
Definition CosmicEoS.cpp:25
std::vector< double > m_ChemCurrent
Vector of chemical potentials (baryon, charge, lepton flavors)
Definition CosmicEoS.h:421
double ElectricChargeDensity(bool absolute=false)
Calculates the electric charge density.
ThermalModelBase * HRGModel() const
Gets the pointer to the HRG model object.
Definition CosmicEoS.h:78
double PressureChargedLepton(int iL)
Calculates the partial pressure of charged lepton flavor.
std::vector< ThermalParticle > m_ChargedLeptons
Charged leptons.
Definition CosmicEoS.h:403
double EnergyDensityHRG()
Calculates the energy density of the HRG part.
bool InPionCondensedPhase() const
Checks if the system has non-zero BEC of pions.
double ElectricChargeDensityHRG(bool absolute=false)
Calculates the electric charge density of the HRG part.
void SetPionsInteracting(bool pionsinteract=true, double fpiChPT=fpi)
Sets whether to include pion interactions via effective mass model.
virtual void SetTemperature(double T)
Set the temperature.
Definition CosmicEoS.cpp:99
double EnergyDensityChargedLepton(int iL)
Calculates the energy density of charged lepton flavor.
void CalculatePrimordialDensities()
Calculates number densities of all particle species.
double NetDensityChargedLepton(int iL)
Calculates the net density of charged lepton flavor.
void ClearEMMs()
Clears the effective mass models.
double BaryonDensity(bool absolute=false)
Calculates the total baryon density.
double GetPionMass() const
Gets the mass of pi+.
void SetKaonsInteracting(bool kaonsinteract=true, double fkaChPT=fpi *1.2)
Sets whether to include kaon interactions via effective mass model.
double Pressure()
Calculates the total pressure.
bool InteractingPions() const
Checks if pions are interacting in the model.
Definition CosmicEoS.h:353
double ElectricChemicalPotential() const
Gets the current electric chemical potential.
Definition CosmicEoS.h:127
double LeptonFlavorDensity(LeptonFlavor::Name flavor, bool absolute=false)
Calculates the lepton flavor density.
double EntropyDensity()
Calculates the total entropy density.
ThermalModelBase * m_modelHRG
Pointer to an HRG model object.
Definition CosmicEoS.h:397
double IsospinChargeDensity(bool absolute=false)
Calculates the isospin charge density.
double GetDensity(int id) const
Gets the number density for given species.
double m_T
Temperature in GeV.
Definition CosmicEoS.h:418
Effective mass model matched to chiral perturbation theory for pions at T = 0. See supplemental mater...
Class implementing an effective mass model for single particle species.
Abstract base class for an HRG model implementation.
Class containing all information about a particle specie.
int BaryonCharge() const
Particle's baryon number.
int Strangeness() const
Particle's strangeness.
int ElectricCharge() const
Particle's electric charge.
int Charm() const
Particle's charm.
const ThermalParticle & ParticleByPdg(long long pdg)
The main namespace where all classes and functions of the Thermal-FIST library reside.
Definition CosmicEoS.h:9
double IsospinCharge(const ThermalParticle &part)
Calculates the isospin charge of a particle.
static const int NumberOfFlavors
Number of lepton flavors.
Definition CosmicEoS.h:38
static double m_mu
Muon mass.
Definition CosmicEoS.h:44
Name
Set of all conserved charges considered.
Definition CosmicEoS.h:31
static double m_e
Electron mass.
Definition CosmicEoS.h:41
static double m_tau
Tauon mass.
Definition CosmicEoS.h:47