File indexing completed on 2025-01-18 09:58:40
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 #ifndef G4MicroElecInelasticModel_h
0044 #define G4MicroElecInelasticModel_h 1
0045
0046
0047 #include "globals.hh"
0048 #include "G4VEmModel.hh"
0049 #include "G4ParticleChangeForGamma.hh"
0050 #include "G4ProductionCutsTable.hh"
0051 #include "G4VAtomDeexcitation.hh"
0052 #include "G4MicroElecSiStructure.hh"
0053
0054 class G4ParticleDefinition;
0055 class G4NistManager;
0056 class G4MicroElecCrossSectionDataSet;
0057
0058 class G4MicroElecInelasticModel : public G4VEmModel
0059 {
0060
0061 public:
0062
0063 G4MicroElecInelasticModel(const G4ParticleDefinition* p = nullptr,
0064 const G4String& nam = "MicroElecInelasticModel");
0065 virtual ~G4MicroElecInelasticModel();
0066
0067 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0068
0069 G4double CrossSectionPerVolume( const G4Material* material,
0070 const G4ParticleDefinition* p,
0071 G4double ekin,
0072 G4double emin,
0073 G4double emax) override;
0074 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0075 const G4MaterialCutsCouple*,
0076 const G4DynamicParticle*,
0077 G4double tmin,
0078 G4double maxEnergy) override;
0079 G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition,
0080 G4double k, G4double energyTransfer,
0081 G4int shell);
0082 G4double TransferedEnergy(G4ParticleDefinition * aParticleDefinition,
0083 G4double incomingParticleEnergy, G4int shell, G4double random) ;
0084
0085 inline void SelectFasterComputation(G4bool input);
0086
0087 G4MicroElecInelasticModel & operator=(const G4MicroElecInelasticModel &right) = delete;
0088 G4MicroElecInelasticModel(const G4MicroElecInelasticModel&) = delete;
0089
0090 protected:
0091 G4ParticleChangeForGamma* fParticleChangeForGamma;
0092
0093 private:
0094 G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition * aParticleDefinition,
0095 G4double incomingParticleEnergy, G4int shell) ;
0096 G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(G4ParticleDefinition * aParticleDefinition,
0097 G4double incomingParticleEnergy, G4int shell) ;
0098 G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0099 G4double QuadInterpolator( G4double e11,
0100 G4double e12,
0101 G4double e21,
0102 G4double e22,
0103 G4double x11,
0104 G4double x12,
0105 G4double x21,
0106 G4double x22,
0107 G4double t1,
0108 G4double t2,
0109 G4double t,
0110 G4double e);
0111
0112 G4int RandomSelect(G4double energy,const G4String& particle );
0113
0114
0115 G4VAtomDeexcitation* fAtomDeexcitation;
0116 G4Material* nistSi;
0117 std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
0118 std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
0119
0120
0121 typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
0122 MapFile tableFile;
0123
0124 typedef std::map<G4String,G4MicroElecCrossSectionDataSet*,std::less<G4String> > MapData;
0125 MapData tableData;
0126
0127 typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
0128 TriDimensionMap eDiffCrossSectionData[7];
0129 TriDimensionMap eNrjTransfData[7];
0130 TriDimensionMap pDiffCrossSectionData[7];
0131 TriDimensionMap pNrjTransfData[7];
0132 std::vector<G4double> eTdummyVec;
0133 std::vector<G4double> pTdummyVec;
0134
0135 typedef std::map<G4double, std::vector<G4double> > VecMap;
0136 VecMap eVecm;
0137 VecMap pVecm;
0138 VecMap eProbaShellMap[7];
0139 VecMap pProbaShellMap[7];
0140
0141
0142 G4MicroElecSiStructure SiStructure;
0143
0144 G4int verboseLevel;
0145 G4bool isInitialised;
0146 G4bool fasterCode;
0147
0148 };
0149
0150
0151
0152 inline void G4MicroElecInelasticModel::SelectFasterComputation (G4bool input)
0153 {
0154 fasterCode = input;
0155 }
0156
0157
0158
0159 #endif