75{
76
77
78
79
80
81
83
84
87
88
90 fDirectEnergyLossProcess->
GetDEDX(fPreStepKinEnergy, fCurrentCouple);
91
92
93
94
99
101 if(Tkin != fPreStepKinEnergy && fIsIon)
102 {
104 fDirectPartDef, fCurrentMaterial, Tkin);
106 }
107
109 if(dlength <= fLinLossLimit * r)
110 {
111 degain = DEDX_before * dlength;
112 }
113 else
114 {
117 if(fIsIon)
118 {
120 fDirectPartDef, fCurrentMaterial, E);
123
125 constexpr G4int iimax = 100;
126 while(std::abs(x - x1) > 0.01 * x)
127 {
130 fDirectPartDef, fCurrentMaterial, E);
132 chargeSqRatio);
133 x1 = fDirectEnergyLossProcess->
GetRange(E, fCurrentCouple);
134 ++ii;
135 if(ii >= iimax)
136 {
137 break;
138 }
139 }
140 }
141
142 degain = E - Tkin;
143 }
145 fCurrentTcut = std::min(fCurrentTcut, tmax);
146
148
149
151
152
154 if(fLossFluctuationFlag)
155 {
157 fCurrentCouple, dynParticle, fCurrentTcut, tmax, dlength, degain)
158 - degain;
159 }
160
162 if(egain <= 0.)
163 egain = degain;
164 Tkin += egain;
166
167 delete dynParticle;
168
169 if(fIsIon)
170 {
172 fDirectPartDef, fCurrentMaterial, Tkin);
174 }
175
176 G4double DEDX_after = fDirectEnergyLossProcess->
GetDEDX(Tkin, fCurrentCouple);
177 G4double weight_correction = DEDX_after / DEDX_before;
178
180
181
182
183
184
189
191}
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double GetKineticEnergy() const
void SetKineticEnergy(G4double aEnergy)
void Initialize(const G4Track &) override
void ProposeEnergy(G4double finalEnergy)
G4double GetWeight() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
const G4DynamicParticle * GetDynamicParticle() const
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length, const G4double meanLoss)=0
G4VEmFluctuationModel * GetModelOfFluctuations()
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double &length, G4double &eloss)
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
G4double GetKineticEnergy(G4double range, const G4MaterialCutsCouple *)
void SetDynamicMassCharge(G4double massratio, G4double charge2ratio)
G4double GetDEDX(G4double kineticEnergy, const G4MaterialCutsCouple *)
G4double GetRange(G4double kineticEnergy, const G4MaterialCutsCouple *)
void SetParentWeightByProcess(G4bool)
void ProposeParentWeight(G4double finalWeight)
G4ParticleChange aParticleChange