Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
bethe_bloch.cpp
Go to the documentation of this file.
1#include <stdlib.h>
2#include <limits.h>
3#include <cmath>
8
9// 2002, I. Smirnov
10
11namespace Heed {
12
13using CLHEP::pi;
14using CLHEP::twopi;
15using CLHEP::classic_electr_radius;
16using CLHEP::electron_mass_c2;
17using CLHEP::Avogadro;
18using CLHEP::c_squared;
19
20double Bethe_Bloch_energy_loss(const double ratio_Z_to_A, const double I_eff,
21 const double beta, const double z) {
22
23 const double beta2 = beta * beta;
24 const double gamma = lorgamma_1(beta) + 1.;
25 const double gamma2 = gamma * gamma;
26 const double coef1 = 4 * pi * classic_electr_radius * classic_electr_radius *
27 electron_mass_c2 * Avogadro;
28 const double coef2 = z * z * ratio_Z_to_A / beta2;
29 const double sum =
30 log(2. * electron_mass_c2 * beta2 * gamma2 / I_eff) - beta2;
31 return coef1 * coef2 * sum;
32}
33
34double Bethe_Bloch_energy_loss_gamma_1(const double ratio_Z_to_A,
35 const double I_eff, const double gamma_1,
36 const double z) {
37
38 const double beta = lorbeta(gamma_1);
39 const double beta2 = beta * beta;
40 const double gamma = gamma_1 + 1.0;
41 const double gamma2 = gamma * gamma;
42 const double coef1 = 4 * pi * classic_electr_radius * classic_electr_radius *
43 electron_mass_c2 *
44 Avogadro; // should be 0.3071 according to PDG
45 const double coef2 = z * z * ratio_Z_to_A / beta2;
46 const double sum =
47 log(2. * electron_mass_c2 * beta2 * gamma2 / I_eff) - beta2;
48 return coef1 * coef2 * sum;
49}
50
52 const double ratio_Z_to_A, const double I_eff, const double m,
53 const double gamma_1, const double ecut, const double z) {
54
55 const double beta = lorbeta(gamma_1);
56 const double beta2 = beta * beta;
57 const double gamma = gamma_1 + 1.0;
58 const double gamma2 = gamma * gamma;
59 const double coef1 = twopi * classic_electr_radius * classic_electr_radius *
60 electron_mass_c2 *
61 Avogadro; // should be 0.3071 according to PDG
62 const double coef2 = z * z * ratio_Z_to_A / beta2;
63 const double mrat = electron_mass_c2 / (m * c_squared);
64 const double emax = 2.0 * electron_mass_c2 * beta2 * gamma2 /
65 (1.0 + 2.0 * gamma * mrat + mrat * mrat);
66 double sum = 0.;
67 if (ecut >= emax) {
68 sum = log(2.0 * electron_mass_c2 * beta2 * gamma2 * emax / pow(I_eff, 2)) -
69 2.0 * beta2;
70 } else {
71 sum = log(2.0 * electron_mass_c2 * beta2 * gamma2 * ecut / pow(I_eff, 2)) -
72 beta2 * (1.0 + ecut / emax);
73 }
74 return coef1 * coef2 * sum;
75}
76}
Definition: BGMesh.cpp:5
double Bethe_Bloch_energy_loss_gamma_1(const double ratio_Z_to_A, const double I_eff, const double gamma_1, const double z)
Safer version, using gamma - 1 instead of beta.
Definition: bethe_bloch.cpp:34
double lorbeta(const double gamma_1)
as function of .
Definition: lorgamma.cpp:23
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:337
double Bethe_Bloch_energy_loss(const double ratio_Z_to_A, const double I_eff, const double beta, const double z)
Definition: bethe_bloch.cpp:20
double lorgamma_1(double beta)
as function of .
Definition: lorgamma.cpp:10
double Bethe_Bloch_restricted_energy_loss_gamma_1(const double ratio_Z_to_A, const double I_eff, const double m, const double gamma_1, const double ecut, const double z)
Definition: bethe_bloch.cpp:51