File indexing completed on 2025-01-18 09:58:07
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 #ifndef G4DNACPA100ElasticModel_h
0043 #define G4DNACPA100ElasticModel_h 1
0044
0045 #include "G4DNACrossSectionDataSet.hh"
0046 #include "G4Electron.hh"
0047 #include "G4LogLogInterpolation.hh"
0048 #include "G4NistManager.hh"
0049 #include "G4ParticleChangeForGamma.hh"
0050 #include "G4ProductionCutsTable.hh"
0051 #include "G4VDNAModel.hh"
0052
0053 #include <map>
0054
0055 class G4DNACPA100ElasticModel : public G4VDNAModel
0056 {
0057 using TriDimensionMap =
0058 std::map<std::size_t, std::map<const G4ParticleDefinition*,
0059 std::map<G4double, std::map<G4double, G4double>>>>;
0060 using VecMap =
0061 std::map<std::size_t,
0062 std::map<const G4ParticleDefinition*, std::map<G4double, std::vector<G4double>>>>;
0063
0064 public:
0065 explicit G4DNACPA100ElasticModel(const G4ParticleDefinition* p = nullptr,
0066 const G4String& nam = "DNACPA100ElasticModel");
0067
0068 ~G4DNACPA100ElasticModel() override = default;
0069
0070 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0071
0072 G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
0073 G4double ekin, G4double emin, G4double emax) override;
0074
0075 void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
0076 const G4DynamicParticle*, G4double tmin, G4double maxEnergy) override;
0077
0078 inline void SelectStationary(G4bool input);
0079
0080 G4DNACPA100ElasticModel& operator=(const G4DNACPA100ElasticModel& right) = delete;
0081
0082 G4DNACPA100ElasticModel(const G4DNACPA100ElasticModel&) = delete;
0083
0084 inline G4double GetElasticLevel(const std::size_t& l)
0085 {
0086 return fLevels[l];
0087 }
0088
0089 private:
0090 G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
0091 G4bool statCode = false;
0092 G4bool isInitialised = false;
0093 G4int verboseLevel = 0;
0094
0095 G4double Theta(const G4ParticleDefinition* p, G4double k, G4double integrDiff,
0096 const std::size_t& materialID);
0097
0098 G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0099
0100 G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0101
0102 G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0103
0104 G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double x11,
0105 G4double x12, G4double x21, G4double x22, G4double t1, G4double t2,
0106 G4double t, G4double e);
0107
0108 G4double fKillBelowEnergy = 0.;
0109 TriDimensionMap diffCrossSectionData;
0110 VecMap eValuesVect;
0111 std::map<std::size_t, std::map<const G4ParticleDefinition*, std::vector<G4double>>> tValuesVec;
0112
0113 G4double RandomizeCosTheta(G4double k, const std::size_t& materialID);
0114
0115 void ReadDiffCSFile(const std::size_t& id, const G4ParticleDefinition* p, const G4String& file,
0116 const G4double&) override;
0117
0118 const G4Material* fpGuanine = nullptr;
0119 const G4Material* fpG4_WATER = nullptr;
0120 const G4Material* fpDeoxyribose = nullptr;
0121 const G4Material* fpCytosine = nullptr;
0122 const G4Material* fpThymine = nullptr;
0123 const G4Material* fpAdenine = nullptr;
0124 const G4Material* fpPhosphate = nullptr;
0125 const G4ParticleDefinition* fpParticle = nullptr;
0126
0127 G4DNACPA100ElasticModel* fpModelData = nullptr;
0128
0129 std::map<std::size_t , G4double> fLevels;
0130 };
0131
0132
0133
0134 inline void G4DNACPA100ElasticModel::SelectStationary(G4bool input)
0135 {
0136 statCode = input;
0137 }
0138
0139 #endif