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 G4MICROELECELASTICMODEL_NEW_HH
0077 #define G4MICROELECELASTICMODEL_NEW_HH 1
0078
0079 #include <map>
0080 #include <CLHEP/Units/SystemOfUnits.h>
0081 #include "G4MicroElecMaterialStructure.hh"
0082 #include "G4MicroElecCrossSectionDataSet_new.hh"
0083 #include "G4VEmModel.hh"
0084 #include "G4Electron.hh"
0085 #include "G4ParticleChangeForGamma.hh"
0086 #include "G4LogLogInterpolation.hh"
0087 #include "G4ProductionCutsTable.hh"
0088 #include "G4NistManager.hh"
0089
0090 class G4MicroElecElasticModel_new : public G4VEmModel
0091 {
0092
0093 public:
0094 G4MicroElecElasticModel_new(const G4ParticleDefinition* p = 0,
0095 const G4String& nam = "MicroElecElasticModel");
0096 ~G4MicroElecElasticModel_new() override;
0097
0098 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0099
0100 G4double CrossSectionPerVolume(const G4Material* material,
0101 const G4ParticleDefinition* p,
0102 G4double ekin,
0103 G4double emin,
0104 G4double emax) override;
0105
0106 G4double AcousticCrossSectionPerVolume(G4double ekin, G4double kbz, G4double rho,
0107 G4double cs, G4double Aac, G4double Eac,
0108 G4double prefactor);
0109
0110 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0111 const G4MaterialCutsCouple*,
0112 const G4DynamicParticle*,
0113 G4double tmin,
0114 G4double maxEnergy) override;
0115
0116 void SetKillBelowThreshold (G4double threshold);
0117
0118 G4double GetKillBelowThreshold () { return killBelowEnergy; }
0119
0120 G4double DamageEnergy(G4double T,G4double A, G4double Z);
0121
0122 protected:
0123 G4ParticleChangeForGamma* fParticleChangeForGamma;
0124
0125 private:
0126
0127 G4MicroElecElasticModel_new & operator=(const G4MicroElecElasticModel_new &right);
0128 G4MicroElecElasticModel_new(const G4MicroElecElasticModel_new&);
0129
0130
0131 G4double Theta(G4ParticleDefinition * aParticleDefinition, G4double k, G4double integrDiff);
0132 G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0133 G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0134 G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0135 G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22,
0136 G4double x11, G4double x12, G4double x21, G4double x22,
0137 G4double t1, G4double t2, G4double t, G4double e);
0138
0139 G4double RandomizeCosTheta(G4double k);
0140
0141 G4Material* nistSi = nullptr;
0142 G4double killBelowEnergy;
0143 G4double lowEnergyLimit;
0144 G4double lowEnergyLimitOfModel;
0145 G4double highEnergyLimit;
0146 G4bool isInitialised;
0147 G4int verboseLevel;
0148
0149 typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
0150 MapFile tableFile;
0151 typedef std::map<G4String,G4MicroElecCrossSectionDataSet_new*,std::less<G4String> > MapData;
0152
0153
0154 typedef std::map<G4String, MapData*, std::less<G4String> > TCSMap;
0155 TCSMap tableTCS;
0156
0157
0158 typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
0159
0160 typedef std::map<G4String, TriDimensionMap* > ThetaMap;
0161 ThetaMap thetaDataStorage;
0162
0163 typedef std::map<G4String, std::vector<G4double>* > energyMap;
0164 energyMap eIncidentEnergyStorage;
0165
0166 typedef std::map<G4double, std::vector<G4double> > VecMap;
0167
0168 typedef std::map<G4String, VecMap* > ProbaMap;
0169 ProbaMap eProbaStorage;
0170
0171 typedef std::map<G4String, G4MicroElecMaterialStructure*, std::less<G4String> > MapStructure;
0172
0173 MapStructure tableMaterialsStructures;
0174
0175 G4MicroElecMaterialStructure* currentMaterialStructure = nullptr;
0176 typedef std::map<G4String, G4double, std::less<G4String> > MapEnergy;
0177 MapEnergy lowEnergyLimitTable;
0178 MapEnergy highEnergyLimitTable;
0179 MapEnergy workFunctionTable;
0180
0181 G4bool killElectron, acousticModelEnabled;
0182 G4String currentMaterialName;
0183 G4bool isOkToBeInitialised;
0184
0185 };
0186
0187
0188
0189 #endif