Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LPMFunction Namespace Reference

Functions

void GetLPMFunctions (G4double &lpmFuncG, G4double &lpmFuncPhi, G4double sVar)

Variables

constexpr G4double kFuncLPM []

Function Documentation

◆ GetLPMFunctions()

void G4LPMFunction::GetLPMFunctions ( G4double & lpmFuncG,
G4double & lpmFuncPhi,
G4double sVar )
inline

Definition at line 84 of file G4LPMFunction.hh.

84 {
85 // sanity check (s should be >= 0)
86 if (sVar < 0.0) {
87 lpmFuncG = 0.0;
88 lpmFuncPhi = 0.0;
89 return;
90 }
91 // case of `s in [0, 2)` use the precomputed functions and interpolate
92 const G4double lpmSLimit = 2.0; // max_s:=2
93 const G4double lpmISDelt = 20.0; // deta_s:=0.05, 1/delta_s=20
94 if (sVar < lpmSLimit) {
95 G4double val = sVar*lpmISDelt;
96 G4int ilow = static_cast<G4int>(val);
97 val -= ilow;
98 ilow *= 2;
99 lpmFuncG = (kFuncLPM[ilow+2] - kFuncLPM[ilow] )*val + kFuncLPM[ilow];
100 lpmFuncPhi = (kFuncLPM[ilow+3] - kFuncLPM[ilow+1])*val + kFuncLPM[ilow+1];
101 return;
102 }
103 // asymptotic case: G(s), Phi(s) goes to 1.0
104 G4double ss = 1.0/(sVar*sVar);
105 ss *= ss;
106 lpmFuncG = 1.0 - 0.0230655*ss;
107 lpmFuncPhi = 1.0 - 0.01190476*ss;
108 }
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
constexpr G4double kFuncLPM[]

Variable Documentation

◆ kFuncLPM

G4double G4LPMFunction::kFuncLPM[]
inlineconstexpr
Initial value:
= {
0.0000E+00, 0.0000E+00, 6.9163E-02, 2.5747E-01, 2.0597E-01, 4.4573E-01,
3.5098E-01, 5.8373E-01, 4.8095E-01, 6.8530E-01, 5.8926E-01, 7.6040E-01,
6.7626E-01, 8.1626E-01, 7.4479E-01, 8.5805E-01, 7.9826E-01, 8.8952E-01,
8.4003E-01, 9.1338E-01, 8.7258E-01, 9.3159E-01, 8.9794E-01, 9.4558E-01,
9.1776E-01, 9.5640E-01, 9.3332E-01, 9.6483E-01, 9.4560E-01, 9.7143E-01,
9.5535E-01, 9.7664E-01, 9.6313E-01, 9.8078E-01, 9.6939E-01, 9.8408E-01,
9.7444E-01, 9.8673E-01, 9.7855E-01, 9.8888E-01, 9.8191E-01, 9.9062E-01,
9.8467E-01, 9.9204E-01, 9.8695E-01, 9.9321E-01, 9.8884E-01, 9.9417E-01,
9.9042E-01, 9.9497E-01, 9.9174E-01, 9.9564E-01, 9.9285E-01, 9.9619E-01,
9.9379E-01, 9.9666E-01, 9.9458E-01, 9.9706E-01, 9.9526E-01, 9.9739E-01,
9.9583E-01, 9.9768E-01, 9.9632E-01, 9.9794E-01, 9.9674E-01, 9.9818E-01,
9.9710E-01, 9.9839E-01, 9.9741E-01, 9.9857E-01, 9.9767E-01, 9.9873E-01,
9.9790E-01, 9.9887E-01, 9.9809E-01, 9.9898E-01, 9.9826E-01, 9.9909E-01,
9.9840E-01, 9.9918E-01, 9.9856E-01, 9.9926E-01
}

Definition at line 66 of file G4LPMFunction.hh.

66 {
67 0.0000E+00, 0.0000E+00, 6.9163E-02, 2.5747E-01, 2.0597E-01, 4.4573E-01,
68 3.5098E-01, 5.8373E-01, 4.8095E-01, 6.8530E-01, 5.8926E-01, 7.6040E-01,
69 6.7626E-01, 8.1626E-01, 7.4479E-01, 8.5805E-01, 7.9826E-01, 8.8952E-01,
70 8.4003E-01, 9.1338E-01, 8.7258E-01, 9.3159E-01, 8.9794E-01, 9.4558E-01,
71 9.1776E-01, 9.5640E-01, 9.3332E-01, 9.6483E-01, 9.4560E-01, 9.7143E-01,
72 9.5535E-01, 9.7664E-01, 9.6313E-01, 9.8078E-01, 9.6939E-01, 9.8408E-01,
73 9.7444E-01, 9.8673E-01, 9.7855E-01, 9.8888E-01, 9.8191E-01, 9.9062E-01,
74 9.8467E-01, 9.9204E-01, 9.8695E-01, 9.9321E-01, 9.8884E-01, 9.9417E-01,
75 9.9042E-01, 9.9497E-01, 9.9174E-01, 9.9564E-01, 9.9285E-01, 9.9619E-01,
76 9.9379E-01, 9.9666E-01, 9.9458E-01, 9.9706E-01, 9.9526E-01, 9.9739E-01,
77 9.9583E-01, 9.9768E-01, 9.9632E-01, 9.9794E-01, 9.9674E-01, 9.9818E-01,
78 9.9710E-01, 9.9839E-01, 9.9741E-01, 9.9857E-01, 9.9767E-01, 9.9873E-01,
79 9.9790E-01, 9.9887E-01, 9.9809E-01, 9.9898E-01, 9.9826E-01, 9.9909E-01,
80 9.9840E-01, 9.9918E-01, 9.9856E-01, 9.9926E-01
81 };

Referenced by GetLPMFunctions().