musrsim/geant4/LEMuSR/G4Modified/track/include/G4ParticleChangeForMSC.icc
2006-02-22 01:23:06 +00:00

119 lines
3.3 KiB
Plaintext

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ParticleChangeForMSC.icc,v 1.5 2004/05/08 15:28:12 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02-ref-01 $
//
//
inline
void G4ParticleChangeForMSC::ProposeMomentumDirection(const G4ThreeVector& P)
{
theMomentumDirection = P;
}
inline
void G4ParticleChangeForMSC::SetProposedMomentumDirection(const G4ThreeVector& P)
{
theMomentumDirection = P;
}
inline
void G4ParticleChangeForMSC::ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
{
theMomentumDirection.setX(Px);
theMomentumDirection.setY(Py);
theMomentumDirection.setZ(Pz);
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetMomentumDirection() const
{
return &theMomentumDirection;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetProposedMomentumDirection() const
{
return &theMomentumDirection;
}
inline
void G4ParticleChangeForMSC::SetProposedPosition(const G4ThreeVector& P)
{
thePosition = P;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetPosition() const
{
return &thePosition;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetProposedPosition() const
{
return &thePosition;
}
inline
void G4ParticleChangeForMSC::ProposePosition(const G4ThreeVector& P)
{
thePosition = P;
}
inline void G4ParticleChangeForMSC::Initialize(const G4Track& track)
{
theStatusChange = track.GetTrackStatus();
theMomentumDirection = track.GetMomentumDirection();
thePosition = track.GetPosition();
}
// Following methods will be removed in release 7.0
inline
void G4ParticleChangeForMSC::SetMomentumChange(const G4ThreeVector& P)
{
ProposeMomentumDirection(P);
}
inline
void G4ParticleChangeForMSC::SetMomentumChange(G4double Px, G4double Py, G4double Pz)
{
ProposeMomentumDirection(Px, Py, Pz);
}
inline
void G4ParticleChangeForMSC::SetPositionChange(const G4ThreeVector& P)
{
ProposePosition(P);
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetPositionChange() const
{
return GetPosition();
}