File indexing completed on 2025-01-18 09:58:51
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 #ifndef G4ParticleChangeForMSC_hh
0037 #define G4ParticleChangeForMSC_hh 1
0038
0039 #include "globals.hh"
0040 #include "G4ios.hh"
0041 #include "G4ThreeVector.hh"
0042 #include "G4VParticleChange.hh"
0043
0044 class G4ParticleChangeForMSC final : public G4VParticleChange
0045 {
0046 public:
0047
0048 G4ParticleChangeForMSC();
0049
0050 ~G4ParticleChangeForMSC() override = default;
0051
0052 G4ParticleChangeForMSC(const G4ParticleChangeForMSC& right) = delete;
0053 G4ParticleChangeForMSC& operator=
0054 (const G4ParticleChangeForMSC& right) = delete;
0055
0056
0057 G4Step* UpdateStepForAlongStep(G4Step* step) final;
0058
0059
0060 inline void InitialiseMSC(const G4Track&, const G4Step& step);
0061
0062 inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
0063 inline const G4ThreeVector* GetProposedMomentumDirection() const;
0064
0065 inline void ProposePosition(const G4ThreeVector& finalPosition);
0066 inline const G4ThreeVector& GetProposedPosition() const;
0067
0068 private:
0069
0070 G4ThreeVector theMomentumDirection;
0071
0072
0073
0074 G4ThreeVector thePosition;
0075
0076 };
0077
0078 inline void G4ParticleChangeForMSC::ProposeMomentumDirection(
0079 const G4ThreeVector& P)
0080 {
0081 theMomentumDirection = P;
0082 }
0083
0084 inline const G4ThreeVector*
0085 G4ParticleChangeForMSC::GetProposedMomentumDirection() const
0086 {
0087 return &theMomentumDirection;
0088 }
0089
0090 inline void G4ParticleChangeForMSC::ProposePosition(const G4ThreeVector& P)
0091 {
0092 thePosition = P;
0093 }
0094
0095 inline const G4ThreeVector& G4ParticleChangeForMSC::GetProposedPosition() const
0096 {
0097 return thePosition;
0098 }
0099
0100 inline void
0101 G4ParticleChangeForMSC::InitialiseMSC(const G4Track& track, const G4Step& step)
0102 {
0103 theStatusChange = track.GetTrackStatus();
0104 auto poststep = step.GetPostStepPoint();
0105 thePosition = poststep->GetPosition();
0106 theMomentumDirection = poststep->GetMomentumDirection();
0107 theCurrentTrack = &track;
0108 }
0109
0110 #endif