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--)