File indexing completed on 2025-01-18 09:57:59
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 #ifndef G4BraggModel_h
0060 #define G4BraggModel_h 1
0061
0062 #include "G4VEmModel.hh"
0063 #include "G4PSTARStopping.hh"
0064
0065 class G4ParticleChangeForLoss;
0066 class G4EmCorrections;
0067 class G4ICRU90StoppingData;
0068 class G4PSTARStopping;
0069
0070 class G4BraggModel : public G4VEmModel
0071 {
0072
0073 public:
0074
0075 explicit G4BraggModel(const G4ParticleDefinition* p = nullptr,
0076 const G4String& nam = "Bragg");
0077
0078 ~G4BraggModel() override;
0079
0080 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0081
0082 G4double MinEnergyCut(const G4ParticleDefinition*,
0083 const G4MaterialCutsCouple* couple) override;
0084
0085 G4double ComputeCrossSectionPerElectron(
0086 const G4ParticleDefinition*,
0087 G4double kineticEnergy,
0088 G4double cutEnergy,
0089 G4double maxEnergy);
0090
0091 G4double ComputeCrossSectionPerAtom(
0092 const G4ParticleDefinition*,
0093 G4double kineticEnergy,
0094 G4double Z, G4double A,
0095 G4double cutEnergy,
0096 G4double maxEnergy) override;
0097
0098 G4double CrossSectionPerVolume(const G4Material*,
0099 const G4ParticleDefinition*,
0100 G4double kineticEnergy,
0101 G4double cutEnergy,
0102 G4double maxEnergy) override;
0103
0104 G4double ComputeDEDXPerVolume(const G4Material*,
0105 const G4ParticleDefinition*,
0106 G4double kineticEnergy,
0107 G4double cutEnergy) override;
0108
0109 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0110 const G4MaterialCutsCouple*,
0111 const G4DynamicParticle*,
0112 G4double tmin,
0113 G4double maxEnergy) override;
0114
0115
0116 G4double GetChargeSquareRatio(const G4ParticleDefinition*,
0117 const G4Material*,
0118 G4double kineticEnergy) override;
0119
0120 G4double GetParticleCharge(const G4ParticleDefinition* p,
0121 const G4Material* mat,
0122 G4double kineticEnergy) override;
0123
0124
0125 G4BraggModel & operator=(const G4BraggModel &right) = delete;
0126 G4BraggModel(const G4BraggModel&) = delete;
0127
0128 protected:
0129
0130 void SetParticle(const G4ParticleDefinition* p);
0131
0132 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
0133 G4double kinEnergy) final;
0134
0135 inline void SetChargeSquareRatio(G4double val);
0136
0137 private:
0138
0139 void HasMaterial(const G4Material* material);
0140
0141 G4double StoppingPower(const G4Material* material,
0142 G4double kineticEnergy);
0143
0144 G4double ElectronicStoppingPower(G4double z,
0145 G4double kineticEnergy) const;
0146
0147 G4double DEDX(const G4Material* material, G4double kineticEnergy);
0148
0149 G4bool MolecIsInZiegler1988(const G4Material* material);
0150
0151 G4double ChemicalFactor(G4double kineticEnergy, G4double eloss125) const;
0152
0153 protected:
0154
0155 const G4ParticleDefinition* particle = nullptr;
0156 G4ParticleDefinition* theElectron = nullptr;
0157 G4ParticleChangeForLoss* fParticleChange = nullptr;
0158
0159 const G4Material* currentMaterial = nullptr;
0160 const G4Material* baseMaterial = nullptr;
0161
0162 G4EmCorrections* corr = nullptr;
0163
0164 static G4ICRU90StoppingData* fICRU90;
0165 static G4PSTARStopping* fPSTAR;
0166
0167 G4double mass = 0.0;
0168 G4double spin = 0.0;
0169 G4double chargeSquare = 1.0;
0170 G4double massRate = 1.0;
0171 G4double ratio = 1.0;
0172 G4double protonMassAMU = 1.007276;
0173 G4double lowestKinEnergy;
0174 G4double theZieglerFactor;
0175 G4double expStopPower125;
0176
0177 G4int iMolecula = -1;
0178 G4int iPSTAR = -1;
0179 G4int iICRU90 = -1;
0180
0181 private:
0182
0183 G4bool isIon = false;
0184 G4bool isFirst = false;
0185 };
0186
0187 inline void G4BraggModel::SetChargeSquareRatio(G4double val)
0188 {
0189 chargeSquare = val;
0190 }
0191
0192
0193
0194 #endif