Created attachment 675 [details] Illustration of inelastic collisions for neutrons HP Dear expert, I observed that when neutron HP undergoes inelastic collisions for reactions with excitation energies below 20 keV, the excitation energy is set to 0. The figure below summarizes the problem. This bug is discussed in GEANT4-forum here: https://geant4-forum.web.cern.ch/t/problem-with-mt-52-inelastic-interaction/4468 Please find below a patch suggestion: diff --git a/source/processes/hadronic/models/particle_hp/src/G4ParticleHPInelasticCompFS.cc b/source/processes/hadronic/models/par ticle_hp/src/G4ParticleHPInelasticCompFS.cc index b4aa7d5..0830aa0 100644 --- a/source/processes/hadronic/models/particle_hp/src/G4ParticleHPInelasticCompFS.cc +++ b/source/processes/hadronic/models/particle_hp/src/G4ParticleHPInelasticCompFS.cc @@ -410,8 +410,7 @@ void G4ParticleHPInelasticCompFS::CompositeApply(const G4HadProjectile& theTrack // QI introudced since G4NDL3.15 // G4double QM=(incidReactionProduct.GetMass()+targetMass)-(aHadron.GetMass()+residualMass); // eExcitation = QM-QI[it]; - eExcitation = QI[0] - QI[it]; // Bug fix #1838 - if(eExcitation < 20*CLHEP::keV) eExcitation = 0; + eExcitation = std::max(0.,QI[0] - QI[it]); // Bug fix #1838 // Re-evluate iLevel based on this eExcitation iLevel = 0; @@ -598,8 +597,7 @@ void G4ParticleHPInelasticCompFS::CompositeApply(const G4HadProjectile& theTrack // Next 12 lines are Emilio's replacement // G4double QM=(incidReactionProduct.GetMass()+targetMass)-(aHadron.GetMass()+residualMass); // G4double eExcitation = QM-QI[it]; - G4double eExcitation = QI[0] - QI[it]; // Fix of bug #1838 - if(eExcitation<20*CLHEP::keV){eExcitation=0;} + G4double eExcitation = std::max(0.,QI[0] - QI[it]); // Fix of bug #1838 two_body_reaction(&incidReactionProduct,&theTarget,&aHadron,eExcitation); if(thePhotons==0 && eExcitation>0){ for(iLevel=theGammas.GetNumberOfLevels()-1; iLevel>=0; iLevel--)
Created attachment 676 [details] Patch suggestion Here is a suggestion for the patch
Fix of Thomas Frosio adopted and made.