Dear GEANT4 developer, In a method, G4BraggModel::SampleSecondaries, a negative value can be passed to sqrt() at the line number of 213 in G4BraggModel.cc. 213 G4double sint = sqrt(1.0 - cost*cost); It makes a new momentum direction of a particle after the step NAN. For my case, the tracked particle is Ar40[0,0] in the standard air, and its momentum vector is (116,258,-25.3), and 1.0-cost*cost = -6.85e-13. Is it due to the precision of the calculation? Anyway, I think it can be fixed by adding some check against the negative value before sqrt(). Could you fix this problem? Best Regards, Hajime -------------------------------------------------- High Energy Physics Group, Department of Physics, Kyoto University Hajime Nanjo ---------------------------------------------------
The bug have been fixed and the fix will be available with Geant4 7.1 patch 01