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
@@ -146,3 +146,15 @@ void G4Parton::DefineMomentumInZ(G4double aLightConeMomentum, G4bool aDirection)
a4Momentum.setE( 0.5*(aLightConeMomentum + TransverseMass2/aLightConeMomentum));
Set4Momentum(a4Momentum);
}
void G4Parton::DefineMomentumInZ(G4double aLightConeMomentum,G4double aLightConeE, G4bool aDirection)
{
G4double Mass = GetMass();
G4LorentzVector a4Momentum = Get4Momentum();
aLightConeMomentum*=theX;
aLightConeE*=theX;
G4double TransverseMass2 = sqr(a4Momentum.px()) + sqr(a4Momentum.py()) + sqr(Mass);
a4Momentum.setPz(0.5*(aLightConeMomentum - aLightConeE - TransverseMass2/aLightConeMomentum)*(aDirection? 1: -1));
a4Momentum.setE( 0.5*(aLightConeMomentum + aLightConeE + TransverseMass2/aLightConeMomentum));
Set4Momentum(a4Momentum);
}