Ignore:
Timestamp:
Apr 6, 2009, 12:30:29 PM (15 years ago)
Author:
garnier
Message:

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelastic.cc

    r819 r962  
    3333// and all its terms.
    3434//
    35 // $Id: G4NeutronHPInelastic.cc,v 1.23 2007/06/22 09:23:48 gcosmo Exp $
    36 // GEANT4 tag $Name: $
     35// $Id: G4NeutronHPInelastic.cc,v 1.24 2008/12/03 22:28:48 tkoi Exp $
     36// GEANT4 tag $Name: geant4-09-02-ref-02 $
    3737//
    38 // 070523 bug fix for G4FPE_DEBUG on by A. Howard ( and T. Koi)
     38// 070523 bug fix for G4FPE_DEBUG on by A. Howard (and T. Koi)
     39// 081203 limit maximum trial for creating final states add protection for 1H isotope case by T. Koi
    3940//
    4041#include "G4NeutronHPInelastic.hh"
     
    5859    {
    5960      theInelastic[i].Init((*(G4Element::GetElementTable()))[i], dirName);
     61      G4int itry = 0;
    6062      do
    6163      {
     
    9799        theInelastic[i].Register(&theDAFS, "F36");
    98100        theInelastic[i].RestartRegistration();
     101        itry++;
    99102      }
    100       while(!theInelastic[i].HasDataInAnyFinalState());
     103      //while(!theInelastic[i].HasDataInAnyFinalState());
     104      while( !theInelastic[i].HasDataInAnyFinalState() && itry < 6 );
     105                                                              // 6 is corresponding to the value(5) of G4NeutronHPChannel. TK 
     106      if ( itry == 6 )
     107      {
     108         // No Final State at all.
     109         G4bool exceptional = false;
     110         if ( (*(G4Element::GetElementTable()))[i]->GetNumberOfIsotopes() == 1 )
     111         {
     112            if ( (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() == 1 && (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() == 1 ) exceptional = true;  //1H
     113         }
     114         if ( !exceptional ) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this element");
     115      }
    101116    }
    102117  }
Note: See TracChangeset for help on using the changeset viewer.