Warning, file /include/Geant4/G4ParticleChange.icc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 inline G4Step* G4ParticleChange::UpdateStepInfo(G4Step* pStep)
0032 {
0033 return G4VParticleChange::UpdateStepInfo(pStep);
0034 }
0035
0036 inline G4double G4ParticleChange::GetEnergy() const { return theEnergyChange; }
0037
0038 inline void G4ParticleChange::ProposeEnergy(G4double finalEnergy)
0039 {
0040 theEnergyChange = finalEnergy;
0041 }
0042
0043 inline G4double G4ParticleChange::GetVelocity() const
0044 {
0045 return theVelocityChange;
0046 }
0047
0048 inline void G4ParticleChange::ProposeVelocity(G4double finalVelocity)
0049 {
0050 theVelocityChange = finalVelocity;
0051 isVelocityChanged = true;
0052 }
0053
0054 inline const G4ThreeVector* G4ParticleChange::GetMomentumDirection() const
0055 {
0056 return &theMomentumDirectionChange;
0057 }
0058
0059 inline void G4ParticleChange::ProposeMomentumDirection(G4double Px, G4double Py,
0060 G4double Pz)
0061 {
0062 theMomentumDirectionChange.setX(Px);
0063 theMomentumDirectionChange.setY(Py);
0064 theMomentumDirectionChange.setZ(Pz);
0065 }
0066
0067 inline void G4ParticleChange::ProposeMomentumDirection(const G4ThreeVector& P)
0068 {
0069 theMomentumDirectionChange = P;
0070 }
0071
0072 inline const G4ThreeVector* G4ParticleChange::GetPolarization() const
0073 {
0074 return &thePolarizationChange;
0075 }
0076
0077 inline void G4ParticleChange::ProposePolarization(
0078 const G4ThreeVector& finalPoralization)
0079 {
0080 thePolarizationChange = finalPoralization;
0081 }
0082
0083 inline void G4ParticleChange::ProposePolarization(G4double Px, G4double Py,
0084 G4double Pz)
0085 {
0086 thePolarizationChange.setX(Px);
0087 thePolarizationChange.setY(Py);
0088 thePolarizationChange.setZ(Pz);
0089 }
0090
0091 inline const G4ThreeVector* G4ParticleChange::GetPosition() const
0092 {
0093 return &thePositionChange;
0094 }
0095
0096 inline void G4ParticleChange::ProposePosition(
0097 const G4ThreeVector& finalPosition)
0098 {
0099 thePositionChange = finalPosition;
0100 }
0101
0102 inline void G4ParticleChange::ProposePosition(G4double x, G4double y,
0103 G4double z)
0104 {
0105 thePositionChange.setX(x);
0106 thePositionChange.setY(y);
0107 thePositionChange.setZ(z);
0108 }
0109
0110 inline G4double G4ParticleChange::GetProperTime() const
0111 {
0112 return theProperTimeChange;
0113 }
0114
0115 inline void G4ParticleChange::ProposeProperTime(G4double tau)
0116 {
0117 theProperTimeChange = tau;
0118 }
0119
0120 inline G4ThreeVector G4ParticleChange::GetGlobalPosition(
0121 const G4ThreeVector& displacement) const
0122 {
0123 return thePositionChange + displacement;
0124 }
0125
0126 inline void G4ParticleChange::ProposeGlobalTime(G4double t)
0127 {
0128 theTimeChange = (t - theGlobalTime0) + theLocalTime0;
0129 }
0130
0131 inline G4double G4ParticleChange::GetGlobalTime(G4double timeDelay) const
0132 {
0133
0134 return theGlobalTime0 + (theTimeChange - theLocalTime0) + timeDelay;
0135 }
0136
0137 inline void G4ParticleChange::ProposeLocalTime(G4double t)
0138 {
0139 theTimeChange = t;
0140 }
0141
0142 inline G4double G4ParticleChange::GetLocalTime(G4double timeDelay) const
0143 {
0144
0145 return theTimeChange + timeDelay;
0146 }
0147
0148 inline G4double G4ParticleChange::GetMass() const { return theMassChange; }
0149
0150 inline void G4ParticleChange::ProposeMass(G4double t) { theMassChange = t; }
0151
0152 inline G4double G4ParticleChange::GetCharge() const { return theChargeChange; }
0153
0154 inline void G4ParticleChange::ProposeCharge(G4double t) { theChargeChange = t; }
0155
0156 inline G4double G4ParticleChange::GetMagneticMoment() const
0157 {
0158 return theMagneticMomentChange;
0159 }
0160
0161 inline void G4ParticleChange::ProposeMagneticMoment(
0162 G4double finalMagneticMoment)
0163 {
0164 theMagneticMomentChange = finalMagneticMoment;
0165 }
0166
0167 inline G4ThreeVector G4ParticleChange::CalcMomentum(G4double energy,
0168 G4ThreeVector direction,
0169 G4double mass) const
0170 {
0171 G4double tMomentum = std::sqrt(energy * energy + 2 * energy * mass);
0172 return direction * tMomentum;
0173 }