Garfield++ 4.0
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>
5
6namespace Heed {
7
8using CLHEP::c_squared;
9
10double lorgamma_1(double beta) {
11 if (beta == 0.0) return 0.0;
12 if (beta >= 1.0) {
13 mcout << "double lorgamma_1(double beta): ERROR: beta>=1.0, beta=" << beta
14 << "\n";
16 }
17 beta *= beta;
18 const double g2_1 = beta / (1. - beta);
19 const double gam = sqrt(g2_1 + 1.);
20 return g2_1 / (gam + 1.);
21}
22
23double lorbeta(const double gamma_1) {
24 return sqrt(gamma_1 * (gamma_1 + 2.)) / (gamma_1 + 1.);
25}
26
27double lorbeta2(const double gamma_1) {
28 const double g = gamma_1 + 1;
29 return (gamma_1 * (gamma_1 + 2.)) / (g * g);
30}
31
32double lorbeta(const double momentum, const double mass) {
33 double x = (mass * mass * c_squared) / (momentum * momentum);
34 x = x + 1.0;
35 return sqrt(1. / x);
36}
37}
#define spexit(stream)
Definition: FunNameStack.h:256
Definition: BGMesh.cpp:6
double lorbeta(const double gamma_1)
as function of .
Definition: lorgamma.cpp:23
double lorgamma_1(double beta)
as function of .
Definition: lorgamma.cpp:10
double lorbeta2(const double gamma_1)
as function of .
Definition: lorgamma.cpp:27
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314
#define mcout
Definition: prstream.h:126
#define mcerr
Definition: prstream.h:128