File indexing completed on 2025-01-18 09:58:37
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 #ifndef G4LindhardSorensenIonModel_h
0048 #define G4LindhardSorensenIonModel_h 1
0049
0050 #include <vector>
0051
0052 #include "G4VEmModel.hh"
0053 #include "G4NistManager.hh"
0054
0055 class G4EmCorrections;
0056 class G4ParticleChangeForLoss;
0057 class G4LindhardSorensenData;
0058 class G4BraggModel;
0059 class G4BetheBlochModel;
0060 class G4IonICRU73Data;
0061
0062 class G4LindhardSorensenIonModel : public G4VEmModel
0063 {
0064 public:
0065
0066 explicit G4LindhardSorensenIonModel(const G4ParticleDefinition* p = nullptr,
0067 const G4String& nam = "LindhardSorensen");
0068
0069 ~G4LindhardSorensenIonModel() override;
0070
0071 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0072
0073 G4double MinEnergyCut(const G4ParticleDefinition*,
0074 const G4MaterialCutsCouple* couple) override;
0075
0076 G4double ComputeCrossSectionPerElectron(
0077 const G4ParticleDefinition*,
0078 G4double kineticEnergy,
0079 G4double cutEnergy,
0080 G4double maxEnergy);
0081
0082 G4double ComputeCrossSectionPerAtom(
0083 const G4ParticleDefinition*,
0084 G4double kineticEnergy,
0085 G4double Z, G4double A,
0086 G4double cutEnergy,
0087 G4double maxEnergy) override;
0088
0089 G4double CrossSectionPerVolume(const G4Material*,
0090 const G4ParticleDefinition*,
0091 G4double kineticEnergy,
0092 G4double cutEnergy,
0093 G4double maxEnergy) override;
0094
0095 G4double ComputeDEDXPerVolume(const G4Material*,
0096 const G4ParticleDefinition*,
0097 G4double kineticEnergy,
0098 G4double cutEnergy) override;
0099
0100 G4double GetChargeSquareRatio(const G4ParticleDefinition* p,
0101 const G4Material* mat,
0102 G4double kineticEnergy) override;
0103
0104 G4double GetParticleCharge(const G4ParticleDefinition* p,
0105 const G4Material* mat,
0106 G4double kineticEnergy) override;
0107
0108 void CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
0109 const G4DynamicParticle* dp,
0110 const G4double& length,
0111 G4double& eloss) override;
0112
0113 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0114 const G4MaterialCutsCouple*,
0115 const G4DynamicParticle*,
0116 G4double tmin,
0117 G4double maxEnergy) override;
0118
0119
0120 G4LindhardSorensenIonModel & operator=
0121 (const G4LindhardSorensenIonModel &right) = delete;
0122 G4LindhardSorensenIonModel(const G4LindhardSorensenIonModel&) = delete;
0123
0124 protected:
0125
0126 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
0127 G4double kinEnergy) override;
0128
0129 inline void SetChargeSquareRatio(G4double val);
0130
0131 private:
0132
0133 void SetupParameters();
0134
0135 void InitialiseLS();
0136
0137 G4double ComputeDEDXPerVolumeLS(const G4Material*,
0138 const G4ParticleDefinition*,
0139 G4double kinEnergy, G4double cutEnergy);
0140
0141 inline void SetParticle(const G4ParticleDefinition* p);
0142
0143
0144
0145 static G4IonICRU73Data* fIonData;
0146 static G4LindhardSorensenData* lsdata;
0147
0148 const G4ParticleDefinition* particle = nullptr;
0149 G4ParticleDefinition* theElectron;
0150 G4EmCorrections* corr;
0151 G4ParticleChangeForLoss* fParticleChange = nullptr;
0152 G4NistManager* nist;
0153 G4BraggModel* fBraggModel;
0154 G4BetheBlochModel* fBBModel;
0155
0156 G4int Zin = 1;
0157 G4double mass = 0.0;
0158 G4double tlimit = DBL_MAX;
0159 G4double spin = 0.0;
0160 G4double magMoment2 = 0.0;
0161 G4double chargeSquare = 1.0;
0162 G4double charge = 1.0;
0163 G4double eRatio = 0.0;
0164 G4double pRatio = 1.0;
0165 G4double formfact = 0.0;
0166 G4double twoln10;
0167 G4double fElimit;
0168 G4bool isFirst = false;
0169 };
0170
0171
0172
0173 inline void
0174 G4LindhardSorensenIonModel::SetParticle(const G4ParticleDefinition* p)
0175 {
0176 if(particle != p) {
0177 particle = p;
0178 SetupParameters();
0179 }
0180 }
0181
0182
0183
0184 inline void G4LindhardSorensenIonModel::SetChargeSquareRatio(G4double val)
0185 {
0186 chargeSquare = val;
0187 }
0188
0189
0190
0191 #endif