When I set fix value of energy of particle gun in PrimaryGeneratorAction.cc for example 8MeV there is no problem with running. But when I set the value of primary particle equals to 8+G4UniformRand() after three million events there appears the next message -------- WWWW ------- G4Exception-START -------- WWWW ------- *** G4Exception : had012 issued by : G4HadronicProcess:CheckResult() Warning: Bad energy non-conservation detected, will re-sample the interaction Process / Model: photonNuclear / LENDorBERTModel Primary: gamma (22), E= 8.19248, target nucleus (83, 209) E(initial - final) = -190892 MeV. *** This is just a warning message. *** -------- WWWW -------- G4Exception-END --------- WWWW ------- and after fifteenth miliion event running is aborted. But when I use G4CascadeInterface model instead of G4LENDorBertini model anything is right in both cases of fix and randomize values of energy.
Which physics list do you use when you see this problem? If it is your own, please send it to me so I can try to reproduce the problem.
I tested this as an isolated process and cannot reproduce your results using Geant4 10.6.