In tag Geant4-01-01, processes/electromagnetic/standard/src/G4MultipleScattering.cc, line 459, the formula for "prob" has a logarithmic singularity at tau=1: else { tau = truestep/range ; if(tau < taulim) prob = exp(-(alpha1-1.)*tau)*(1.+scatteringparameter*tau) ; else here===> prob = exp((alpha1-1.)*log(1.-tau))*(1.+scatteringparameter*tau) ; } I think this should be changed to if (tau < taulim) prob = exp(-(alpha1-1.)*tau)*(1.+scatteringparameter*tau) ; else if (tau < 1.) prob = exp((alpha1-1.)*log(1.-tau))*(1.+scatteringparameter*tau) ; else prob = 0;
The multiplescattering PostStepDoIt should not be called with tau=1, but of course it was a bug . It is fixed now together a similar singularity in the .icc file (AlongStepDoIt) .