Problem 401 - Failure in neutron capture in multi-element materials.
Summary: Failure in neutron capture in multi-element materials.
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/neutron_hp (show other problems)
Version: 4.1
Hardware: PC Linux
: P2 normal
Assignee: Hans-Peter.Wellisch
URL:
Depends on:
Blocks:
 
Reported: 2002-08-21 11:52 CEST by tipton
Modified: 2012-02-15 09:52 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 tipton 2002-08-21 11:52:32 CEST
I found a small bug in the file
processes/hadronic/models/neutron_hp/src/G4NeutronHPCapture.cc
In "ApplyYourself( const G4Track &, G4Nucleus &)"

The problem:
The variable "index"  is declared twice.
This has the following effect: for composite materials, ONLY
the index of the first element is ever used to determine
which capture process applies.  The method has code to loop over
cross-sections to determine which element captured the neutron--
but with the multiple definition of index, this code doesn't have
any effect.  Only the first element captures.

The fix:
CHANGE
 {
      xSec = new G4double[n];
      G4double sum=0;
      G4int i, index;
TO
  {
      xSec = new G4double[n];
      G4double sum=0;
      G4int i;

SMALL REQUEST:
   The second argument to this method, G4Nucleus &, was presumably
included to allow the user to specify which nucleus is capturing
a neutron.  Currently the argument is not used, but if this
functionality could be added, that would nice:)

   Best Regards,
    Bryan Tipton
     Caltech
Comment 1 Hans-Peter.Wellisch 2002-11-08 08:55:59 CET
Thank you for reporting this. Will be fixed in the next releae.

As to the G4nucleus argument: This makes part of the geant4 model
interface that is common to all hadronic final state generators. For the neutron
transort, it is 'dummy'. It normally carries the information of the element
scattered off. For the neutrons, the cross-section depends on isotope-wise
information, though, hence this is not used.

If you want to use the class stand-alone, you can 'feed' it with single element
and/or isotope materials, and you get the effect, you would like to have.

Many greetings,

Hans-Peter.