116{
117
118
119
120
121
122
123
124
126
127
128
131
132
133
134
135
136 G4double DEDX_before = theDirectEnergyLossProcess->
GetDEDX(preStepKinEnergy, currentCouple);
137
138
139
140
141
142
147
148
150 if (is_integral )
n=10;
153 for (
size_t i=0;i<
n;i++) {
154 if (Tkin != preStepKinEnergy && IsIon) {
157
158 }
159
161 if( dlength <= linLossLimit * r ) {
162 degain = DEDX_before*dlength;
163 }
164 else {
166
168 if (IsIon){
172 while (std::abs(x-x1)>0.01*x) {
176 x1= theDirectEnergyLossProcess->
GetRange(E, currentCouple);
177
178 }
179 }
180
181 degain=E-Tkin;
182
183
184
185 }
186
188 tmax = std::min(tmax,currentTcut);
189
190
192
193
194
197
198
199
200
201
203 if (lossFluctuationFlag ) {
205 SampleFluctuations(currentMaterial,dynParticle,tmax,dlength,degain)-degain;
206 }
207
209 if (egain <=0) egain=degain;
210 Tkin+=egain;
212 }
213
214
215
216
217
218 delete dynParticle;
219
220 if (IsIon){
223
224 }
225
226 G4double DEDX_after = theDirectEnergyLossProcess->
GetDEDX(Tkin, currentCouple);
227
228
229 G4double weight_correction=DEDX_after/DEDX_before;
230
231
233
234
235
236
237
238
239
240
241
245
246
248
249}
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double GetKineticEnergy() const
void SetKineticEnergy(G4double aEnergy)
void ProposeEnergy(G4double finalEnergy)
virtual void Initialize(const G4Track &)
G4double GetWeight() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
const G4DynamicParticle * GetDynamicParticle() const
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
G4VEmFluctuationModel * GetModelOfFluctuations()
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