File indexing completed on 2025-01-18 09:59:13
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 using ProfilerConfig = G4Track::ProfilerConfig;
0064
0065 public:
0066
0067
0068
0069
0070
0071
0072
0073 G4TrackingManager();
0074 ~G4TrackingManager();
0075
0076
0077
0078 G4Track* GetTrack() const;
0079
0080 G4int GetStoreTrajectory() const;
0081 void SetStoreTrajectory(G4int value);
0082
0083 G4SteppingManager* GetSteppingManager() const;
0084
0085 G4UserTrackingAction* GetUserTrackingAction() const;
0086
0087 G4VTrajectory* GimmeTrajectory() const;
0088 void SetTrajectory(G4VTrajectory* aTrajectory);
0089
0090 G4TrackVector* GimmeSecondaries() const;
0091
0092 void SetUserAction(G4UserTrackingAction* apAction);
0093 void SetUserAction(G4UserSteppingAction* apAction);
0094
0095 void SetVerboseLevel(G4int vLevel);
0096 G4int GetVerboseLevel() const;
0097
0098
0099
0100 void ProcessOneTrack(G4Track* apValueG4Track);
0101
0102
0103
0104 void EventAborted();
0105
0106
0107
0108
0109
0110
0111 void SetUserTrackInformation(G4VUserTrackInformation* aValue);
0112
0113
0114
0115
0116 private:
0117 void TrackBanner();
0118
0119
0120
0121 G4Track* fpTrack = nullptr;
0122 G4SteppingManager* fpSteppingManager = nullptr;
0123 G4UserTrackingAction* fpUserTrackingAction = nullptr;
0124 G4VTrajectory* fpTrajectory = nullptr;
0125 G4int StoreTrajectory = 0;
0126 G4int verboseLevel = 0;
0127 G4TrackingMessenger* messenger = nullptr;
0128 G4bool EventIsAborted = false;
0129 };
0130
0131
0132
0133
0134
0135
0136
0137 inline G4Track* G4TrackingManager::GetTrack() const { return fpTrack; }
0138
0139 inline G4int G4TrackingManager::GetStoreTrajectory() const { return StoreTrajectory; }
0140
0141 inline void G4TrackingManager::SetStoreTrajectory(G4int value) { StoreTrajectory = value; }
0142
0143 inline G4SteppingManager* G4TrackingManager::GetSteppingManager() const
0144 {
0145 return fpSteppingManager;
0146 }
0147
0148 inline G4UserTrackingAction* G4TrackingManager::GetUserTrackingAction() const
0149 {
0150 return fpUserTrackingAction;
0151 }
0152
0153 inline G4VTrajectory* G4TrackingManager::GimmeTrajectory() const { return fpTrajectory; }
0154
0155 inline G4TrackVector* G4TrackingManager::GimmeSecondaries() const
0156 {
0157 return fpSteppingManager->GetfSecondary();
0158 }
0159
0160 inline void G4TrackingManager::SetUserAction(G4UserTrackingAction* apAction)
0161 {
0162 fpUserTrackingAction = apAction;
0163 if (apAction != nullptr) {
0164 apAction->SetTrackingManagerPointer(this);
0165 }
0166 }
0167
0168 inline void G4TrackingManager::SetUserAction(G4UserSteppingAction* apAction)
0169 {
0170 fpSteppingManager->SetUserAction(apAction);
0171 if (apAction != nullptr) {
0172 apAction->SetSteppingManagerPointer(fpSteppingManager);
0173 }
0174 }
0175
0176 inline void G4TrackingManager::SetVerboseLevel(G4int vLevel)
0177 {
0178 verboseLevel = vLevel;
0179 fpSteppingManager->SetVerboseLevel(vLevel);
0180 }
0181
0182 inline G4int G4TrackingManager::GetVerboseLevel() const { return verboseLevel; }
0183
0184 inline void G4TrackingManager::SetUserTrackInformation(G4VUserTrackInformation* aValue)
0185 {
0186 if (fpTrack != nullptr) fpTrack->SetUserInformation(aValue);
0187 }
0188
0189 #endif