File indexing completed on 2025-01-18 09:58:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 #ifndef G4PairProductionRelModel_h
0054 #define G4PairProductionRelModel_h 1
0055
0056 #include <CLHEP/Units/PhysicalConstants.h>
0057
0058 #include "G4VEmModel.hh"
0059 #include "G4Log.hh"
0060 #include <vector>
0061
0062 class G4ParticleChangeForGamma;
0063 class G4Pow;
0064
0065 class G4PairProductionRelModel : public G4VEmModel
0066 {
0067
0068 public:
0069
0070 explicit G4PairProductionRelModel(const G4ParticleDefinition* p = nullptr,
0071 const G4String& nam = "BetheHeitlerLPM");
0072
0073 ~G4PairProductionRelModel() override;
0074
0075 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0076
0077 void InitialiseLocal(const G4ParticleDefinition*,
0078 G4VEmModel* masterModel) override;
0079
0080 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
0081 G4double kinEnergy,
0082 G4double Z,
0083 G4double A=0.,
0084 G4double cut=0.,
0085 G4double emax=DBL_MAX) override;
0086
0087 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0088 const G4MaterialCutsCouple*,
0089 const G4DynamicParticle*,
0090 G4double tmin,
0091 G4double maxEnergy) override;
0092
0093 void SetupForMaterial(const G4ParticleDefinition*,
0094 const G4Material*,G4double) override;
0095
0096 inline void SetLPMflag(G4bool val) { fIsUseLPMCorrection = val; }
0097 inline G4bool LPMflag() const { return fIsUseLPMCorrection; }
0098
0099 G4PairProductionRelModel & operator=
0100 (const G4PairProductionRelModel &right) = delete;
0101 G4PairProductionRelModel(const G4PairProductionRelModel&) = delete;
0102
0103 protected:
0104
0105
0106 inline void ComputePhi12(const G4double delta,
0107 G4double &phi1, G4double &phi2);
0108 inline G4double ScreenFunction1(const G4double delta);
0109 inline G4double ScreenFunction2(const G4double delta);
0110 inline void ScreenFunction12(const G4double delta,
0111 G4double &f1, G4double &f2);
0112
0113 G4double ComputeParametrizedXSectionPerAtom(G4double gammaEnergy, G4double Z);
0114 G4double ComputeXSectionPerAtom(G4double gammaEnergy, G4double Z);
0115 G4double ComputeDXSectionPerAtom(G4double eplusEnergy, G4double gammaEnergy,
0116 G4double Z);
0117 G4double ComputeRelDXSectionPerAtom(G4double eplusEnergy,
0118 G4double gammaEnergy, G4double Z);
0119
0120 private:
0121
0122
0123 void InitialiseElementData();
0124 struct ElementData {
0125 G4double fLogZ13;
0126 G4double fCoulomb;
0127 G4double fLradEl;
0128 G4double fDeltaFactor;
0129 G4double fDeltaMaxLow;
0130 G4double fDeltaMaxHigh;
0131 G4double fEtaValue;
0132 G4double fLPMVarS1Cond;
0133 G4double fLPMILVarS1Cond;
0134 };
0135
0136
0137 void InitLPMFunctions();
0138 void ComputeLPMGsPhis(G4double &funcGS, G4double &funcPhiS,
0139 const G4double varShat);
0140 void GetLPMFunctions(G4double &lpmGs, G4double &lpmPhis, const G4double sval);
0141 void ComputeLPMfunctions(G4double &fXiS, G4double &fGS, G4double &fPhiS,
0142 const G4double eps, const G4double egamma,
0143 const G4int izet);
0144 struct LPMFuncs {
0145 LPMFuncs() : fIsInitialized(false), fISDelta(100.), fSLimit(2.) {}
0146 G4bool fIsInitialized;
0147 G4double fISDelta;
0148 G4double fSLimit;
0149 std::vector<G4double> fLPMFuncG;
0150 std::vector<G4double> fLPMFuncPhi;
0151 };
0152
0153 protected:
0154 static const G4int gMaxZet;
0155
0156 static const G4double gLPMconstant;
0157
0158 static const G4double gXGL[8];
0159 static const G4double gWGL[8];
0160 static const G4double gFelLowZet[8];
0161 static const G4double gFinelLowZet[8];
0162
0163 static const G4double gXSecFactor;
0164 static const G4double gEgLPMActivation;
0165
0166 static std::vector<ElementData*> gElementData;
0167 static LPMFuncs gLPMFuncs;
0168
0169 G4bool isFirstInstance{false};
0170 G4bool fIsUseLPMCorrection;
0171 G4bool fIsUseCompleteScreening;
0172
0173 G4double fLPMEnergy;
0174
0175 G4double fParametrizedXSectionThreshold;
0176 G4double fCoulombCorrectionThreshold;
0177
0178 G4Pow* fG4Calc;
0179 G4ParticleDefinition* fTheGamma;
0180 G4ParticleDefinition* fTheElectron;
0181 G4ParticleDefinition* fThePositron;
0182 G4ParticleChangeForGamma* fParticleChange;
0183 };
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201 inline void G4PairProductionRelModel::ComputePhi12(const G4double delta,
0202 G4double &phi1,
0203 G4double &phi2)
0204 {
0205 if (delta > 1.4) {
0206 phi1 = 21.0190 - 4.145*G4Log(delta + 0.958);
0207 phi2 = phi1;
0208 } else {
0209 phi1 = 20.806 - delta*(3.190 - 0.5710*delta);
0210 phi2 = 20.234 - delta*(2.126 - 0.0903*delta);
0211 }
0212 }
0213
0214
0215 inline G4double G4PairProductionRelModel::ScreenFunction1(const G4double delta)
0216 {
0217 return (delta > 1.4) ? 42.038 - 8.29*G4Log(delta + 0.958)
0218 : 42.184 - delta*(7.444 - 1.623*delta);
0219 }
0220
0221
0222 inline G4double G4PairProductionRelModel::ScreenFunction2(const G4double delta)
0223 {
0224 return (delta > 1.4) ? 42.038 - 8.29*G4Log(delta + 0.958)
0225 : 41.326 - delta*(5.848 - 0.902*delta);
0226 }
0227
0228
0229 inline void G4PairProductionRelModel::ScreenFunction12(const G4double delta,
0230 G4double &f1, G4double &f2)
0231 {
0232 if (delta > 1.4) {
0233 f1 = 42.038 - 8.29*G4Log(delta + 0.958);
0234 f2 = f1;
0235 } else {
0236 f1 = 42.184 - delta*(7.444 - 1.623*delta);
0237 f2 = 41.326 - delta*(5.848 - 0.902*delta);
0238 }
0239 }
0240
0241 #endif