// // ******************************************************************** // * 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: G4ParticleChange.icc,v 1.10 2004/05/08 15:28:11 kurasige Exp $ // GEANT4 tag $Name: geant4-06-02-ref-01 $ // // inline G4Step* G4ParticleChange::UpdateStepInfo(G4Step* pStep) { return G4VParticleChange::UpdateStepInfo(pStep); } inline G4double G4ParticleChange::GetEnergy() const { return theEnergyChange; } inline void G4ParticleChange::ProposeEnergy(G4double finalEnergy) { theEnergyChange = finalEnergy; } inline const G4ThreeVector* G4ParticleChange::GetMomentumDirection() const { return &theMomentumDirectionChange; } inline void G4ParticleChange::ProposeMomentumDirection( G4double Px, G4double Py, G4double Pz ) { theMomentumDirectionChange.setX(Px); theMomentumDirectionChange.setY(Py); theMomentumDirectionChange.setZ(Pz); } inline void G4ParticleChange::ProposeMomentumDirection(const G4ThreeVector& P) { theMomentumDirectionChange = P; } inline const G4ThreeVector* G4ParticleChange::GetPolarization() const { return &thePolarizationChange; } inline void G4ParticleChange::ProposePolarization( const G4ThreeVector& finalPoralization) { thePolarizationChange = finalPoralization; } inline void G4ParticleChange::ProposePolarization( G4double Px, G4double Py, G4double Pz ) { thePolarizationChange.setX(Px); thePolarizationChange.setY(Py); thePolarizationChange.setZ(Pz); } inline const G4ThreeVector* G4ParticleChange::GetPosition() const { return &thePositionChange; } inline void G4ParticleChange::ProposePosition(const G4ThreeVector& finalPosition) { thePositionChange= finalPosition; } inline void G4ParticleChange::ProposePosition(G4double x,G4double y, G4double z) { thePositionChange.setX(x); thePositionChange.setY(y); thePositionChange.setZ(z); } inline G4double G4ParticleChange::GetProperTime() const { return theProperTimeChange; } inline void G4ParticleChange::ProposeProperTime(G4double tau) { theProperTimeChange = tau; } inline G4ThreeVector G4ParticleChange::GetGlobalPosition(const G4ThreeVector& displacement) const { return thePositionChange + displacement; } inline G4double G4ParticleChange::GetGlobalTime(G4double timeDelay) const { // Convert the time delay to the global time. return theTimeChange + timeDelay; } inline G4double G4ParticleChange::GetGlobalTime() const { return theTimeChange; } inline void G4ParticleChange::ProposeGlobalTime(G4double t) { theTimeChange = t; } inline G4double G4ParticleChange::GetMass() const { return theMassChange; } inline void G4ParticleChange::ProposeMass(G4double t) { theMassChange = t; } inline G4double G4ParticleChange::GetCharge() const { return theChargeChange; } inline void G4ParticleChange::ProposeCharge(G4double t) { theChargeChange = t; } inline G4double G4ParticleChange::GetWeight() const { return theWeightChange; } inline void G4ParticleChange::ProposeWeight(G4double w) { theWeightChange = w; theParentWeight = w; } inline G4ThreeVector G4ParticleChange::CalcMomentum(G4double energy, G4ThreeVector direction, G4double mass ) const { G4double tMomentum = sqrt(energy*energy + 2*energy*mass); return direction*tMomentum; } // Following methods will be removed in release 7.0 inline G4double G4ParticleChange::GetEnergyChange() const { return GetEnergy(); } inline void G4ParticleChange::SetEnergyChange(G4double energy) { ProposeEnergy(energy); } inline const G4ThreeVector* G4ParticleChange::GetMomentumChange() const { return GetMomentumDirection(); } inline void G4ParticleChange::SetMomentumChange( G4double Px, G4double Py, G4double Pz ) { ProposeMomentumDirection(Px, Py, Pz); } inline void G4ParticleChange::SetMomentumChange(const G4ThreeVector& P) { ProposeMomentumDirection(P); } inline const G4ThreeVector* G4ParticleChange::GetMomentumDirectionChange() const { return GetMomentumDirection(); } inline void G4ParticleChange::SetMomentumDirectionChange( G4double Px, G4double Py, G4double Pz ) { ProposeMomentumDirection(Px, Py, Pz); } inline void G4ParticleChange::SetMomentumDirectionChange(const G4ThreeVector& P) { ProposeMomentumDirection(P); } inline const G4ThreeVector* G4ParticleChange::GetPolarizationChange() const { return GetPolarization(); } inline void G4ParticleChange::SetPolarizationChange( const G4ThreeVector& finalPoralization) { ProposePolarization(finalPoralization); } inline void G4ParticleChange::SetPolarizationChange( G4double Px, G4double Py, G4double Pz ) { ProposePolarization(Px, Py, Pz); } inline const G4ThreeVector* G4ParticleChange::GetPositionChange() const { return GetPosition(); } inline void G4ParticleChange::SetPositionChange(const G4ThreeVector& finalPosition) { ProposePosition(finalPosition); } inline void G4ParticleChange::SetPositionChange(G4double x,G4double y, G4double z) { ProposePosition(x, y, z); } inline G4double G4ParticleChange::GetProperTimeChange() const { return GetProperTime(); } inline void G4ParticleChange::SetProperTimeChange(G4double tau) { ProposeProperTime(tau); } inline G4double G4ParticleChange::GetTimeChange() const { return GetGlobalTime(); } inline void G4ParticleChange::SetTimeChange(G4double t) { ProposeGlobalTime(t); } inline G4double G4ParticleChange::GetMassChange() const { return GetMass(); } inline void G4ParticleChange::SetMassChange(G4double t) { ProposeMass(t); } inline G4double G4ParticleChange::GetChargeChange() const { return GetCharge(); } inline void G4ParticleChange::SetChargeChange(G4double t) { ProposeCharge(t); } inline G4double G4ParticleChange::GetWeightChange() const { return GetWeight(); } inline void G4ParticleChange::SetWeightChange(G4double w) { ProposeWeight(w); }