Import Geant4 8.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:07:44 +02:00
parent fe73f43734
commit 75c7fd177d
764 changed files with 45230 additions and 95238 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4DecayProducts.cc,v 1.14 2006/06/29 19:25:00 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4DecayProducts.cc,v 1.15 2007/05/07 10:04:33 gunter Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// ------------------------------------------------------------
@@ -169,7 +169,8 @@ void G4DecayProducts::Boost(G4double totalEnergy, const G4ThreeVector &momentumD
{
// calcurate new beta
G4double mass = theParentParticle->GetMass();
G4double totalMomentum = std::sqrt( (totalEnergy - mass)*(totalEnergy + mass) );
G4double totalMomentum(0);
if (totalEnergy > mass ) totalMomentum = std::sqrt( (totalEnergy - mass)*(totalEnergy + mass) );
G4double betax = momentumDirection.x()*totalMomentum/totalEnergy;
G4double betay = momentumDirection.y()*totalMomentum/totalEnergy;
G4double betaz = momentumDirection.z()*totalMomentum/totalEnergy;