File indexing completed on 2026-09-13 09:10:17
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
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076 #ifndef G4MICROELECINELASTICMODEL_NEW_HH
0077 #define G4MICROELECINELASTICMODEL_NEW_HH 1
0078
0079 #include "globals.hh"
0080 #include "G4VEmModel.hh"
0081 #include "G4ParticleChangeForGamma.hh"
0082 #include "G4ProductionCutsTable.hh"
0083 #include "G4MicroElecMaterialStructure.hh"
0084 #include "G4MicroElecCrossSectionDataSet_new.hh"
0085 #include "G4Electron.hh"
0086 #include "G4Proton.hh"
0087 #include "G4GenericIon.hh"
0088 #include "G4ParticleDefinition.hh"
0089 #include "G4LogLogInterpolation.hh"
0090 #include "G4VAtomDeexcitation.hh"
0091 #include "G4NistManager.hh"
0092
0093 class G4MicroElecInelasticModel_new : public G4VEmModel
0094 {
0095
0096 public:
0097
0098 explicit G4MicroElecInelasticModel_new(const G4ParticleDefinition* p = nullptr,
0099 const G4String& nam = "MicroElecInelasticModel");
0100 ~G4MicroElecInelasticModel_new() override;
0101
0102 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0103
0104 G4double CrossSectionPerVolume(const G4Material* material,
0105 const G4ParticleDefinition* p,
0106 G4double ekin,
0107 G4double emin,
0108 G4double emax) override;
0109
0110 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0111 const G4MaterialCutsCouple*,
0112 const G4DynamicParticle*,
0113 G4double tmin,
0114 G4double maxEnergy) override;
0115
0116 G4double DifferentialCrossSection(const G4ParticleDefinition * aParticleDefinition,
0117 G4double k, G4double energyTransfer, G4int shell);
0118
0119 G4double ComputeRelativistVelocity(G4double E, G4double mass);
0120
0121 G4double ComputeElasticQmax(G4double T1i, G4double T2i, G4double m1, G4double m2);
0122
0123 G4double BKZ(G4double Ep, G4double mp, G4int Zp, G4double EF);
0124
0125
0126 G4double stepFunc(G4double x);
0127 G4double vrkreussler(G4double v, G4double vF);
0128
0129 G4MicroElecInelasticModel_new & operator=(const G4MicroElecInelasticModel_new &right) = delete;
0130 G4MicroElecInelasticModel_new(const G4MicroElecInelasticModel_new&) = delete;
0131
0132 private:
0133
0134
0135
0136 G4int RandomSelect(G4double energy,const G4String& particle, G4double originalMass, G4int originalZ );
0137
0138 G4double RandomizeCreatedElectronEnergy(G4double secondaryKinetic);
0139
0140 G4double RandomizeEjectedElectronEnergy(const G4ParticleDefinition * aParticleDefinition,
0141 G4double incomingParticleEnergy, G4int shell,
0142 G4double originalMass, G4int originalZ) ;
0143
0144 G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(const G4ParticleDefinition*,
0145 G4double k, G4int shell);
0146
0147 G4double TransferedEnergy(const G4ParticleDefinition*, G4double k,
0148 G4int ionizationLevelIndex, G4double random);
0149
0150 G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0151
0152 G4double QuadInterpolator( G4double e11, G4double e12, G4double e21, G4double e22,
0153 G4double x11, G4double x12, G4double x21, G4double x22,
0154 G4double t1, G4double t2, G4double t, G4double e);
0155
0156
0157
0158 G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
0159
0160
0161 G4VAtomDeexcitation* fAtomDeexcitation = nullptr;
0162 G4Material* nistSi = nullptr;
0163 G4MicroElecMaterialStructure* currentMaterialStructure = nullptr;
0164
0165 typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
0166 typedef std::map<G4String,G4MicroElecCrossSectionDataSet_new*,std::less<G4String> > MapData;
0167 typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
0168 typedef std::map<G4double, std::vector<G4double> > VecMap;
0169
0170
0171 typedef std::map<G4String, MapData*, std::less<G4String> > TCSMap;
0172 TCSMap tableTCS;
0173 typedef std::map<G4String, std::vector<TriDimensionMap>* > dataDiffCSMap;
0174 dataDiffCSMap eDiffDatatable, pDiffDatatable;
0175 dataDiffCSMap eNrjTransStorage, pNrjTransStorage;
0176 typedef std::map<G4String, std::vector<VecMap>* > dataProbaShellMap;
0177 dataProbaShellMap eProbaShellStorage, pProbaShellStorage;
0178 typedef std::map<G4String, std::vector<G4double>* > incidentEnergyMap;
0179 incidentEnergyMap eIncidentEnergyStorage, pIncidentEnergyStorage;
0180 typedef std::map<G4String, VecMap* > TranfEnergyMap;
0181 TranfEnergyMap eVecmStorage, pVecmStorage;
0182 typedef std::map<G4String, G4MicroElecMaterialStructure*, std::less<G4String> > MapStructure;
0183 MapStructure tableMaterialsStructures;
0184
0185 G4String currentMaterial = "";
0186 std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
0187 std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
0188
0189 G4int verboseLevel;
0190 G4bool isInitialised ;
0191 G4bool fasterCode;
0192 G4bool SEFromFermiLevel;
0193
0194 };
0195
0196 #endif