|
|
|||
Warning, file /include/Geant4/G4LPMFunction.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 // ------------------------------------------------------------------- 0028 // 0029 // GEANT4 Class header file 0030 // 0031 // 0032 // File name: G4LPMFunction 0033 // 0034 // Author: Mihaly Novak 0035 // 0036 // Creation date: 08 October 2025 0037 // 0038 // Modifications: 0039 // 0040 // Class Description: 0041 // 0042 // The `G(s)` and `\phi(s)` Landau Pomeranchuk Migdal (LPM) suppression 0043 // functions, utilised both in some bremsstrahlung and pair-production models 0044 // when computing the actual LPM suppression effect, are factored in this util. 0045 // The functions are pre-computed and interpolated over the `s \in [0,2)` 0046 // intervall while approximated at `s > 2` values when they converge to unity. 0047 // 0048 // `G(s)` and `\phi(s)` are the spin flip and no flip suppression functions of 0049 // Migdal (Migdal PR,1956) including some slowly converging series to which 0050 // approximate expressions were derived by Stanev (Stanev at al. PRD,1982). 0051 // (See e.g. `G4eBremsstrahlungRelModel::ComputeLPMGsPhis` at Geant4-v.11.3.0 0052 // on the details of the computation.) 0053 // 0054 0055 // ------------------------------------------------------------------- 0056 // 0057 0058 #ifndef G4LPMFunction_h 0059 #define G4LPMFunction_h 1 0060 0061 #include "G4Types.hh" 0062 0063 namespace G4LPMFunction { 0064 // Precomputed G(s) and Phi(s) LPM functions. 0065 // Grid: s \in [0, 2.0], ds = 0.05 -> N = 41 points, interleaved (G(s),Phi(s)) 0066 inline constexpr G4double kFuncLPM[] = { 0067 0.0000E+00, 0.0000E+00, 6.9163E-02, 2.5747E-01, 2.0597E-01, 4.4573E-01, 0068 3.5098E-01, 5.8373E-01, 4.8095E-01, 6.8530E-01, 5.8926E-01, 7.6040E-01, 0069 6.7626E-01, 8.1626E-01, 7.4479E-01, 8.5805E-01, 7.9826E-01, 8.8952E-01, 0070 8.4003E-01, 9.1338E-01, 8.7258E-01, 9.3159E-01, 8.9794E-01, 9.4558E-01, 0071 9.1776E-01, 9.5640E-01, 9.3332E-01, 9.6483E-01, 9.4560E-01, 9.7143E-01, 0072 9.5535E-01, 9.7664E-01, 9.6313E-01, 9.8078E-01, 9.6939E-01, 9.8408E-01, 0073 9.7444E-01, 9.8673E-01, 9.7855E-01, 9.8888E-01, 9.8191E-01, 9.9062E-01, 0074 9.8467E-01, 9.9204E-01, 9.8695E-01, 9.9321E-01, 9.8884E-01, 9.9417E-01, 0075 9.9042E-01, 9.9497E-01, 9.9174E-01, 9.9564E-01, 9.9285E-01, 9.9619E-01, 0076 9.9379E-01, 9.9666E-01, 9.9458E-01, 9.9706E-01, 9.9526E-01, 9.9739E-01, 0077 9.9583E-01, 9.9768E-01, 9.9632E-01, 9.9794E-01, 9.9674E-01, 9.9818E-01, 0078 9.9710E-01, 9.9839E-01, 9.9741E-01, 9.9857E-01, 9.9767E-01, 9.9873E-01, 0079 9.9790E-01, 9.9887E-01, 9.9809E-01, 9.9898E-01, 9.9826E-01, 9.9909E-01, 0080 9.9840E-01, 9.9918E-01, 9.9856E-01, 9.9926E-01 0081 }; 0082 0083 // Obtain the `G(s)` and `\phi(s)` LPM suppression functions at any `s >= 0`. 0084 inline void GetLPMFunctions(G4double& lpmFuncG, G4double& lpmFuncPhi, G4double sVar) { 0085 // sanity check (s should be >= 0) 0086 if (sVar < 0.0) { 0087 lpmFuncG = 0.0; 0088 lpmFuncPhi = 0.0; 0089 return; 0090 } 0091 // case of `s in [0, 2)` use the precomputed functions and interpolate 0092 const G4double lpmSLimit = 2.0; // max_s:=2 0093 const G4double lpmISDelt = 20.0; // deta_s:=0.05, 1/delta_s=20 0094 if (sVar < lpmSLimit) { 0095 G4double val = sVar*lpmISDelt; 0096 G4int ilow = static_cast<G4int>(val); 0097 val -= ilow; 0098 ilow *= 2; 0099 lpmFuncG = (kFuncLPM[ilow+2] - kFuncLPM[ilow] )*val + kFuncLPM[ilow]; 0100 lpmFuncPhi = (kFuncLPM[ilow+3] - kFuncLPM[ilow+1])*val + kFuncLPM[ilow+1]; 0101 return; 0102 } 0103 // asymptotic case: G(s), Phi(s) goes to 1.0 0104 G4double ss = 1.0/(sVar*sVar); 0105 ss *= ss; 0106 lpmFuncG = 1.0 - 0.0230655*ss; 0107 lpmFuncPhi = 1.0 - 0.01190476*ss; 0108 } 0109 }; 0110 0111 #endif // G4LPMFunction_h
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|