Version: SMASH-3.4
distributions.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2020,2022
3  * SMASH Team
4  *
5  * GNU General Public License (GPLv3 or later)
6  */
7 #ifndef SRC_INCLUDE_SMASH_DISTRIBUTIONS_H_
8 #define SRC_INCLUDE_SMASH_DISTRIBUTIONS_H_
9 
10 namespace smash {
11 
12 /**
13  * Returns a relativistic Breit-Wigner distribution. The normalization is such
14  * that the integration over \f$ \sqrt{s} \f$ from 0 to infinity yields one.
15  *
16  * \param[in] m Argument of the Breit-Wigner function (off-shell mass m in GeV)
17  * \param[in] pole Resonance pole mass \f$ m_0 \f$ in GeV
18  * \param[in] width Resonance width \f$ \Gamma \f$ in GeV
19  *
20  * \return \f$ \frac{2}{\pi} \frac{m^2\Gamma}{(m^2-m_0^2)^2 + m^2\Gamma^2} \f$
21  */
22 double breit_wigner(double m, double pole, double width);
23 
24 /**
25  * Returns a non-relativistic Breit-Wigner distribution, which is essentially
26  * a Cauchy distribution with half width.
27  *
28  * \param[in] m Argument of the Breit-Wigner function (off-shell mass m in GeV)
29  * \param[in] pole resonance pole mass \f$ m_0 \f$ in GeV
30  * \param[in] width resonance width \f$ \Gamma \f$ in GeV
31  *
32  * \return \f$ \frac{\Gamma/2}{\pi ((m-m_0)^2+\Gamma^2/4)}\f$
33  */
34 double breit_wigner_nonrel(double m, double pole, double width);
35 
36 /**
37  * Returns a Cauchy distribution (sometimes also called Lorentz or
38  * non-relativistic Breit-Wigner distribution) with the given parameters.
39  * The normalization is such that integrating over x from -infinity to
40  * +infinity yields one.
41  *
42  * \param x Argument of the Cauchy function in GeV.
43  * \param pole Pole parameter \f$ m_0 \f$ of the Cauchy function in GeV,
44  * i.e. location of the peak.
45  * \param width Width parameter \f$ \Gamma \f$ of the Cauchy function in GeV,
46  * determining the sharpness of the peak.
47  *
48  * \return \f$ \frac{\Gamma}{\pi ((x-m_0)^2+\Gamma^2)}\f$
49  */
50 double cauchy(double x, double pole, double width);
51 
52 /**
53  * density_integrand_mass - off_equilibrium distribution for massive
54  * particles
55  *
56  * \param[in] energy \f$E\f$ (in GeV)
57  * \param[in] momentum_sqr squared \f$p\f$ (in GeV\f$^2\f$)
58  * \param[in] temperature \f$T\f$ (in GeV)
59  * \return \f[f=pe^{-\frac{\sqrt{m^2+p^2}}{T_0}}\f]
60  */
61 double density_integrand_mass(const double energy, const double momentum_sqr,
62  const double temperature);
63 /**
64  * density integrand - 1M_IC massless particles for expanding metric
65  * initialization, see \iref{Bazow:2016oky}
66  *
67  * \param[in] energy \f$E\f$ (in GeV)
68  * \param[in] momentum_sqr squared \f$p\f$ (in GeV\f$^2\f$)
69  * \param[in] temperature \f$T\f$ (in GeV)
70  * \return Value of function 1M_IC
71  */
72 double density_integrand_1M_IC(const double energy, const double momentum_sqr,
73  const double temperature);
74 
75 /**
76  * density integrand - 2M_IC massless particles for expanding metric
77  * initialization, see \iref{Bazow:2016oky}
78  *
79  * \param[in] energy \f$E\f$ (in GeV)
80  * \param[in] momentum_sqr squared \f$p\f$ (in GeV\f$^2\f$)
81  * \param[in] temperature \f$T\f$ (in GeV)
82  * \return Value of function 2M_IC
83  */
84 double density_integrand_2M_IC(const double energy, const double momentum_sqr,
85  const double temperature);
86 
87 /**
88  * Relativistic Juttner distribution function is just a convenience wrapper for
89  * displaying Fermi, Bose, and Boltzmann distributions in one mathematical form.
90  * \param[in] momentum_radial length of the momentum vector [GeV]
91  * \param[in] mass (pole) mass of the particle species [GeV]
92  * \param[in] temperature temperature of the system [GeV]
93  * \param[in] effective_chemical_potential effective chemical potential of
94  * the system [GeV]
95  * \param[in] statistics quantum statistics of the particles species
96  * (+1 for Fermi, -1 for Bose, 0 for Boltzmann)
97  * \return the Juttner distribution function
98  */
99 double juttner_distribution_func(double momentum_radial, double mass,
100  double temperature,
101  double effective_chemical_potential,
102  double statistics);
103 
104 /**
105  * Samples a momentum via rejection method from the non-equilibrium
106  * distribution
107  * \f[f=pe^{-\frac{\sqrt{m^2+p^2}}{T_0}}\f]
108  *
109  * \see density_integrand_mass
110  * \param[in] temperature Temperature \f$T\f$ [GeV]
111  * \param[in] mass Mass of the particle: \f$m = \sqrt{E^2 - p^2}\f$ [GeV]
112  *
113  * \return one possible momentum between mass and 50 GeV
114  */
115 double sample_momenta_non_eq_mass(const double temperature, const double mass);
116 
117 /**
118  * Samples a momentum from the non-equilibrium distribution
119  * 1M_IC from \iref{Bazow:2016oky}
120  *
121  * \see density_integrand_1M_IC
122  * \param[in] temperature Temperature \f$T\f$ [GeV]
123  * \param[in] mass Mass of the particle: \f$m = \sqrt{E^2 - p^2}\f$ [GeV]
124  *
125  * \return one possible momentum between mass and 50 GeV
126  */
127 double sample_momenta_1M_IC(const double temperature, const double mass);
128 
129 /**
130  * Samples a momentum from the non-equilibrium distribution
131  * 2M_IC from \iref{Bazow:2016oky}
132  *
133  * \see density_integrand_2M_IC
134  * \param[in] temperature Temperature \f$T\f$ [GeV]
135  * \param[in] mass Mass of the particle: \f$m = \sqrt{E^2 - p^2}\f$ [GeV]
136  *
137  * \return one possible momentum between mass and 50 GeV
138  */
139 double sample_momenta_2M_IC(const double temperature, const double mass);
140 
141 /**
142  * Samples a momentum from the Maxwell-Boltzmann (thermal) distribution
143  * in a faster way, given by Scott Pratt (see \iref{Pratt:2014vja})
144  * APPENDIX: ALGORITHM FOR GENERATING PARTICLES
145  * math trick: for \f$ x^{n-1}e^{-x} \f$ distribution, sample x by:
146  * \f$ x = -ln(r_1 r_2 r_3 ... r_n) \f$
147  * where \f$ r_i \f$ are uniform random numbers between [0,1)
148  * for \f$ T/m > 0.6 \f$: \f$ p^2 e^{-E/T} = p^2 e^{-p/T} * e^{(p-E)/T} \f$,
149  * where \f$ e^{(p-E)/T}\f$ is used as rejection weight.
150  * Since \f$T/m > 0.6 \f$, \f$ e^{(p-E)/T}\f$ is close to 1.
151  * for \f$ T/m < 0.6 \f$, there are many rejections
152  * another manipulation is used:
153  * \f$ p^2 e^{-E/T} dp = dE \frac{E}{p} p^2 e^{-E/T} \f$
154  * \f$ = dK \frac{p}{E} (K+m)^2 e^{-K/T} e^{-m/T} \f$
155  * \f$ = dK (K^2 + 2mK + m^2) e^{-K/T} \frac{p}{E}\f$
156  * where \f$ \frac{p}{E} \f$ is used as rejection weight.
157  *
158  * \param[in] temperature Temperature \f$T\f$ [GeV]
159  * \param[in] mass Mass of the particle: \f$m = \sqrt{E^2 - p^2}\f$ [GeV]
160  *
161  * \return one possible momentum
162  */
163 double sample_momenta_from_thermal(const double temperature, const double mass);
164 
165 /**
166  * Sample momenta according to the momentum distribution
167  * in \iref{Bazow:2016oky}
168  *
169  * \param[in] temperature The temperature for the distribution [GeV]
170  * \return Radial momentum
171  */
172 double sample_momenta_IC_ES(const double temperature);
173 } // namespace smash
174 
175 #endif // SRC_INCLUDE_SMASH_DISTRIBUTIONS_H_
Definition: action.h:24
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
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...