ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4TrackingManager.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4TrackingManager.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 //
28 //---------------------------------------------------------------
29 //
30 // G4TrackingManager.hh
31 //
32 // class description:
33 // This is an interface class among the event, the track
34 // and the tracking category. It handles necessary
35 // message passings between the upper hierarchical object, which
36 // is the event manager (G4EventManager), and lower hierarchical
37 // objects in the tracking category. It receives one track in an
38 // event from the event manager and takes care to finish tracking it.
39 // Geant4 kernel use only.
40 //
41 // Contact:
42 // Questions and comments to this code should be sent to
43 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
44 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
45 //
46 //---------------------------------------------------------------
47 
48 class G4TrackingManager;
49 
50 #ifndef G4TrackingManager_h
51 #define G4TrackingManager_h 1
52 
53 #include "globals.hh" // Include from 'global'
55 #include "G4SteppingManager.hh" // Include from 'tracking'
56 #include "G4Track.hh" // Include from 'tracking'
57 #include "G4TrackingMessenger.hh"
58 #include "G4TrackVector.hh" // Include from 'tracking'
59 #include "G4TrackStatus.hh" // Include from 'tracking'
60 #include "G4StepStatus.hh" // Include from 'tracking'
61 #include "G4UserTrackingAction.hh" // Include from 'tracking'
62 #include "G4UserSteppingAction.hh" // Include from 'tracking'
63 #include "G4VTrajectory.hh" // Include from 'tracking'
64 
66 
70 {
71 
72 //--------
73 public: // without description
74 //--------
75 
76 // Constructor/Destructor
77 
79  // TrackingManger should be dynamic persistent, therefore you
80  // need to invoke new() when you call this constructor.
81  // "G4SteppingManger' and "G4UserTrackingAction" will be
82  // constructed in this constructor. "This" pointer will be
83  // passed to "G4UserTrackingAction".
84 
86 
87 // Get/Set functions
88 
89  G4Track* GetTrack() const;
90 
91  G4int GetStoreTrajectory() const;
93 
95 
97 
99  void SetTrajectory(G4VTrajectory* aTrajectory);
100 
102 
103  // void SetNavigator(G4Navigator* apValue);
104 
105  void SetUserAction(G4UserTrackingAction* apAction);
106  void SetUserAction(G4UserSteppingAction* apAction);
107 
108  void SetVerboseLevel(G4int vLevel);
109  G4int GetVerboseLevel() const;
110 
111 
112 // Other member functions
113 
114  void ProcessOneTrack(G4Track* apValueG4Track);
115  // Invoking this function, a G4Track given by the argument
116  // will be tracked.
117 
118  void EventAborted();
119  // Invoking this function, the current tracking will be
120  // aborted immediately. The tracking will return the
121  // G4TrackStatus in 'fUserKillTrackAndSecondaries'.
122  // By this the EventManager deletes the current track and all
123  // its accoicated csecondaries.
124 
126  // This method can be invoked from the user's G4UserTrackingAction
127  // implementation to set his/her own G4VUserTrackInformation concrete
128  // class object to a G4Track object.
129 
130 //---------
131  private:
132 //---------
133 
134 // Member data
135 
144 // verbose
145  void TrackBanner();
146 
147 };
148 
149 
150 //*******************************************************************
151 //
152 // Inline function
153 //
154 //*******************************************************************
155 
157  return fpTrack;
158  }
159 
161  return StoreTrajectory;
162  }
163 
166  }
167 
169  return fpSteppingManager;
170  }
171 
173  return fpUserTrackingAction;
174  }
175 
177  return fpTrajectory ;
178  }
179 
181  return fpSteppingManager->GetfSecondary();
182  }
183 
185  fpUserTrackingAction = apAction;
186  if(apAction != 0){
187  apAction->SetTrackingManagerPointer(this);
188  }
189  }
190 
192  fpSteppingManager->SetUserAction(apAction);
193  if(apAction != 0){
195  }
196  }
197 
199  verboseLevel = vLevel;
200  fpSteppingManager -> SetVerboseLevel( vLevel );
201  }
202 
203 
205  return verboseLevel;
206  }
207 
209  if(fpTrack) fpTrack->SetUserInformation(aValue);
210  }
211 
212 #endif