Import Geant4 9.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:16:48 +02:00
parent 75c7fd177d
commit a8e9364cea
6592 changed files with 84274 additions and 69292 deletions
@@ -618,19 +618,20 @@ G4bool G4BinaryLightIonReaction::EnergyAndMomentumCorrector(
}
OldScale=Scale;
Scale = TotalCollisionMass/Sum - 1;
// G4cout << "E/P corr - " << cAttempt << " " << Scale << G4endl;
if (std::abs(Scale) <= ErrLimit
|| OldScale == Scale) // protect 'frozen' situation and divide by 0 in calculating new factor below
{
if (getenv("debug_G4BinaryLightIonReactionResults")) G4cout << "E/p corrector: " << cAttempt << G4endl;
success = true;
break;
}
if ( cAttempt > 10 )
{
// G4cout << " speed it up? " << std::abs(OldScale/(OldScale-Scale)) << G4endl;
factor=std::max(1.,std::log(std::abs(OldScale/(OldScale-Scale))));
// G4cout << " ? factor ? " << factor << G4endl;
}
// G4cout << "E/P corr - " << cAttempt << " " << Scale << G4endl;
if (std::abs(Scale) <= ErrLimit)
{
if (getenv("debug_G4BinaryLightIonReactionResults")) G4cout << "E/p corrector: " << cAttempt << G4endl;
success = true;
break;
}
}
if( (!success) && getenv("debug_G4BinaryLightIonReactionResults"))