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 #ifndef G4DNADingfelderChargeDecreaseModel_h
0029 #define G4DNADingfelderChargeDecreaseModel_h 1
0030
0031 #include "G4VEmModel.hh"
0032 #include "G4ParticleChangeForGamma.hh"
0033 #include "G4ProductionCutsTable.hh"
0034
0035 #include "G4Proton.hh"
0036 #include "G4DNAGenericIonsManager.hh"
0037 #include "G4NistManager.hh"
0038
0039 class G4DNADingfelderChargeDecreaseModel : public G4VEmModel
0040 {
0041
0042 public:
0043
0044 G4DNADingfelderChargeDecreaseModel(const G4ParticleDefinition* p = nullptr,
0045 const G4String& nam = "DNADingfelderChargeDecreaseModel");
0046
0047 ~G4DNADingfelderChargeDecreaseModel() override = default;
0048
0049 G4DNADingfelderChargeDecreaseModel & operator=(const G4DNADingfelderChargeDecreaseModel &right) = delete;
0050 G4DNADingfelderChargeDecreaseModel(const G4DNADingfelderChargeDecreaseModel&) = delete;
0051
0052 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0053
0054 G4double CrossSectionPerVolume(const G4Material* material,
0055 const G4ParticleDefinition* p,
0056 G4double ekin,
0057 G4double emin,
0058 G4double emax) override;
0059
0060 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0061 const G4MaterialCutsCouple*,
0062 const G4DynamicParticle*,
0063 G4double tmin,
0064 G4double maxEnergy) override;
0065
0066 inline void SelectStationary(G4bool input);
0067
0068 protected:
0069
0070 G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
0071
0072 private:
0073
0074 G4bool statCode;
0075
0076
0077 const std::vector<G4double>* fpMolWaterDensity = nullptr;
0078
0079 std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
0080 std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
0081
0082 G4bool isInitialised{false};
0083 G4int verboseLevel;
0084
0085
0086
0087 G4double PartialCrossSection(G4double energy, G4int level, const G4ParticleDefinition* particle);
0088
0089 G4double Sum(G4double energy, const G4ParticleDefinition* particle);
0090
0091 G4int RandomSelect(G4double energy, const G4ParticleDefinition* particle);
0092
0093 G4int numberOfPartialCrossSections[3];
0094
0095 G4double f0[2][3];
0096 G4double a0[2][3];
0097 G4double a1[2][3];
0098 G4double b0[2][3];
0099 G4double b1[2][3];
0100 G4double c0[2][3];
0101 G4double d0[2][3];
0102 G4double x0[2][3];
0103 G4double x1[2][3];
0104
0105
0106
0107 G4int NumberOfFinalStates(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
0108
0109 G4ParticleDefinition* OutgoingParticleDefinition(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
0110
0111 G4double WaterBindingEnergyConstant(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
0112
0113 G4double OutgoingParticleBindingEnergyConstant(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
0114
0115
0116 G4ParticleDefinition* protonDef = nullptr;
0117 G4ParticleDefinition* alphaPlusPlusDef = nullptr;
0118 G4ParticleDefinition* alphaPlusDef = nullptr;
0119 G4ParticleDefinition* hydrogenDef = nullptr;
0120 G4ParticleDefinition* heliumDef = nullptr;
0121
0122 };
0123
0124
0125
0126 inline void G4DNADingfelderChargeDecreaseModel::SelectStationary (G4bool input)
0127 {
0128 statCode = input;
0129 }
0130
0131
0132
0133 #endif