Geant4  10.03
G4TrackingManager.hh
Go to the documentation of this file.
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 // $Id: G4TrackingManager.hh 66241 2012-12-13 18:34:42Z gunter $
28 //
29 //---------------------------------------------------------------
30 //
31 // G4TrackingManager.hh
32 //
33 // class description:
34 // This is an interface class among the event, the track
35 // and the tracking category. It handles necessary
36 // message passings between the upper hierarchical object, which
37 // is the event manager (G4EventManager), and lower hierarchical
38 // objects in the tracking category. It receives one track in an
39 // event from the event manager and takes care to finish tracking it.
40 // Geant4 kernel use only.
41 //
42 // Contact:
43 // Questions and comments to this code should be sent to
44 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
45 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
46 //
47 //---------------------------------------------------------------
48 
49 class G4TrackingManager;
50 
51 #ifndef G4TrackingManager_h
52 #define G4TrackingManager_h 1
53 
54 #include "globals.hh" // Include from 'global'
56 #include "G4SteppingManager.hh" // Include from 'tracking'
57 #include "G4Track.hh" // Include from 'tracking'
58 #include "G4TrackingMessenger.hh"
59 #include "G4TrackVector.hh" // Include from 'tracking'
60 #include "G4TrackStatus.hh" // Include from 'tracking'
61 #include "G4StepStatus.hh" // Include from 'tracking'
62 #include "G4UserTrackingAction.hh" // Include from 'tracking'
63 #include "G4UserSteppingAction.hh" // Include from 'tracking'
64 #include "G4VTrajectory.hh" // Include from 'tracking'
65 
67 
71 {
72 
73 //--------
74 public: // without description
75 //--------
76 
77 // Constructor/Destructor
78 
80  // TrackingManger should be dynamic persistent, therefore you
81  // need to invoke new() when you call this constructor.
82  // "G4SteppingManger' and "G4UserTrackingAction" will be
83  // constructed in this constructor. "This" pointer will be
84  // passed to "G4UserTrackingAction".
85 
87 
88 // Get/Set functions
89 
90  G4Track* GetTrack() const;
91 
92  G4int GetStoreTrajectory() const;
93  void SetStoreTrajectory(G4int value);
94 
96 
98 
100  void SetTrajectory(G4VTrajectory* aTrajectory);
101 
103 
104  // void SetNavigator(G4Navigator* apValue);
105 
106  void SetUserAction(G4UserTrackingAction* apAction);
107  void SetUserAction(G4UserSteppingAction* apAction);
108 
109  void SetVerboseLevel(G4int vLevel);
110  G4int GetVerboseLevel() const;
111 
112 
113 // Other member functions
114 
115  void ProcessOneTrack(G4Track* apValueG4Track);
116  // Invoking this function, a G4Track given by the argument
117  // will be tracked.
118 
119  void EventAborted();
120  // Invoking this function, the current tracking will be
121  // aborted immediately. The tracking will return the
122  // G4TrackStatus in 'fUserKillTrackAndSecondaries'.
123  // By this the EventManager deletes the current track and all
124  // its accoicated csecondaries.
125 
127  // This method can be invoked from the user's G4UserTrackingAction
128  // implementation to set his/her own G4VUserTrackInformation concrete
129  // class object to a G4Track object.
130 
131 //---------
132  private:
133 //---------
134 
135 // Member data
136 
145 // verbose
146  void TrackBanner();
147 
148 };
149 
150 
151 //*******************************************************************
152 //
153 // Inline function
154 //
155 //*******************************************************************
156 
158  return fpTrack;
159  }
160 
162  return StoreTrajectory;
163  }
164 
166  StoreTrajectory = value;
167  }
168 
170  return fpSteppingManager;
171  }
172 
174  return fpUserTrackingAction;
175  }
176 
178  return fpTrajectory ;
179  }
180 
182  return fpSteppingManager->GetfSecondary();
183  }
184 
186  fpUserTrackingAction = apAction;
187  if(apAction != 0){
188  apAction->SetTrackingManagerPointer(this);
189  }
190  }
191 
193  fpSteppingManager->SetUserAction(apAction);
194  if(apAction != 0){
196  }
197  }
198 
200  verboseLevel = vLevel;
201  fpSteppingManager -> SetVerboseLevel( vLevel );
202  }
203 
204 
206  return verboseLevel;
207  }
208 
210  if(fpTrack) fpTrack->SetUserInformation(aValue);
211  }
212 
213 #endif
virtual void SetTrackingManagerPointer(G4TrackingManager *pValue)
G4VTrajectory * GimmeTrajectory() const
void ProcessOneTrack(G4Track *apValueG4Track)
G4SteppingManager * GetSteppingManager() const
G4UserTrackingAction * fpUserTrackingAction
int G4int
Definition: G4Types.hh:78
G4SteppingManager * fpSteppingManager
void SetStoreTrajectory(G4int value)
void SetUserTrackInformation(G4VUserTrackInformation *aValue)
G4TrackVector * GimmeSecondaries() const
bool G4bool
Definition: G4Types.hh:79
G4TrackingMessenger * messenger
G4UserTrackingAction * GetUserTrackingAction() const
void SetUserAction(G4UserTrackingAction *apAction)
void SetUserInformation(G4VUserTrackInformation *aValue) const
void SetVerboseLevel(G4int vLevel)
std::vector< G4Track * > G4TrackVector
G4int GetStoreTrajectory() const
void SetUserAction(G4UserSteppingAction *apAction)
void SetTrajectory(G4VTrajectory *aTrajectory)
G4int GetVerboseLevel() const
G4VTrajectory * fpTrajectory
virtual void SetSteppingManagerPointer(G4SteppingManager *pValue)
G4TrackVector * GetfSecondary()
G4Track * GetTrack() const