CbmRoot
HagedornSpectrum.cxx
Go to the documentation of this file.
1 #include "HagedornSpectrum.h"
2 #include "xMath.h"
3 #include <cmath>
4 #include <fstream>
5 #include <iostream>
6 #include <sstream>
7 
9 #include "NumericalIntegration.h"
10 }
11 
12 using namespace std;
13 using namespace HagedornSpectrumNamespace;
14 
15 const double HagedornSpectrum::GeVtoifm = 1. / 0.197; //5.06773;
16 
18 
20  double muB,
21  double mass,
22  double dMu) const {
23  return xMath::BesselK(2, mass / T) * exp((muB + dMu) / T) / 2. / xMath::Pi()
24  / xMath::Pi() * mass * mass * T * GeVtoifm * GeVtoifm * GeVtoifm;
25 }
26 
28  double muB,
29  int type,
30  double dMu) const {
31  double ret = 0.;
32 
33  double mMax = 80.;
34  int iters = 5000;
35  double dM = (mMax - fM0) / iters;
36  for (int i = 0; i < iters; ++i) {
37  double x = fM0 + (0.5 + i) * dM;
38  if (type == 0)
39  ret += fC * pow((x) * (x) + fmo * fmo, -5. / 4.) * exp((x) / fTH)
40  * CalculateParticleDensity(T, muB, x, dMu);
41  if (type == 1)
42  ret += fC * pow((x) * (x) + fmo * fmo, -5. / 4.) * exp((x) / fTH)
43  * CalculateEnergyDensity(T, muB, x, dMu);
44  if (type == 2)
45  ret += fC * pow((x) * (x) + fmo * fmo, -5. / 4.) * exp((x) / fTH)
46  * CalculateEntropyDensity(T, muB, x, dMu);
47  if (type == 3)
48  ret += fC * pow((x) * (x) + fmo * fmo, -5. / 4.) * exp((x) / fTH)
49  * CalculatePressure(T, muB, x, dMu);
50  }
51  return ret * dM;
52 }
53 
55  double muB,
56  double mass,
57  double dMu) const {
58  return T * CalculateParticleDensity(T, muB, mass, dMu);
59 }
60 
62  double muB,
63  double mass,
64  double dMu) const {
65  double ret = 0.;
66  muB /= T;
67  dMu /= T;
68  double tMu = muB + dMu;
69  double tMass = mass / T;
70  ret = 0.;
71 
72  vector<double> x, w;
74 
75  for (int i = 0; i < 32; i++) {
76  double x2 = x[i] * x[i];
77  double E = sqrt(x[i] * x[i] + tMass * tMass);
78  ret += w[i] * x2 * exp(-E + tMu) * (x2 / 3. / E + E - tMu);
79  }
80 
81  return ret / 2. / xMath::Pi() / xMath::Pi() * T * T * T * GeVtoifm * GeVtoifm
82  * GeVtoifm;
83 }
84 
86  double muB,
87  double mass,
88  double dMu) const {
89  return (3 * T
90  + mass * xMath::BesselK1(mass / T) / xMath::BesselK(2, mass / T))
91  * CalculateParticleDensity(T, muB, mass, dMu);
92  double ret = 0.;
93  muB /= T;
94  dMu /= T;
95  double tMu = muB + dMu;
96  double tMass = mass / T;
97  ret = 0.;
98 
99  vector<double> x, w;
101 
102  if (tMu > tMass) return 0.; //cout << "AAAAAAA";
103 
104  for (int i = 0; i < 32; i++) {
105  //double x2 = x[i] * x[i];
106  double E = sqrt(x[i] * x[i] + tMass * tMass);
107  ret += w[i] * x[i] * x[i] * E * exp(-E + tMu);
108  }
109 
110  return ret / 2. / xMath::Pi() / xMath::Pi() * T * T * T * T * GeVtoifm
111  * GeVtoifm * GeVtoifm;
112 }
exp
friend F32vec4 exp(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:134
HagedornSpectrumNamespace
Definition: HagedornSpectrum.cxx:8
HagedornSpectrum::CalculateEntropyDensity
double CalculateEntropyDensity(double T, double muB, double mass=-1., double dMu=0.) const
Definition: HagedornSpectrum.cxx:61
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
HagedornSpectrum::GeVtoifm
static const double GeVtoifm
Definition: HagedornSpectrum.h:9
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
HagedornSpectrum::CalculateParticleDensity
double CalculateParticleDensity(double T, double muB, double mass=-1., double dMu=0.) const
Definition: HagedornSpectrum.cxx:19
HagedornSpectrum::CalculateDensity
double CalculateDensity(double T, double muB, int type=0, double dMu=0.) const
Definition: HagedornSpectrum.cxx:27
GetCoefsIntegrateLaguerre32
void GetCoefsIntegrateLaguerre32(std::vector< double > &x, std::vector< double > &w)
Definition: HRGModel/NumericalIntegration.h:762
HagedornSpectrum::CalculateEnergyDensity
double CalculateEnergyDensity(double T, double muB, double mass=-1., double dMu=0.) const
Definition: HagedornSpectrum.cxx:85
HagedornSpectrum.h
xMath::Pi
double Pi()
Definition: xMath.h:5
HagedornSpectrum::CalculatePressure
double CalculatePressure(double T, double muB, double mass=-1., double dMu=0.) const
Definition: HagedornSpectrum.cxx:54
ThermalModelNoFlowNamespace::GeVtoifm
const Double_t GeVtoifm
Definition: CbmThermalModelNoFlow.cxx:74
xMath::BesselK1
double BesselK1(double x)
Definition: xMath.cxx:140
xMath::BesselK
double BesselK(int n, double x)
Definition: xMath.cxx:180
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
xMath.h
NumericalIntegration.h
HagedornSpectrum::~HagedornSpectrum
~HagedornSpectrum(void)
Definition: HagedornSpectrum.cxx:17