Import Geant4 3.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:03:00 +02:00
parent cfcb558cfe
commit 137e303ecc
2843 changed files with 37082 additions and 38426 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ParticleChangeForTransport.cc,v 1.7 2000/05/16 00:34:27 kurasige Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4ParticleChangeForTransport.cc,v 1.8 2001/03/06 09:59:23 kurasige Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// --------------------------------------------------------------
@@ -130,8 +130,13 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForAlongStep(G4Step* pStep)
G4ThreeVector pMomentum = pPostStepPoint->GetMomentum()
+ ( CalcMomentum(theEnergyChange, theMomentumDirectionChange, mass)
- pPreStepPoint->GetMomentum());
G4double tMomentum_inv = 1.0 / pMomentum.mag();
pPostStepPoint->SetMomentumDirection(pMomentum*tMomentum_inv);
G4double tMomentum = pMomentum.mag();
G4ThreeVector direction(1.0,0.0,0.0);
if( tMomentum > 0. ){
G4double inv_Momentum= 1.0 / tMomentum;
direction= pMomentum * inv_Momentum;
}
pPostStepPoint->SetMomentumDirection(direction);
pPostStepPoint->SetKineticEnergy( energy );
}