File indexing completed on 2025-01-18 09:58:11
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 virtual ~G4ElectroNuclearCrossSection();
0064
0065 static const char* Default_Name() {return "ElectroNuclearXS";}
0066
0067 virtual void CrossSectionDescription(std::ostream&) const;
0068
0069 virtual G4bool IsElementApplicable(const G4DynamicParticle*, G4int Z,
0070 const G4Material*);
0071 virtual G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
0072 const G4Material* mat);
0073
0074 G4double GetEquivalentPhotonEnergy();
0075
0076 G4double GetVirtualFactor(G4double nu, G4double Q2);
0077
0078 G4double GetEquivalentPhotonQ2(G4double nu);
0079
0080 private:
0081 G4int GetFunctions(G4double a, G4double* x, G4double* y, G4double* z);
0082
0083 G4double ThresholdEnergy(G4int Z, G4int N);
0084 G4double SolveTheEquation(G4double f);
0085 G4double Fun(G4double x);
0086 G4double DFun(G4double x);
0087
0088 G4double HighEnergyJ1(G4double lE);
0089 G4double HighEnergyJ2(G4double lE, G4double E);
0090 G4double HighEnergyJ3(G4double lE, G4double E2);
0091
0092
0093 private:
0094 G4int currentN;
0095 G4int currentZ;
0096
0097
0098 G4int lastZ;
0099 std::vector<cacheEl_t*> cache;
0100 cacheEl_t* lastUsedCacheEl;
0101 G4NistManager* nistmngr;
0102
0103
0104 G4double lastE ;
0105 G4double lastSig;
0106 G4double lastG;
0107 G4int lastL;
0108
0109 const G4double mNeut;
0110 const G4double mProt;
0111 };
0112
0113 #endif