Warning, file /include/Geant4/G4ParticleChangeForDecay.hh 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
0032
0033
0034
0035
0036
0037 #ifndef G4ParticleChangeForDecay_hh
0038 #define G4ParticleChangeForDecay_hh 1
0039
0040 #include "globals.hh"
0041 #include "G4ios.hh"
0042 #include "G4ThreeVector.hh"
0043 #include "G4VParticleChange.hh"
0044
0045 class G4DynamicParticle;
0046
0047 class G4ParticleChangeForDecay final : public G4VParticleChange
0048 {
0049 public:
0050
0051 G4ParticleChangeForDecay();
0052
0053 ~G4ParticleChangeForDecay() override = default;
0054
0055 G4ParticleChangeForDecay(const G4ParticleChangeForDecay& right) = delete;
0056 G4ParticleChangeForDecay& operator=(const G4ParticleChangeForDecay& right) = delete;
0057
0058
0059
0060
0061
0062
0063 G4Step* UpdateStepForAtRest(G4Step* Step) final;
0064 G4Step* UpdateStepForPostStep(G4Step* Step) final;
0065
0066 void Initialize(const G4Track&) final;
0067
0068
0069 void ProposeGlobalTime(G4double t);
0070 void ProposeLocalTime(G4double t);
0071
0072
0073
0074
0075 G4double GetGlobalTime(G4double timeDelay = 0.0) const;
0076 G4double GetLocalTime(G4double timeDelay = 0.0) const;
0077
0078
0079
0080 const G4ThreeVector* GetPolarization() const;
0081 void ProposePolarization(G4double Px, G4double Py, G4double Pz);
0082 void ProposePolarization(const G4ThreeVector& finalPoralization);
0083
0084
0085
0086
0087 void DumpInfo() const final;
0088
0089 G4bool CheckIt(const G4Track&) final;
0090
0091 private:
0092
0093 G4double theGlobalTime0 = 0.0;
0094
0095 G4double theLocalTime0 = 0.0;
0096
0097
0098 G4double theTimeChange = 0.0;
0099
0100
0101 G4ThreeVector thePolarizationChange;
0102
0103 };
0104
0105
0106
0107
0108
0109 inline
0110 void G4ParticleChangeForDecay::ProposeGlobalTime(G4double t)
0111 {
0112 theTimeChange = (t - theGlobalTime0) + theLocalTime0;
0113 }
0114
0115 inline
0116 G4double G4ParticleChangeForDecay::GetGlobalTime(G4double timeDelay) const
0117 {
0118
0119 return theGlobalTime0 + (theTimeChange - theLocalTime0) + timeDelay;
0120 }
0121
0122 inline
0123 void G4ParticleChangeForDecay::ProposeLocalTime(G4double t)
0124 {
0125 theTimeChange = t;
0126 }
0127
0128 inline
0129 G4double G4ParticleChangeForDecay::GetLocalTime(G4double timeDelay) const
0130 {
0131
0132 return theTimeChange + timeDelay;
0133 }
0134
0135 inline
0136 const G4ThreeVector* G4ParticleChangeForDecay::GetPolarization() const
0137 {
0138 return &thePolarizationChange;
0139 }
0140
0141 inline
0142 void G4ParticleChangeForDecay::ProposePolarization(
0143 const G4ThreeVector& finalPoralization)
0144 {
0145 thePolarizationChange = finalPoralization;
0146 }
0147
0148 inline
0149 void G4ParticleChangeForDecay::ProposePolarization(G4double Px,
0150 G4double Py,
0151 G4double Pz)
0152 {
0153 thePolarizationChange.setX(Px);
0154 thePolarizationChange.setY(Py);
0155 thePolarizationChange.setZ(Pz);
0156 }
0157
0158 #endif