File indexing completed on 2026-09-05 09:08:41
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 #ifndef G4ElectroNuclearCrossSection_h
0034 #define G4ElectroNuclearCrossSection_h 1
0035
0036 #include "G4VCrossSectionDataSet.hh"
0037 #include "G4DynamicParticle.hh"
0038 #include "G4Element.hh"
0039 #include "G4ParticleTable.hh"
0040 #include "G4NucleiProperties.hh"
0041 #include "G4NistManager.hh"
0042 #include <vector>
0043 #include "Randomize.hh"
0044 #include "G4Electron.hh"
0045 #include "G4Positron.hh"
0046 #include <map>
0047
0048
0049 struct cacheEl_t {
0050 G4int F;
0051 G4double* J1;
0052 G4double* J2;
0053 G4double* J3;
0054 G4double H;
0055 G4double TH;
0056 };
0057
0058 class G4ElectroNuclearCrossSection : public G4VCrossSectionDataSet
0059 {
0060 public:
0061
0062 G4ElectroNuclearCrossSection();
0063 ~G4ElectroNuclearCrossSection() override;
0064
0065 static const char* Default_Name() {return "ElectroNuclearXS";}
0066
0067 void CrossSectionDescription(std::ostream&) const override;
0068
0069 G4bool IsElementApplicable(const G4DynamicParticle*, G4int Z,
0070 const G4Material*) override;
0071 G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
0072 const G4Material* mat) override;
0073
0074 G4double GetEquivalentPhotonEnergy();
0075
0076 G4double GetVirtualFactor(G4double nu, G4double Q2);
0077
0078 G4double GetEquivalentPhotonQ2(G4double nu);
0079
0080 G4ElectroNuclearCrossSection& operator=
0081 (const G4ElectroNuclearCrossSection &right) = delete;
0082 G4ElectroNuclearCrossSection(const G4ElectroNuclearCrossSection&) = delete;
0083
0084 private:
0085 G4int GetFunctions(G4double a, G4double* x, G4double* y, G4double* z);
0086
0087 G4double ThresholdEnergy(G4int Z, G4int N);
0088 G4double SolveTheEquation(G4double f);
0089 G4double Fun(G4double x);
0090 G4double DFun(G4double x);
0091
0092 G4double HighEnergyJ1(G4double lE);
0093 G4double HighEnergyJ2(G4double lE, G4double E);
0094 G4double HighEnergyJ3(G4double lE, G4double E2);
0095
0096
0097 private:
0098 G4int currentN;
0099 G4int currentZ;
0100
0101
0102 G4int lastZ;
0103 std::vector<cacheEl_t*> cache;
0104 cacheEl_t* lastUsedCacheEl;
0105 G4NistManager* nistmngr;
0106
0107
0108 G4double lastE ;
0109 G4double lastSig;
0110 G4double lastG;
0111 G4int lastL;
0112
0113 const G4double mNeut;
0114 const G4double mProt;
0115 };
0116
0117 #endif