Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4TrackingManager Class Reference

#include <G4TrackingManager.hh>

Public Member Functions

 G4TrackingManager ()
 
 ~G4TrackingManager ()
 
G4TrackGetTrack () const
 
G4int GetStoreTrajectory () const
 
void SetStoreTrajectory (G4int value)
 
G4SteppingManagerGetSteppingManager () const
 
G4UserTrackingActionGetUserTrackingAction () const
 
G4VTrajectoryGimmeTrajectory () const
 
void SetTrajectory (G4VTrajectory *aTrajectory)
 
G4TrackVectorGimmeSecondaries () const
 
void SetUserAction (G4UserTrackingAction *apAction)
 
void SetUserAction (G4UserSteppingAction *apAction)
 
void SetVerboseLevel (G4int vLevel)
 
G4int GetVerboseLevel () const
 
void ProcessOneTrack (G4Track *apValueG4Track)
 
void EventAborted ()
 
void SetUserTrackInformation (G4VUserTrackInformation *aValue)
 

Detailed Description

Definition at line 69 of file G4TrackingManager.hh.

Constructor & Destructor Documentation

G4TrackingManager::G4TrackingManager ( )

Definition at line 48 of file G4TrackingManager.cc.

50  : fpUserTrackingAction(0), fpTrajectory(0),
51  StoreTrajectory(0), verboseLevel(0), EventIsAborted(false)
52 {
53  fpSteppingManager = new G4SteppingManager();
54  messenger = new G4TrackingMessenger(this);
55 }
G4TrackingManager::~G4TrackingManager ( )

Definition at line 58 of file G4TrackingManager.cc.

60 {
61  delete messenger;
62  delete fpSteppingManager;
63  if (fpUserTrackingAction) delete fpUserTrackingAction;
64 }

Member Function Documentation

void G4TrackingManager::EventAborted ( )

Definition at line 164 of file G4TrackingManager.cc.

166 {
168  EventIsAborted = true;
169 }
void SetTrackStatus(const G4TrackStatus aTrackStatus)

Here is the call graph for this function:

Here is the caller graph for this function:

G4SteppingManager * G4TrackingManager::GetSteppingManager ( ) const
inline

Definition at line 169 of file G4TrackingManager.hh.

169  {
170  return fpSteppingManager;
171  }

Here is the caller graph for this function:

G4int G4TrackingManager::GetStoreTrajectory ( ) const
inline

Definition at line 161 of file G4TrackingManager.hh.

161  {
162  return StoreTrajectory;
163  }

Here is the caller graph for this function:

G4Track * G4TrackingManager::GetTrack ( ) const
inline

Definition at line 157 of file G4TrackingManager.hh.

157  {
158  return fpTrack;
159  }
G4UserTrackingAction * G4TrackingManager::GetUserTrackingAction ( ) const
inline

Definition at line 173 of file G4TrackingManager.hh.

173  {
174  return fpUserTrackingAction;
175  }
G4int G4TrackingManager::GetVerboseLevel ( ) const
inline

Definition at line 205 of file G4TrackingManager.hh.

205  {
206  return verboseLevel;
207  }

Here is the caller graph for this function:

G4TrackVector * G4TrackingManager::GimmeSecondaries ( ) const
inline

Definition at line 181 of file G4TrackingManager.hh.

181  {
182  return fpSteppingManager->GetfSecondary();
183  }
G4TrackVector * GetfSecondary()

Here is the call graph for this function:

Here is the caller graph for this function:

G4VTrajectory * G4TrackingManager::GimmeTrajectory ( ) const
inline

Definition at line 177 of file G4TrackingManager.hh.

177  {
178  return fpTrajectory ;
179  }

Here is the caller graph for this function:

void G4TrackingManager::ProcessOneTrack ( G4Track apValueG4Track)

Definition at line 67 of file G4TrackingManager.cc.

