Discontinuities in ion energy loss in helium target

Geant4 Version: 4.10.5
Operating System: RHEL9.6
Compiler/Version: gcc-11.5
CMake Version: 3.26.4


Hello,

I’m running a code to look at a beam of positive ions (generally around mass A = 20) through a uniform helium target. Looking at beam energy against steps along the beam direction for any given event shows that the energy loss is discontinuous. Included below is a pdf of example plots to illustrate my point with energy in MeV and steps in mm. The second plot is zoomed in on a region of the first plot to make it easier to see the behavior. I am hoping someone can help me get continuous energy loss through the target in an efficient way.

Discontinuous-combined.pdf (130.9 KB)

G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
//ionIoni->SetStepFunction(.00001, .001*um); //First plot in pdf, These are used to best demonstrate the issue. Normal run would use .1 and 1 um. 
ionIoni->SetStepFunction(.000001, .001*um);  //continuous loss, final image in pdf

Changing the step size parameters for the G4IonParametrisedLossModel in my physics list to an absurdly small number, as shown in the code snippet, achieves the desired result (final plot in the pdf). However, it is too computationally intensive. Running 5000 events takes roughly 5 minutes. Is there any way to achieve continuous energy loss while not sacrificing too much computational speed? I am currently using an older geant version (4.10.5) and would prefer to keep it that way, but will upgrade if necessary.

Thank you,

Nic

1 Like