Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -24,11 +24,17 @@
// ********************************************************************
//
//
// $Id: G4StatMFChannel.cc,v 1.6 2006/06/29 20:24:45 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4StatMFChannel.cc,v 1.10 2008/11/19 14:33:31 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara
//
// Modified:
// 25.07.08 I.Pshenichnov (in collaboration with Alexander Botvina and Igor
// Mishustin (FIAS, Frankfurt, INR, Moscow and Kurchatov Institute,
// Moscow, pshenich@fias.uni-frankfurt.de) fixed semi-infinite loop
#include "G4StatMFChannel.hh"
#include "G4HadronicException.hh"
@@ -91,7 +97,7 @@ G4bool G4StatMFChannel::CheckFragments(void)
{
G4int A = static_cast<G4int>((*i)->GetA());
G4int Z = static_cast<G4int>((*i)->GetZ());
if (A > 1 && (Z >= A || Z <= 0) || (A==1 && Z > A) || A <= 0) return false;
if ( (A > 1 && (Z > A || Z <= 0)) || (A==1 && Z > A) || A <= 0 ) return false;
}
return true;
@@ -223,7 +229,7 @@ void G4StatMFChannel::PlaceFragments(const G4double anA)
G4ThreeVector FragToFragVector = (*i)->GetPosition() - (*j)->GetPosition();
G4double Rmin = R0*(std::pow((*i)->GetA(),1./3.) +
std::pow((*j)->GetA(),1./3));
if (ThereAreOverlaps = (FragToFragVector.mag2() < Rmin*Rmin)) break;
if ( (ThereAreOverlaps = (FragToFragVector.mag2() < Rmin*Rmin)) ) break;
}
counter++;
} while (ThereAreOverlaps && counter < 1000);
@@ -314,15 +320,19 @@ void G4StatMFChannel::FragmentsMomenta(const G4int NF, const G4int idx,
G4double CTM12 = H*(1.0 - 2.0*_theFragments[i2]->GetNuclearMass()*AvailableE/p.mag2());
G4double CosTheta1;
G4double Sign;
do
{
do
{
CosTheta1 = 1.0 - 2.0*G4UniformRand();
}
while (CosTheta1*CosTheta1 < CTM12);
}
while (CTM12 >= 0.0 && CosTheta1 < 0.0);
if (CTM12 > 0.9999) {CosTheta1 = 1.;}
else {
do
{
do
{
CosTheta1 = 1.0 - 2.0*G4UniformRand();
}
while (CosTheta1*CosTheta1 < CTM12);
}
while (CTM12 >= 0.0 && CosTheta1 < 0.0);
}
if (CTM12 < 0.0) Sign = 1.0;
else if (G4UniformRand() <= 0.5) Sign = -1.0;