Problem 2333 - Inelastic excitation energy is set to 0 when inelastic collision energy is below 20 keV
Summary: Inelastic excitation energy is set to 0 when inelastic collision energy is be...
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models (show other problems)
Version: 10.7
Hardware: All All
: P4 normal
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2021-02-16 09:04 CET by Thomas Frosio
Modified: 2021-10-26 18:50 CEST (History)
2 users (show)

See Also:


Attachments
Illustration of inelastic collisions for neutrons HP (95.44 KB, image/png)
2021-02-16 09:04 CET, Thomas Frosio
Details
Patch suggestion (1.61 KB, patch)
2021-02-16 09:05 CET, Thomas Frosio
Details | Diff

Note You need to log in before you can comment on or make changes to this problem.
Description Thomas Frosio 2021-02-16 09:04:08 CET
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--)
Comment 1 Thomas Frosio 2021-02-16 09:05:58 CET
Created attachment 676 [details]
Patch suggestion

Here is a suggestion for the patch
Comment 2 dennis.herbert.wright 2021-10-26 18:50:04 CEST
Fix of Thomas Frosio adopted and made.