Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
lorgamma.cpp
Go to the documentation of this file.
1#include <cmath>
6
7namespace Heed {
8
9double lorgamma_1(double beta) {
10 if (beta == 0.0) return 0.0;
11 if (beta >= 1.0) {
12 mcout << "double lorgamma_1(double beta): ERROR: beta>=1.0, beta=" << beta
13 << "\n";
15 }
16 beta *= beta;
17 const double g2_1 = beta / (1. - beta);
18 const double gam = sqrt(g2_1 + 1.);
19 return g2_1 / (gam + 1.);
20}
21
22double lorbeta(const double gamma_1) {
23 return sqrt(gamma_1 * (gamma_1 + 2.)) / (gamma_1 + 1.);
24}
25
26double lorbeta2(const double gamma_1) {
27 const double g = gamma_1 + 1;
28 return (gamma_1 * (gamma_1 + 2.)) / (g * g);
29}
30
31double lorbeta(const double momentum, const double mass) {
32 double x = (mass * mass * c_squared) / (momentum * momentum);
33 x = x + 1.0;
34 x = 1.0 / x;
35 x = sqrt(x);
36 return x;
37}
38
39}
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:313
#define spexit(stream)
Definition: FunNameStack.h:536
Definition: BGMesh.cpp:3
double lorbeta(const double gamma_1)
Definition: lorgamma.cpp:22
double lorgamma_1(double beta)
Definition: lorgamma.cpp:9
double lorbeta2(const double gamma_1)
Definition: lorgamma.cpp:26
#define mcout
Definition: prstream.h:133
#define mcerr
Definition: prstream.h:135