Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
+59 -103
View File
@@ -23,195 +23,151 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4ParticleChange inline methods implementation
//
//
//
inline
G4Step* G4ParticleChange::UpdateStepInfo(G4Step* pStep)
// Author: Hisaya Kurashige, 23 March 1998
// --------------------------------------------------------------------
inline G4Step* G4ParticleChange::UpdateStepInfo(G4Step* pStep)
{
return G4VParticleChange::UpdateStepInfo(pStep);
}
inline
G4double G4ParticleChange::GetEnergy() const
{
return theEnergyChange;
}
inline G4double G4ParticleChange::GetEnergy() const { return theEnergyChange; }
inline
void G4ParticleChange::ProposeEnergy(G4double finalEnergy)
inline void G4ParticleChange::ProposeEnergy(G4double finalEnergy)
{
theEnergyChange = finalEnergy;
}
inline
G4double G4ParticleChange::GetVelocity() const
inline G4double G4ParticleChange::GetVelocity() const
{
return theVelocityChange;
return theVelocityChange;
}
inline
void G4ParticleChange::ProposeVelocity(G4double finalVelocity)
inline void G4ParticleChange::ProposeVelocity(G4double finalVelocity)
{
theVelocityChange = finalVelocity;
isVelocityChanged = true;
theVelocityChange = finalVelocity;
isVelocityChanged = true;
}
inline
const G4ThreeVector* G4ParticleChange::GetMomentumDirection() const
inline const G4ThreeVector* G4ParticleChange::GetMomentumDirection() const
{
return &theMomentumDirectionChange;
}
inline
void G4ParticleChange::ProposeMomentumDirection(
G4double Px,
G4double Py,
G4double Pz )
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)
inline void G4ParticleChange::ProposeMomentumDirection(const G4ThreeVector& P)
{
theMomentumDirectionChange = P;
}
inline
const G4ThreeVector* G4ParticleChange::GetPolarization() const
inline const G4ThreeVector* G4ParticleChange::GetPolarization() const
{
return &thePolarizationChange;
}
inline
void G4ParticleChange::ProposePolarization( const G4ThreeVector& finalPoralization)
inline void G4ParticleChange::ProposePolarization(
const G4ThreeVector& finalPoralization)
{
thePolarizationChange = finalPoralization;
}
inline
void G4ParticleChange::ProposePolarization(
G4double Px,
G4double Py,
G4double Pz )
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
inline const G4ThreeVector* G4ParticleChange::GetPosition() const
{
return &thePositionChange;
}
inline
void G4ParticleChange::ProposePosition(const G4ThreeVector& finalPosition)
inline void G4ParticleChange::ProposePosition(
const G4ThreeVector& finalPosition)
{
thePositionChange= finalPosition;
thePositionChange = finalPosition;
}
inline
void G4ParticleChange::ProposePosition(G4double x,G4double y, G4double z)
inline void G4ParticleChange::ProposePosition(G4double x, G4double y,
G4double z)
{
thePositionChange.setX(x);
thePositionChange.setY(y);
thePositionChange.setZ(z);
}
inline
G4double G4ParticleChange::GetProperTime() const
inline G4double G4ParticleChange::GetProperTime() const
{
return theProperTimeChange;
return theProperTimeChange;
}
inline
void G4ParticleChange::ProposeProperTime(G4double tau)
inline void G4ParticleChange::ProposeProperTime(G4double tau)
{
theProperTimeChange = tau;
}
inline
G4ThreeVector G4ParticleChange::GetGlobalPosition(const G4ThreeVector& displacement) const
inline G4ThreeVector G4ParticleChange::GetGlobalPosition(
const G4ThreeVector& displacement) const
{
return thePositionChange + displacement;
}
inline
void G4ParticleChange::ProposeGlobalTime(G4double t)
inline void G4ParticleChange::ProposeGlobalTime(G4double t)
{
theTimeChange = (t-theGlobalTime0) + theLocalTime0;
}
inline
G4double G4ParticleChange::GetGlobalTime(G4double timeDelay) const
{
// Convert the time delay to the global time.
return theGlobalTime0 + (theTimeChange-theLocalTime0) + timeDelay;
theTimeChange = (t - theGlobalTime0) + theLocalTime0;
}
inline
void G4ParticleChange::ProposeLocalTime(G4double t)
inline G4double G4ParticleChange::GetGlobalTime(G4double timeDelay) const
{
// convert the time delay to the global time
return theGlobalTime0 + (theTimeChange - theLocalTime0) + timeDelay;
}
inline void G4ParticleChange::ProposeLocalTime(G4double t)
{
theTimeChange = t;
}
inline
G4double G4ParticleChange::GetLocalTime(G4double timeDelay) const
inline G4double G4ParticleChange::GetLocalTime(G4double timeDelay) const
{
// Convert the time delay to the local time.
// convert the time delay to the local time
return theTimeChange + timeDelay;
}
inline
G4double G4ParticleChange::GetMass() const
{
return theMassChange;
}
inline G4double G4ParticleChange::GetMass() const { return theMassChange; }
inline
void G4ParticleChange::ProposeMass(G4double t)
{
theMassChange = t;
}
inline void G4ParticleChange::ProposeMass(G4double t) { theMassChange = t; }
inline
G4double G4ParticleChange::GetCharge() const
{
return theChargeChange;
}
inline G4double G4ParticleChange::GetCharge() const { return theChargeChange; }
inline
void G4ParticleChange::ProposeCharge(G4double t)
{
theChargeChange = t;
}
inline void G4ParticleChange::ProposeCharge(G4double t) { theChargeChange = t; }
inline
G4double G4ParticleChange::GetMagneticMoment() const
inline G4double G4ParticleChange::GetMagneticMoment() const
{
return theMagneticMomentChange;
}
inline
void G4ParticleChange::ProposeMagneticMoment(G4double finalMagneticMoment)
inline void G4ParticleChange::ProposeMagneticMoment(
G4double finalMagneticMoment)
{
theMagneticMomentChange = finalMagneticMoment;
}
inline
G4ThreeVector G4ParticleChange::CalcMomentum(G4double energy,
G4ThreeVector direction,
G4double mass
) const
{
G4double tMomentum = std::sqrt(energy*energy + 2*energy*mass);
return direction*tMomentum;
}
inline G4ThreeVector G4ParticleChange::CalcMomentum(G4double energy,
G4ThreeVector direction,
G4double mass) const
{
G4double tMomentum = std::sqrt(energy * energy + 2 * energy * mass);
return direction * tMomentum;
}