Skip to content

Added step hook for Geant4, allowing for aborting events.

Solving the [EXPLETIVE] Geant4 issue; particles making a massive step of negative length and then being stuck forever, no longer being aborted since the later Geant4 updates and so on.

This is a bit brute forcey, in that it adds a stepping action, and checks for every step whether it is negative. It works, however! Very useful for the ones with negative step length, that take literally forever.

Further refinement suggestion: add different region to the sensor and passive volumes, so that this stepping action only gets called in the world volume. For now there will be some performance impact, but it is small compared to propagation, and certainly small compared to the "particles tracking forever" events that occur otherwise...

Tests done with pion events that were previously stuck. Will rope in Tiziano Pauletto (DESY summer student) for further tests.

Edited by Haakan Wennloef

Merge request reports