File indexing completed on 2025-09-18 09:14:07
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 #ifndef G4BetheHeitlerModel_h
0049 #define G4BetheHeitlerModel_h 1
0050
0051 #include "G4VEmModel.hh"
0052 #include "G4PhysicsTable.hh"
0053 #include "G4Log.hh"
0054
0055 #include <vector>
0056
0057 class G4ParticleChangeForGamma;
0058 class G4Pow;
0059 class G4EmElementXS;
0060
0061 class G4BetheHeitlerModel : public G4VEmModel
0062 {
0063
0064 public:
0065
0066 explicit G4BetheHeitlerModel(const G4ParticleDefinition* p = nullptr,
0067 const G4String& nam = "BetheHeitler");
0068
0069 ~G4BetheHeitlerModel() override;
0070
0071 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0072
0073 void InitialiseLocal(const G4ParticleDefinition*,
0074 G4VEmModel* masterModel) override;
0075
0076 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
0077 G4double kinEnergy,
0078 G4double Z,
0079 G4double A=0.,
0080 G4double cut=0.,
0081 G4double emax=DBL_MAX) override;
0082
0083 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0084 const G4MaterialCutsCouple*,
0085 const G4DynamicParticle*,
0086 G4double tmin,
0087 G4double maxEnergy) override;
0088
0089
0090 G4BetheHeitlerModel & operator=(const G4BetheHeitlerModel &right) = delete;
0091 G4BetheHeitlerModel(const G4BetheHeitlerModel&) = delete;
0092
0093 protected:
0094
0095 inline G4double ScreenFunction1(const G4double delta);
0096
0097 inline G4double ScreenFunction2(const G4double delta);
0098
0099 inline void ScreenFunction12(const G4double delta, G4double &f1, G4double &f2);
0100
0101 void InitialiseElementData();
0102
0103 struct ElementData {
0104 G4double fDeltaMaxLow;
0105 G4double fDeltaMaxHigh;
0106 };
0107
0108 static const G4int gMaxZet;
0109
0110 G4Pow* fG4Calc;
0111 const G4ParticleDefinition* fTheGamma;
0112 const G4ParticleDefinition* fTheElectron;
0113 const G4ParticleDefinition* fThePositron;
0114 G4ParticleChangeForGamma* fParticleChange;
0115 G4EmElementXS* fXSection{nullptr};
0116
0117 G4bool isFirstInstance{false};
0118 G4bool useEPICS2017{false};
0119
0120 static std::vector<ElementData*> gElementData;
0121 };
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141 inline G4double G4BetheHeitlerModel::ScreenFunction1(const G4double delta)
0142 {
0143 return (delta > 1.4) ? 42.038 - 8.29*G4Log(delta + 0.958)
0144 : 42.184 - delta*(7.444 - 1.623*delta);
0145 }
0146
0147
0148 inline G4double G4BetheHeitlerModel::ScreenFunction2(const G4double delta)
0149 {
0150 return (delta > 1.4) ? 42.038 - 8.29*G4Log(delta + 0.958)
0151 : 41.326 - delta*(5.848 - 0.902*delta);
0152 }
0153
0154
0155 inline void G4BetheHeitlerModel::ScreenFunction12(const G4double delta,
0156 G4double &f1, G4double &f2)
0157 {
0158 if (delta > 1.4) {
0159 f1 = 42.038 - 8.29*G4Log(delta + 0.958);
0160 f2 = f1;
0161 } else {
0162 f1 = 42.184 - delta*(7.444 - 1.623*delta);
0163 f2 = 41.326 - delta*(5.848 - 0.902*delta);
0164 }
0165 }
0166
0167 #endif