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/de_excitation/multifragmentation/src/G4StatMFChannel.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4StatMFChannel.cc,v 1.6.2.1 2008/04/23 16:19:50 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4StatMFChannel.cc,v 1.10 2008/11/19 14:33:31 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Hadronic Process: Nuclear De-excitations
    3131// by V. Lara
     32//
     33// Modified:
     34// 25.07.08 I.Pshenichnov (in collaboration with Alexander Botvina and Igor
     35//          Mishustin (FIAS, Frankfurt, INR, Moscow and Kurchatov Institute,
     36//          Moscow, pshenich@fias.uni-frankfurt.de) fixed semi-infinite loop
     37
    3238
    3339#include "G4StatMFChannel.hh"
     
    9298        G4int A = static_cast<G4int>((*i)->GetA());
    9399        G4int Z = static_cast<G4int>((*i)->GetZ());
    94         if ( (A > 1 && (Z >= A || Z <= 0)) || (A==1 && Z > A) || A <= 0 ) return false;
     100        if ( (A > 1 && (Z > A || Z <= 0)) || (A==1 && Z > A) || A <= 0 ) return false;
    95101    }
    96102   
     
    315321        G4double CosTheta1;
    316322        G4double Sign;
    317         do
    318           {
    319             do
    320               {
    321                 CosTheta1 = 1.0 - 2.0*G4UniformRand();
    322               }
    323             while (CosTheta1*CosTheta1 < CTM12);
    324           }
    325         while (CTM12 >= 0.0 && CosTheta1 < 0.0);
     323
     324        if (CTM12 > 0.9999) {CosTheta1 = 1.;}
     325        else {
     326         do
     327           {
     328             do
     329               {
     330                 CosTheta1 = 1.0 - 2.0*G4UniformRand();
     331               }
     332             while (CosTheta1*CosTheta1 < CTM12);
     333           }
     334          while (CTM12 >= 0.0 && CosTheta1 < 0.0);
     335        }
    326336
    327337        if (CTM12 < 0.0) Sign = 1.0;
Note: See TracChangeset for help on using the changeset viewer.