15 #include "gsl/gsl_sf_bessel.h"
25 double breit_wigner(
const double m,
const double pole,
const double width) {
26 const double msqr = m * m;
27 const double dmsqr = msqr - pole * pole;
28 return 2. * msqr * width / (M_PI * (dmsqr * dmsqr + msqr * width * width));
33 return cauchy(m, pole, width / 2.);
37 double cauchy(
double x,
double pole,
double width) {
38 const double dm = x - pole;
39 return width / (M_PI * (dm * dm + width * width));
43 const double temperature) {
44 return momentum_sqr * std::sqrt(momentum_sqr) *
45 std::exp(-energy / temperature);
49 const double temperature) {
50 return ((3.0 / 20.0) * (momentum_sqr / (temperature * temperature)) -
51 (6.0 / 5.0) * (energy / temperature) + (14.0 / 5.0)) *
52 std::exp(-energy / temperature) * momentum_sqr;
56 const double temperature) {
57 return (0.75 + 0.125 * (momentum_sqr / (temperature * temperature)) -
58 (1.0 / 30.0) * (momentum_sqr * energy /
59 (temperature * temperature * temperature)) +
61 (momentum_sqr * momentum_sqr /
62 (temperature * temperature * temperature * temperature))) *
63 std::exp(-energy / temperature) * momentum_sqr;
76 double effective_chemical_potential,
78 const double Boltzmann_factor =
79 std::exp(-(std::sqrt(momentum_radial * momentum_radial + mass * mass) -
80 effective_chemical_potential) /
83 return Boltzmann_factor / (1 + statistics * Boltzmann_factor);
92 const double mom_min = 0.0;
93 const double mom_max =
94 std::sqrt(50. * 50. * temperature * temperature - mass * mass);
97 const double p_non_eq_sq =
98 0.5 * (9 * temperature * temperature +
100 std::sqrt(81 * temperature * temperature + 36 * mass * mass));
101 const double e_non_eq = std::sqrt(p_non_eq_sq + mass * mass);
102 const double probability_max =
107 double energy, momentum_radial, probability;
112 energy = std::sqrt(momentum_radial * momentum_radial + mass * mass);
114 energy, momentum_radial * momentum_radial, temperature);
117 return momentum_radial;
124 double energy_average;
127 const double m_over_T = mass / temperature;
128 energy_average = 3 * temperature + mass * gsl_sf_bessel_K1(m_over_T) /
129 gsl_sf_bessel_Kn(2, m_over_T);
132 energy_average = 3 * temperature;
134 const double momentum_average_sqr =
135 (energy_average - mass) * (energy_average + mass);
136 const double energy_min = mass;
137 const double energy_max = 50. * temperature;
140 const double probability_max =
146 double momentum_radial_sqr, probability;
149 momentum_radial_sqr = (energy - mass) * (energy + mass);
154 return std::sqrt(momentum_radial_sqr);
161 double energy_average;
164 const double m_over_T = mass / temperature;
165 energy_average = 3 * temperature + mass * gsl_sf_bessel_K1(m_over_T) /
166 gsl_sf_bessel_Kn(2, m_over_T);
169 energy_average = 3 * temperature;
171 const double momentum_average_sqr =
172 (energy_average - mass) * (energy_average + mass);
173 const double energy_min = mass;
174 const double energy_max = 50. * temperature;
177 const double probability_max =
183 double momentum_radial_sqr, probability;
186 momentum_radial_sqr = (energy - mass) * (energy + mass);
191 return std::sqrt(momentum_radial_sqr);
198 double momentum_radial, energy;
200 if (temperature > 0.6 * mass) {
205 momentum_radial = temperature * (a + b + c);
206 energy = std::sqrt(momentum_radial * momentum_radial + mass * mass);
208 std::exp((momentum_radial - energy) / temperature)) {
215 const double I1 = mass * mass;
216 const double I2 = 2.0 * mass * temperature;
217 const double I3 = 2.0 * temperature * temperature;
218 const double Itot = I1 + I2 + I3;
220 if (r0 < I1 / Itot) {
222 K = -temperature * std::log(r1);
223 }
else if (r0 < (I1 + I2) / Itot) {
226 K = -temperature * std::log(r1 * r2);
231 K = -temperature * std::log(r1 * r2 * r3);
234 momentum_radial = std::sqrt((energy + mass) * (energy - mass));
240 return momentum_radial;
244 double momentum_radial;
249 momentum_radial = (3.0 / 4.0) * temperature * (a + b + c + d);
251 return momentum_radial;
Collection of useful constants that are known at compile time.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
double sample_momenta_from_thermal(const double temperature, const double mass)
Samples a momentum from the Maxwell-Boltzmann (thermal) distribution in a faster way,...
double sample_momenta_IC_ES(const double temperature)
Sample momenta according to the momentum distribution in Bazow:2016oky .
double breit_wigner(double m, double pole, double width)
Returns a relativistic Breit-Wigner distribution.
double juttner_distribution_func(double momentum_radial, double mass, double temperature, double effective_chemical_potential, double statistics)
Relativistic Juttner distribution function is just a convenience wrapper for displaying Fermi,...
double sample_momenta_non_eq_mass(const double temperature, const double mass)
Samples a momentum via rejection method from the non-equilibrium distribution.
double sample_momenta_1M_IC(const double temperature, const double mass)
Samples a momentum from the non-equilibrium distribution 1M_IC from Bazow:2016oky .
double sample_momenta_2M_IC(const double temperature, const double mass)
Samples a momentum from the non-equilibrium distribution 2M_IC from Bazow:2016oky .
double density_integrand_1M_IC(const double energy, const double momentum_sqr, const double temperature)
density integrand - 1M_IC massless particles for expanding metric initialization, see Bazow:2016oky
static constexpr int LDistributions
double cauchy(double x, double pole, double width)
Returns a Cauchy distribution (sometimes also called Lorentz or non-relativistic Breit-Wigner distrib...
double density_integrand_mass(const double energy, const double momentum_sqr, const double temperature)
density_integrand_mass - off_equilibrium distribution for massive particles
double density_integrand_2M_IC(const double energy, const double momentum_sqr, const double temperature)
density integrand - 2M_IC massless particles for expanding metric initialization, see Bazow:2016oky
double breit_wigner_nonrel(double m, double pole, double width)
Returns a non-relativistic Breit-Wigner distribution, which is essentially a Cauchy distribution with...
static const uint32_t K[64]
The K array.