Relativistic Maxwellian distribution

reference: Zenitani2015PoP

Here I try to reproduce the algorithm suggested in Zenitani2015PoP to load relativistic particles in PIC simulations.

Here is the algorithm shown in the paper,

[Zenitani2015PoP].

An analitical form of a boosted relativistic Maxwell distributrion can be written, $$ f\left( {u_x^\prime } \right) = \int_0^\infty {\int_0^{2\pi } {{f^\prime }\left( {{{\mathbf{u}}^\prime }} \right)u_ \bot ^\prime d\phi du_ \bot ^\prime = \frac{{N\left(\Gamma \sqrt {1 + u_x^{\prime 2}} + T\right)}}{{2{\Gamma ^2}{K_2}\left( {1/T} \right)}}\exp \left( { - \frac{{\Gamma \left( {\sqrt {1 + u_x^{\prime 2}} - \beta u_x^\prime } \right)}}{T}} \right),} } $$ where $K_2(x)$ is the modified Bessel function of the second kind.