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