Problem 2152

Summary: The energy of GenericIon increases infinitely.
Product: Geant4 Reporter: jhlee_987
Component: processes/electromagneticAssignee: Vladimir.Ivantchenko
Status: RESOLVED FIXED    
Severity: major CC: daren.sawkey
Priority: P4    
Version: 10.4   
Hardware: PC   
OS: Linux   
Attachments: simple geant4 code based on example B1 to show energy divergence.

Description jhlee_987 2019-03-18 09:36:12 CET
Created attachment 555 [details]
simple geant4 code based on example B1 to show energy divergence.

I have found that the kinetic energy increases infinitely when the GenericIon is set as the primary particle in single scattering process.

The attached file is a code based on Example B1, using GeneralParticleSource to set the GenericIon as the primary particle, and to output the position and energy every step.

Files changed in B1:
  exampleB1.cc
  myPhysicsList.hh (added)
  myPhysicsList.cc (added)
  B1SteppingAction.cc
  run1.mac
  B1PrimaryGeneratorAction.cc
  B1PrimaryGeneratorAction.hh
  B1RunAction.cc

The changes are marked as
//************************

//*******************

I did the following.
  (cmake)
  (make)
  ./exampleB1
  /control/execute run1.mac

I used G4EmStandardPhysicsSS in myPhysicsList, but in fact it uses G4IonCoulombScatteringModel via G4CoulombScattering, so the problem seems to be in the G4IonCoulombScatteringModel.
Comment 1 Vladimir.Ivantchenko 2019-04-08 20:04:56 CEST
Hi Daren,

thanks for this BR - it was non-trivial precision loss in computation of particle momentum. The fix is proposed for testing and will be submitted for the patch.

Vladimir
Comment 2 Daren Sawkey 2019-04-12 17:10:20 CEST
Thanks to jhlee.