Bug #16936

Zero length steps during LArG4

Added by Jason Stock over 2 years ago. Updated 11 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Spent time:
Occurs In:


Running Dune's standard_g4_dune10kt_1x2x6.fcl on /pnfs/dune/scratch/users/jstock/GeneratedBugSample.root
produces a divide by zero error.
To reproduce, run the above with a breakpoint at larsim/LArG4/ISCalculationSeparate.cxx: 106

Using Allinea I have tracked the bug as far as larsim/LArG4/ISCalculationSeparate.cxx line 106. dx=0. The issue is that the g4 step it is looking at is apparently length 0 (G4Step Step->GetPreStepPoint->GetPosition()==ste->GetPostStepPoint()->GetPosition() ).


#1 Updated by Jason Stock over 2 years ago

  • Subject changed from larsim/LArG4/ISCalculationSeparate.cxx to Zero length steps during LArG4

Changing bug name

#2 Updated by Jason Stock over 2 years ago

I find the following will reliably produce the bug on a dunegpvm.

source /cvmfs/
setup larsoft v06_40_01 -q e14:prof
setup dunetpc v06_40_01 -q e14:prof
lar -c prod_Ar39.fcl -n 10 -o gen.root ###(Available from dunetpc feature/JStock_Ar39Test
lar -c standard_g4_dune10kt_1x2x6.fcl -n 10 -o g4.root gen.root

#3 Updated by Jason Stock over 2 years ago

Bug does not appear in v06_39_00.

I should also note, when the bug is noticed, the PreStepPoint and PostStepPoint are the same, and the energy deposited is extremely small (~10^-14).

#4 Updated by Lynn Garren over 2 years ago

  • Status changed from New to Assigned
  • Assignee set to Hans-Joachim Wenzel

Hans, can you have a look?

#5 Updated by Hans-Joachim Wenzel 11 months ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

I tried if I could reproduce the 0 step length problem using the new larg4 module where voxel read out is replaced with a simple step limiter. I ran a million single particle event and never ran into the problem. So my recommendation is to move to the new larg4

#6 Updated by Jason Stock 11 months ago

Alex, is DUNE able to move to the new LArG4 yet?

#7 Updated by Alexander Himmel 11 months ago

No. Certainly from the photon detector side, we will not have any cycles to validate major changes in infrastructure until we are past the TDR studies. I would estimate next March or April would be the right time to bring this discussion back up.

Also available in: Atom PDF