BetheBlochPDG returns postive energy losses for low-energy protons
When simulating hadronic showers with low energy cut settings, the shower crashes because getBetheBloch
returns a positive value, leading to a positive dEdx. This causes negative step lengths in getMaxStepLength
which finally crashes the shower.
For a proton kinetic energy of '2.3993640369552397e-02 MeV', getBetheBloch
returns 404389168.123 eV
.
The calculated values are:
K = 30.707500000000003
Z2 = 1
ZoverA = 499.75999999999999
aux = 0.40589049328184645
beta2 = 5.1142464418736309e-05
Cadj = 0
Z = 1
delta = 0
barkas = 1
bloch = -0.68387732857251937
I don't know about the validity of the implemented formulae in BetheBlochPDG for enegies this low (beta * gamma = 0.0071). Either we should fix the implementation, or catch its application when not valid anymore.