Too many steps? Will G4 recover or crash?

This is something of a curiosity-driven question, but I’m also interested in what I’ll be able to see in my output files.

When running simulations with the G4CMP package (which models charge carriers and phonons in cryogenic semiconductors), I can get tracks with hundreds of millions of steps. If I crank up the voltage bias across a volume, the step count increases like V^4. Since the step counter is a G4int, what will Geant4 do when one of my tracks crosses the 2^31 threshold?

I know that the step count increment will roll from 2147483647 to -2147483647, and just keep incrementing. But I’m curious if the negative step vaue will cause any part of the stepping or tracking manager to get confused, or if it’s just there for human readability.

So far, in my own test jobs, my maximum has topped out at just over 2.0e+9 steps; I haven’t yet seen a <0 case.

I’ve finally gotten a job with negative steps, running a 200V bias with a COMSOL finite-element electric field. It appears that Geant4 doesn’t care what the CurrentStepNumber value is, because the affected events completed (eventually!) and the job kept on running.

Out of 100 electron tracks in my sample, I got four with negative maximum-step values:

root [19] mczip0->Scan("EventNum:Step:Step+2147483648","Step<0")
************************************************
*    Row   *  EventNum *      Step * Step+2147 *
************************************************
*      129 *        68 * -1.72e+09 * 421989913 *
*      181 *        94 * -2.13e+09 *   8569582 *
*      187 *        97 * -1.86e+09 * 285885933 *
*      189 *        98 * -1.84e+09 * 304382611 *
************************************************

Corresponding to the distribution of maximum-steps just continuing to dribble out to very large values. These were the four longest running events in my sample, with elapsed times around 26,000 seconds (just over seven hours for one track!).

Hi Mike,

As you see, Geant4 kernel does not use the step ID except for printout.

Makoto

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.