Import Geant4 7.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 12:11:21 +02:00
parent 516dbf1a58
commit d93e1e39a9
5384 changed files with 125662 additions and 82444 deletions
@@ -456,6 +456,8 @@ G4DecayProducts *G4NuclearDecayChannel::DecayIt (G4double theParentMass)
// f.lei (03/01/03) this is needed to fix the crach in test18
if (finalDaughterExcitation <= 1.0*keV) finalDaughterExcitation = 0 ;
G4IonTable *theIonTable = (G4IonTable*)(G4ParticleTable::GetParticleTable()->GetIonTable());
// f.lei (07/03/05) added the delete to fix bug#711
if (dynamicDaughter) delete dynamicDaughter;
dynamicDaughter = new G4DynamicParticle
(theIonTable->GetIon(daughterZ,daughterA,finalDaughterExcitation),
daughterMomentum1);
@@ -668,6 +670,10 @@ G4DecayProducts *G4NuclearDecayChannel::BetaDecayIt()
daughtermomentum[2]*daughtermomentum[2]-
daughtermomentum[0]*daughtermomentum[0])/
(2.0*daughtermomentum[2]*daughtermomentum[0]);
// added the following test to avoid rounding erros. A problem
// reported bye Ben Morgan of Uni.Warwick
if (costhetan > 1.) costhetan = 1.;
if (costhetan < -1.) costhetan = -1.;
sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
phin = twopi*G4UniformRand()*rad;
sinphin = std::sin(phin);