ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4TrackingInformation.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4TrackingInformation.hh
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // Author: Mathieu Karamitros
28 
29 // The code is developed in the framework of the ESA AO7146
30 //
31 // We would be very happy hearing from you, send us your feedback! :)
32 //
33 // In order for Geant4-DNA to be maintained and still open-source,
34 // article citations are crucial.
35 // If you use Geant4-DNA chemistry and you publish papers about your software,
36 // in addition to the general paper on Geant4-DNA:
37 //
38 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
39 //
40 // we would be very happy if you could please also cite the following
41 // reference papers on chemistry:
42 //
43 // J. Comput. Phys. 274 (2014) 841-882
44 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508
45 
46 #ifndef G4TRACKINGINFORMATION_HH
47 #define G4TRACKINGINFORMATION_HH
48 
49 #include "globals.hh"
50 #include <vector>
51 #include <map>
52 #include "G4StepStatus.hh"
53 #include "G4ThreeVector.hh"
54 #include "G4TouchableHandle.hh"
55 #include "G4TrackState.hh"
56 #include "G4memory.hh"
58 
60 
61 typedef std::vector<G4int> G4SelectedAtRestDoItVector;
62 typedef std::vector<G4int> G4SelectedAlongStepDoItVector;
63 typedef std::vector<G4int> G4SelectedPostStepDoItVector;
64 typedef std::vector<G4int> G4SelectedPostStepAtTimeDoItVector;
65 
66 class G4Trajectory_Lock;
67 class G4Track;
68 struct G4ProcessState_Lock;
70 class G4SaveNavigatorState_Lock;
71 struct G4ITNavigatorState_Lock;
72 
80 {
81 public:
84 
85  //________________________________________________
90  inline bool IsLeadingStep()
91  {
92  return fStepLeader;
93  }
94  inline void SetLeadingStep(bool value)
95  {
97  }
98 
99  //________________________________________________
104  G4shared_ptr<G4ProcessState_Lock> GetProcessState(size_t index);
105 
106  inline void RecordProcessState(G4shared_ptr<G4ProcessState_Lock>,
107  size_t index);
108 
109  //___________________________________________________
110 
113 
114  /*
115  std::map<int,G4VTrackStateHandle> fTrackStates;
116  std::map<void*,G4VTrackStateHandle> fMultipleTrackStates;
117 
118  void SetTrackState(void* adress, G4VTrackStateHandle state)
119  {
120  fMultipleTrackStates[adress] = state;
121  }
122  G4VTrackStateHandle GetTrackState(void* adress)
123  {
124  return fMultipleTrackStates[adress];
125  }
126 
127  void SetTrackState(G4VTrackStateHandle state)
128  {
129  fTrackStates[state->GetID()] = state;
130  }
131  template<typename T> G4VTrackStateHandle GetTrackState()
132  {
133  return fTrackStates[G4TrackStateID<T>::GetID()] ;
134  }
135  */
136 
138  {
139  return fTrackStateManager;
140  }
141  /*
142  G4TrackStateManager& GetTrackStateManager() const
143  {
144  return fTrackStateManager;
145  }
146  */
148  {
149  return fpTrajectory_Lock;
150  }
151 
152  inline void SetTrajectory_Lock(G4Trajectory_Lock* trajLock)
153  {
154  fpTrajectory_Lock = trajLock;
155  }
156 
158  inline const G4ThreeVector& GetPreStepPosition() const;
159  inline G4double GetPreStepLocalTime() const;
160  inline G4double GetPreStepGlobalTime() const;
161 
162  inline void SetNavigatorState(G4ITNavigatorState_Lock *);
163  inline G4ITNavigatorState_Lock* GetNavigatorState() const;
164 
165  //-------------
166 protected:
167  //-------------
168  friend class G4ITStepProcessor;
169  //_______________________________________________________
171  //_______________________________________________________
173 
175 
176  //_______________________________________________________
180 
181  //_______________________________________________________
182  G4ITNavigatorState_Lock* fNavigatorState;
183 // G4SaveNavigatorState_Lock* fNavigatorState;
184 
185 //_______________________________________________________
190 // std::vector<G4ProcessState_Lock*> fProcessState;
191  std::vector<G4shared_ptr<G4ProcessState_Lock> > fProcessState;
192 
193  //_______________________________________________________
195 
196  //_______________________________________________________
201 
207 };
208 
209 inline
211 {
212  fpStepProcessorState = state;
213 }
214 
216 {
217  return fpStepProcessorState;
218 }
219 /*
220  inline void G4TrackingInformation::RecordProcessState(G4ProcessState_Lock* state,
221  size_t index)
222  {
223  // G4cout << "G4TrackingInformation::RecordProcessState" << G4endl;
224  fProcessState[index] = state;
225  }*/
226 
227 inline
228 void G4TrackingInformation::RecordProcessState(G4shared_ptr<G4ProcessState_Lock> state,
229  size_t index)
230 {
231  // G4cout << "G4TrackingInformation::RecordProcessState" << G4endl;
232  fProcessState[index] = state;
233 }
234 
236 {
238 }
239 
241 {
243 }
244 
246 {
247  return fRecordedTrackPosition;
248 }
249 
250 inline void G4TrackingInformation::SetNavigatorState(G4ITNavigatorState_Lock* state)
251 {
252  // G4cout << "Set Navigator state : " << state << G4endl;
253  fNavigatorState = state;
254 }
255 
256 inline G4ITNavigatorState_Lock* G4TrackingInformation::GetNavigatorState() const
257 {
258  return fNavigatorState;
259 }
260 
261 #endif // G4TRACKINGINFORMATION_HH