Created attachment 121 [details] Root script showing the convergence issues with an example Hello, In the class G4GoudsmitSaundersonMscModel under certain conditions the exit conditions for the following infinite loop can never be met (around line 200 in G4GoudsmitSaundersonMscModel.cxx) do { logx0=std::log(1.+1./x0); x1 = x0-(x0*((1.+x0)*logx0-1.0)-g1/2.)/( (1.+2.*x0)*logx0-2.0); delta = std::abs( x1 - x0 ); x0 = x1; } while (delta > 1.0e-12); Adding a simple check into the code, which aborts the loop after a certain amount of loops is not possible, since for certain input values (which I do see in my simulation) the code can diverge instead of converge. Attached is a small ROOT script, which shows a case where convergence is not reached and a case where we have divergence. Both values are obtained from my simulations. Thanks, Andreas
Thanks for the report. The protection is added, so the loop is finite and exit condition is improved. VI