Import Geant4 8.3.0 source tree
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user