File indexing completed on 2025-01-31 09:32:35
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
0038
0039
0040
0041
0042 #ifndef G4TrackingManager_hh
0043 #define G4TrackingManager_hh 1
0044
0045 #include "G4StepStatus.hh" // Include from 'tracking'
0046 #include "G4SteppingManager.hh" // Include from 'tracking'
0047 #include "G4Track.hh" // Include from 'tracking'
0048 #include "G4TrackStatus.hh" // Include from 'tracking'
0049 #include "G4TrackVector.hh" // Include from 'tracking'
0050 #include "G4TrackingMessenger.hh"
0051 #include "G4UserSteppingAction.hh" // Include from 'tracking'
0052 #include "G4UserTrackingAction.hh" // Include from 'tracking'
0053 #include "G4VTrajectory.hh" // Include from 'tracking'
0054 #include "globals.hh" // Include from 'global'
0055
0056 class G4VUserTrackInformation;
0057
0058
0059 class G4TrackingManager
0060
0061 {
0062 public:
0063
0064
0065
0066
0067
0068
0069
0070 G4TrackingManager();
0071 ~G4TrackingManager();
0072
0073
0074
0075 G4Track* GetTrack() const;
0076
0077 G4int GetStoreTrajectory() const;
0078 void SetStoreTrajectory(G4int value);
0079
0080 G4SteppingManager* GetSteppingManager() const;
0081
0082 G4UserTrackingAction* GetUserTrackingAction() const;
0083
0084 G4VTrajectory* GimmeTrajectory() const;
0085 void SetTrajectory(G4VTrajectory* aTrajectory);
0086
0087 G4TrackVector* GimmeSecondaries() const;
0088
0089 void SetUserAction(G4UserTrackingAction* apAction);
0090 void SetUserAction(G4UserSteppingAction* apAction);
0091
0092 void SetVerboseLevel(G4int vLevel);
0093 G4int GetVerboseLevel() const;
0094
0095
0096
0097 void ProcessOneTrack(G4Track* apValueG4Track);
0098
0099
0100
0101 void EventAborted();
0102
0103
0104
0105
0106
0107
0108 void SetUserTrackInformation(G4VUserTrackInformation* aValue);
0109
0110
0111
0112
0113 private:
0114 void TrackBanner();
0115
0116
0117
0118 G4Track* fpTrack = nullptr;
0119 G4SteppingManager* fpSteppingManager = nullptr;
0120 G4UserTrackingAction* fpUserTrackingAction = nullptr;
0121 G4VTrajectory* fpTrajectory = nullptr;
0122 G4int StoreTrajectory = 0;
0123 G4int verboseLevel = 0;
0124 G4TrackingMessenger* messenger = nullptr;
0125 G4bool EventIsAborted = false;
0126 };
0127
0128
0129
0130
0131
0132
0133
0134 inline G4Track* G4TrackingManager::GetTrack() const { return fpTrack; }
0135
0136 inline G4int G4TrackingManager::GetStoreTrajectory() const { return StoreTrajectory; }
0137
0138 inline void G4TrackingManager::SetStoreTrajectory(G4int value) { StoreTrajectory = value; }
0139
0140 inline G4SteppingManager* G4TrackingManager::GetSteppingManager() const
0141 {
0142 return fpSteppingManager;
0143 }
0144
0145 inline G4UserTrackingAction* G4TrackingManager::GetUserTrackingAction() const
0146 {
0147 return fpUserTrackingAction;
0148 }
0149
0150 inline G4VTrajectory* G4TrackingManager::GimmeTrajectory() const { return fpTrajectory; }
0151
0152 inline G4TrackVector* G4TrackingManager::GimmeSecondaries() const
0153 {
0154 return fpSteppingManager->GetfSecondary();
0155 }
0156
0157 inline void G4TrackingManager::SetUserAction(G4UserTrackingAction* apAction)
0158 {
0159 fpUserTrackingAction = apAction;
0160 if (apAction != nullptr) {
0161 apAction->SetTrackingManagerPointer(this);
0162 }
0163 }
0164
0165 inline void G4TrackingManager::SetUserAction(G4UserSteppingAction* apAction)
0166 {
0167 fpSteppingManager->SetUserAction(apAction);
0168 if (apAction != nullptr) {
0169 apAction->SetSteppingManagerPointer(fpSteppingManager);
0170 }
0171 }
0172
0173 inline void G4TrackingManager::SetVerboseLevel(G4int vLevel)
0174 {
0175 verboseLevel = vLevel;
0176 fpSteppingManager->SetVerboseLevel(vLevel);
0177 }
0178
0179 inline G4int G4TrackingManager::GetVerboseLevel() const { return verboseLevel; }
0180
0181 inline void G4TrackingManager::SetUserTrackInformation(G4VUserTrackInformation* aValue)
0182 {
0183 if (fpTrack != nullptr) fpTrack->SetUserInformation(aValue);
0184 }
0185
0186 #endif