Changeset 962 for trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFChannel.cc
- Timestamp:
- Apr 6, 2009, 12:30:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/de_excitation/multifragmentation/src/G4StatMFChannel.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4StatMFChannel.cc,v 1. 6.2.1 2008/04/23 16:19:50 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 1-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 $ 29 29 // 30 30 // Hadronic Process: Nuclear De-excitations 31 31 // 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 32 38 33 39 #include "G4StatMFChannel.hh" … … 92 98 G4int A = static_cast<G4int>((*i)->GetA()); 93 99 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; 95 101 } 96 102 … … 315 321 G4double CosTheta1; 316 322 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 } 326 336 327 337 if (CTM12 < 0.0) Sign = 1.0;
Note: See TracChangeset
for help on using the changeset viewer.