Problem 1334 - Issue in G4Scatterer
Summary: Issue in G4Scatterer
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/im_r_matrix (show other problems)
Version: other
Hardware: All All
: P5 trivial
Assignee: Gunter.Folger
URL:
: 1417 (view as problem list)
Depends on:
Blocks:
 
Reported: 2012-07-09 09:55 CEST by Gabriele Cosmo
Modified: 2013-01-07 17:55 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Gabriele Cosmo 2012-07-09 09:55:18 CEST
From report by Benedikt Hegner in JIRA (SIM-306) ...

Using the tar ball of Geant4-9.6.b01 I see an error in processes/hadronic/models/im_r_matrix/src/G4Scatterer.cc around line 138.
A potential fix could be:
@@ -136,7 +136,7 @@ G4double G4Scatterer::GetTimeToInteraction(const G4KineticTrack& trk1,
G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
// neutrons special 
if(( trk1.GetDefinition() == G4Neutron::Neutron() ||
trk1.GetDefinition() == G4Neutron::Neutron() ) &&
+ trk2.GetDefinition() == G4Neutron::Neutron() ) &&
sqrtS>1.91*GeV && pi*distance>maxChargedCrossSection) return time;
/*
Comment 1 Gunter.Folger 2012-11-21 18:28:46 CET
proposed fix is correct, cross section for neutrons above 1.91 GeV in cms is less than the limit used. 

Physics unchanged, but small performance gain.

Fix implemented and committed. This should be in 9.6.ref01.
Comment 2 Gunter.Folger 2013-01-07 17:55:30 CET
*** Problem 1417 has been marked as a duplicate of this problem. ***