Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LPMFunction.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// -------------------------------------------------------------------
28//
29// GEANT4 Class header file
30//
31//
32// File name: G4LPMFunction
33//
34// Author: Mihaly Novak
35//
36// Creation date: 08 October 2025
37//
38// Modifications:
39//
40// Class Description:
41//
42// The `G(s)` and `\phi(s)` Landau Pomeranchuk Migdal (LPM) suppression
43// functions, utilised both in some bremsstrahlung and pair-production models
44// when computing the actual LPM suppression effect, are factored in this util.
45// The functions are pre-computed and interpolated over the `s \in [0,2)`
46// intervall while approximated at `s > 2` values when they converge to unity.
47//
48// `G(s)` and `\phi(s)` are the spin flip and no flip suppression functions of
49// Migdal (Migdal PR,1956) including some slowly converging series to which
50// approximate expressions were derived by Stanev (Stanev at al. PRD,1982).
51// (See e.g. `G4eBremsstrahlungRelModel::ComputeLPMGsPhis` at Geant4-v.11.3.0
52// on the details of the computation.)
53//
54
55// -------------------------------------------------------------------
56//
57
58#ifndef G4LPMFunction_h
59#define G4LPMFunction_h 1
60
61#include "G4Types.hh"
62
63namespace G4LPMFunction {
64 // Precomputed G(s) and Phi(s) LPM functions.
65 // Grid: s \in [0, 2.0], ds = 0.05 -> N = 41 points, interleaved (G(s),Phi(s))
66 inline constexpr G4double kFuncLPM[] = {
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 };
82
83 // Obtain the `G(s)` and `\phi(s)` LPM suppression functions at any `s >= 0`.
84 inline void GetLPMFunctions(G4double& lpmFuncG, G4double& lpmFuncPhi, G4double sVar) {
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 }
109};
110
111#endif // G4LPMFunction_h
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
void GetLPMFunctions(G4double &lpmFuncG, G4double &lpmFuncPhi, G4double sVar)
constexpr G4double kFuncLPM[]