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
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 explicit G4MicroElecInelasticModel_new(const G4ParticleDefinition* p = nullptr,
0098 const G4String& nam = "MicroElecInelasticModel");
0099 ~G4MicroElecInelasticModel_new() override;
0100
0101 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0102
0103 G4double CrossSectionPerVolume(const G4Material* material,
0104 const G4ParticleDefinition* p,
0105 G4double ekin,
0106 G4double emin,
0107 G4double emax) override;
0108
0109 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0110 const G4MaterialCutsCouple*,
0111 const G4DynamicParticle*,
0112 G4double tmin,
0113 G4double maxEnergy) override;
0114
0115 G4double DifferentialCrossSection(const G4ParticleDefinition * aParticleDefinition,
0116 G4double k, G4double energyTransfer, G4int shell);
0117
0118 G4double ComputeRelativistVelocity(G4double E, G4double mass);
0119
0120 G4double ComputeElasticQmax(G4double T1i, G4double T2i, G4double m1, G4double m2);
0121
0122 G4double BKZ(G4double Ep, G4double mp, G4int Zp, G4double EF);
0123
0124
0125 G4double stepFunc(G4double x);
0126 G4double vrkreussler(G4double v, G4double vF);
0127
0128 G4MicroElecInelasticModel_new & operator=(const G4MicroElecInelasticModel_new &right) = delete;
0129 G4MicroElecInelasticModel_new(const G4MicroElecInelasticModel_new&) = delete;
0130
0131 private:
0132
0133
0134
0135 G4int RandomSelect(G4double energy,const G4String& particle, G4double originalMass, G4int originalZ );
0136
0137 G4double RandomizeCreatedElectronEnergy(G4double secondaryKinetic);
0138
0139 G4double RandomizeEjectedElectronEnergy(const G4ParticleDefinition * aParticleDefinition,
0140 G4double incomingParticleEnergy, G4int shell,
0141 G4double originalMass, G4int originalZ) ;
0142
0143 G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(const G4ParticleDefinition*,
0144 G4double k, G4int shell);
0145
0146 G4double TransferedEnergy(const G4ParticleDefinition*, G4double k,
0147 G4int ionizationLevelIndex, G4double random);
0148
0149 G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0150
0151 G4double QuadInterpolator( G4double e11, G4double e12, G4double e21, G4double e22,
0152 G4double x11, G4double x12, G4double x21, G4double x22,
0153 G4double t1, G4double t2, G4double t, G4double e);
0154
0155
0156
0157 G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
0158
0159
0160 G4VAtomDeexcitation* fAtomDeexcitation = nullptr;
0161 G4Material* nistSi = nullptr;
0162 G4MicroElecMaterialStructure* currentMaterialStructure = nullptr;
0163
0164 typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
0165 typedef std::map<G4String,G4MicroElecCrossSectionDataSet_new*,std::less<G4String> > MapData;
0166 typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
0167 typedef std::map<G4double, std::vector<G4double> > VecMap;
0168
0169
0170 typedef std::map<G4String, MapData*, std::less<G4String> > TCSMap;
0171 TCSMap tableTCS;
0172 typedef std::map<G4String, std::vector<TriDimensionMap>* > dataDiffCSMap;
0173 dataDiffCSMap eDiffDatatable, pDiffDatatable;
0174 dataDiffCSMap eNrjTransStorage, pNrjTransStorage;
0175 typedef std::map<G4String, std::vector<VecMap>* > dataProbaShellMap;
0176 dataProbaShellMap eProbaShellStorage, pProbaShellStorage;
0177 typedef std::map<G4String, std::vector<G4double>* > incidentEnergyMap;
0178 incidentEnergyMap eIncidentEnergyStorage, pIncidentEnergyStorage;
0179 typedef std::map<G4String, VecMap* > TranfEnergyMap;
0180 TranfEnergyMap eVecmStorage, pVecmStorage;
0181 typedef std::map<G4String, G4MicroElecMaterialStructure*, std::less<G4String> > MapStructure;
0182 MapStructure tableMaterialsStructures;
0183
0184 G4String currentMaterial = "";
0185 std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
0186 std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
0187
0188 G4int verboseLevel;
0189 G4bool isInitialised ;
0190 G4bool fasterCode;
0191 G4bool SEFromFermiLevel;
0192
0193 };
0194
0195 #endif