245{
246
248
249 if (kineticEnergy <= fIntrinsicLowEnergyLimit)
250 {
253 return;
254 }
255
256
261
262
266 kineticEnergy, shellIndex);
267
268 if (energyDelta == 0.)
269 { return; }
270
271
274
275
276 G4double deltaMom = std::sqrt(deltaKinE*(deltaKinE + 2.0*electron_mass_c2));
277 G4double primaryMom = std::sqrt(primaryKinE*(primaryKinE + 2.0*electron_mass_c2));
278
279 G4double cost = deltaKinE * (primaryKinE + 2.0*electron_mass_c2)
280 / (deltaMom * primaryMom);
281 if (cost > 1.) { cost = 1.; }
282 G4double sint = std::sqrt((1. - cost)*(1. + cost));
284 G4double dirx = sint * std::cos(phi);
285 G4double diry = sint * std::sin(phi);
287
288
291 deltaDir.rotateUz(primaryDirection);
292
293 dirx = deltaDir.x();
294 diry = deltaDir.y();
295 dirz = deltaDir.z();
296
297
298
300 sint = std::sqrt(1. - cost*cost);
302 G4double del = std::sqrt(bindingEnergy *(bindingEnergy + 2.0*electron_mass_c2))
303 / deltaMom;
304 dirx += del* sint * std::cos(phi);
305 diry += del* sint * std::sin(phi);
306 dirz += del* cost;
307
308
309 G4double finalPx = primaryMom*primaryDirection.
x() - deltaMom*dirx;
310 G4double finalPy = primaryMom*primaryDirection.
y() - deltaMom*diry;
311 G4double finalPz = primaryMom*primaryDirection.
z() - deltaMom*dirz;
312
313
316 G4double norm = 1.0/std::sqrt(dirx*dirx + diry*diry + dirz*dirz);
317 dirx *= norm;
318 diry *= norm;
319 dirz *= norm;
322 fvect->push_back(theDeltaRay);
323
324
326
327
328
329 G4double finalKinEnergy = kineticEnergy - energyDelta - theEnergyDeposit;
330 if(finalKinEnergy < 0.0)
331 {
332 theEnergyDeposit += finalKinEnergy;
333 finalKinEnergy = 0.0;
334 }
335 else
336 {
337 G4double normLocal = 1.0/std::sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz);
338 finalPx *= normLocal;
339 finalPy *= normLocal;
340 finalPz *= normLocal;
342 }
344
345 if (theEnergyDeposit < 0)
346 {
347 G4cout <<
"G4LivermoreIonisationModel: Negative energy deposit: "
348 << theEnergyDeposit/eV <<
" eV" <<
G4endl;
349 theEnergyDeposit = 0.0;
350 }
351
352
354
355 if (verboseLevel > 1)
356 {
357 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
358 G4cout <<
"Energy balance from G4LivermoreIonisation" <<
G4endl;
359 G4cout <<
"Incoming primary energy: " << kineticEnergy/keV <<
" keV" <<
G4endl;
360 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
361 G4cout <<
"Outgoing primary energy: " << finalKinEnergy/keV <<
" keV" <<
G4endl;
362 G4cout <<
"Delta ray " << energyDelta/keV <<
" keV" <<
G4endl;
364 G4cout <<
"Local energy deposit " << theEnergyDeposit/keV <<
" keV" <<
G4endl;
367 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
368 }
369 return;
370}
G4double BindingEnergy() const
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
void SetMomentumDirection(const G4ThreeVector &aDirection)
const G4ThreeVector & GetMomentumDirection() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double GetKineticEnergy() const
void SetKineticEnergy(G4double aEnergy)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
G4int SelectRandomShell(G4int Z, G4double e) const
virtual G4double SampleEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
virtual G4double MaxEnergyOfSecondaries(G4double kineticEnergy, G4int Z=0, const G4ParticleDefinition *pd=0) const =0
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double bindingEnergy(G4int A, G4int Z)