69 {
70 
71  // Receiving a G4Track from the EventManager, this funciton has the
72  // responsibility to trace the track till it stops.
73  fpTrack = apValueG4Track;
74  EventIsAborted = false;
75 
76  // Clear 2ndary particle vector
77  // GimmeSecondaries()->clearAndDestroy();
78  // std::vector<G4Track*>::iterator itr;
79  size_t itr;
80  // for(itr=GimmeSecondaries()->begin();itr=GimmeSecondaries()->end();itr++){
81  for(itr=0;itr<GimmeSecondaries()->size();itr++){
82  delete (*GimmeSecondaries())[itr];
83  }
84  GimmeSecondaries()->clear();
85 
86  if(verboseLevel>0 && (G4VSteppingVerbose::GetSilent()!=1) ) TrackBanner();
87 
88  // Give SteppingManger the pointer to the track which will be tracked
89  fpSteppingManager->SetInitialStep(fpTrack);
90 
91  // Pre tracking user intervention process.
92  fpTrajectory = 0;
93  if( fpUserTrackingAction != 0 ) {
94  fpUserTrackingAction->PreUserTrackingAction(fpTrack);
95  }
96 #ifdef G4_STORE_TRAJECTORY
97  // Construct a trajectory if it is requested
98  if(StoreTrajectory&&(!fpTrajectory)) {
99  // default trajectory concrete class object
100  switch (StoreTrajectory) {
101  default:
102  case 1: fpTrajectory = new G4Trajectory(fpTrack); break;
103  case 2: fpTrajectory = new G4SmoothTrajectory(fpTrack); break;
104  case 3: fpTrajectory = new G4RichTrajectory(fpTrack); break;
105  case 4: fpTrajectory = new G4RichTrajectory(fpTrack); break;
106  }
107  }
108 #endif
109 
110  // Give SteppingManger the maxmimum number of processes
111  fpSteppingManager->GetProcessNumber();
112 
113  // Give track the pointer to the Step
114  fpTrack->SetStep(fpSteppingManager->GetStep());
115 
116  // Inform beginning of tracking to physics processes
117  fpTrack->GetDefinition()->GetProcessManager()->StartTracking(fpTrack);
118 
119  // Track the particle Step-by-Step while it is alive
120  // G4StepStatus stepStatus;
121 
122  while( (fpTrack->GetTrackStatus() == fAlive) ||
123  (fpTrack->GetTrackStatus() == fStopButAlive) ){
124 
125  fpTrack->IncrementCurrentStepNumber();
126  fpSteppingManager->Stepping();
127 #ifdef G4_STORE_TRAJECTORY
128  if(StoreTrajectory) fpTrajectory->
129  AppendStep(fpSteppingManager->GetStep());
130 #endif
131  if(EventIsAborted) {
133  }
134  }
135  // Inform end of tracking to physics processes
137 
138  // Post tracking user intervention process.
139  if( fpUserTrackingAction != 0 ) {
140  fpUserTrackingAction->PostUserTrackingAction(fpTrack);
141  }
142 
143  // Destruct the trajectory if it was created
144 #ifdef G4VERBOSE
145  if(StoreTrajectory&&verboseLevel>10) fpTrajectory->ShowTrajectory();
146 #endif
147  if( (!StoreTrajectory)&&fpTrajectory ) {
148  delete fpTrajectory;
149  fpTrajectory = 0;
150  }
151 }
void SetTrackStatus(const G4TrackStatus aTrackStatus)
G4ParticleDefinition * GetDefinition() const
G4TrackStatus GetTrackStatus() const
G4TrackVector * GimmeSecondaries() const
static G4int GetSilent()
G4StepStatus Stepping()
void SetInitialStep(G4Track *valueTrack)
void IncrementCurrentStepNumber()
void StartTracking(G4Track *aTrack=0)
G4ProcessManager * GetProcessManager() const
virtual void PostUserTrackingAction(const G4Track *)
virtual void ShowTrajectory(std::ostream &os=G4cout) const
void SetStep(const G4Step *aValue)
virtual void PreUserTrackingAction(const G4Track *)
G4Step * GetStep() const

Here is the call graph for this function:

void G4TrackingManager::SetStoreTrajectory ( G4int  value)
inline

Definition at line 165 of file G4TrackingManager.hh.

165  {
166  StoreTrajectory = value;
167  }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

void G4TrackingManager::SetTrajectory ( G4VTrajectory aTrajectory)

Definition at line 153 of file G4TrackingManager.cc.

154 {
155 #ifndef G4_STORE_TRAJECTORY
156  G4Exception("G4TrackingManager::SetTrajectory()",
157  "Tracking0015", FatalException,
158  "Invoked without G4_STORE_TRAJECTORY option set!");
159 #endif
160  fpTrajectory = aTrajectory;
161 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

Here is the caller graph for this function:

void G4TrackingManager::SetUserAction ( G4UserTrackingAction apAction)
inline

Definition at line 185 of file G4TrackingManager.hh.

185  {
186  fpUserTrackingAction = apAction;
187  if(apAction != 0){
188  apAction->SetTrackingManagerPointer(this);
189  }
190  }
virtual void SetTrackingManagerPointer(G4TrackingManager *pValue)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4TrackingManager::SetUserAction ( G4UserSteppingAction apAction)
inline

Definition at line 192 of file G4TrackingManager.hh.

192  {
193  fpSteppingManager->SetUserAction(apAction);
194  if(apAction != 0){
195  apAction->SetSteppingManagerPointer(fpSteppingManager);
196  }
197  }
virtual void SetSteppingManagerPointer(G4SteppingManager *pValue)
void SetUserAction(G4UserSteppingAction *apAction)

Here is the call graph for this function:

void G4TrackingManager::SetUserTrackInformation ( G4VUserTrackInformation aValue)
inline

Definition at line 209 of file G4TrackingManager.hh.

209  {
210  if(fpTrack) fpTrack->SetUserInformation(aValue);
211  }
void SetUserInformation(G4VUserTrackInformation *aValue) const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4TrackingManager::SetVerboseLevel ( G4int  vLevel)
inline

Definition at line 199 of file G4TrackingManager.hh.

199  {
200  verboseLevel = vLevel;
201  fpSteppingManager -> SetVerboseLevel( vLevel );
202  }
void SetVerboseLevel(G4int vLevel)

Here is the caller graph for this function:


The documentation for this class was generated from the following files: