Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
tracking
include
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 67009 2013-01-29 16:00:21Z gcosmo $
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
66
class
G4VUserTrackInformation
;
67
69
class
G4TrackingManager
71
{
72
73
//--------
74
public
:
// without description
75
//--------
76
77
// Constructor/Destructor
78
79
G4TrackingManager
();
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
86
~G4TrackingManager
();
87
88
// Get/Set functions
89
90
G4Track
*
GetTrack
()
const
;
91
92
G4int
GetStoreTrajectory
()
const
;
93
void
SetStoreTrajectory
(
G4int
value
);
94
95
G4SteppingManager
*
GetSteppingManager
()
const
;
96
97
G4UserTrackingAction
*
GetUserTrackingAction
()
const
;
98
99
G4VTrajectory
*
GimmeTrajectory
()
const
;
100
void
SetTrajectory
(
G4VTrajectory
* aTrajectory);
101
102
G4TrackVector
*
GimmeSecondaries
()
const
;
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
126
void
SetUserTrackInformation
(
G4VUserTrackInformation
* aValue);
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
137
G4Track
* fpTrack;
138
G4SteppingManager
* fpSteppingManager;
139
G4UserTrackingAction
* fpUserTrackingAction;
140
G4VTrajectory
* fpTrajectory;
141
G4int
StoreTrajectory;
142
G4int
verboseLevel;
143
G4TrackingMessenger
* messenger;
144
G4bool
EventIsAborted;
145
// verbose
146
void
TrackBanner();
147
148
};
149
150
151
//*******************************************************************
152
//
153
// Inline function
154
//
155
//*******************************************************************
156
157
inline
G4Track
*
G4TrackingManager::GetTrack
()
const
{
158
return
fpTrack;
159
}
160
161
inline
G4int
G4TrackingManager::GetStoreTrajectory
()
const
{
162
return
StoreTrajectory;
163
}
164
165
inline
void
G4TrackingManager::SetStoreTrajectory
(
G4int
value
){
166
StoreTrajectory =
value
;
167
}
168
169
inline
G4SteppingManager
*
G4TrackingManager::GetSteppingManager
()
const
{
170
return
fpSteppingManager;
171
}
172
173
inline
G4UserTrackingAction
*
G4TrackingManager::GetUserTrackingAction
()
const
{
174
return
fpUserTrackingAction;
175
}
176
177
inline
G4VTrajectory
*
G4TrackingManager::GimmeTrajectory
()
const
{
178
return
fpTrajectory ;
179
}
180
181
inline
G4TrackVector
*
G4TrackingManager::GimmeSecondaries
()
const
{
182
return
fpSteppingManager->
GetfSecondary
();
183
}
184
185
inline
void
G4TrackingManager::SetUserAction
(
G4UserTrackingAction
* apAction){
186
fpUserTrackingAction = apAction;
187
if
(apAction != 0){
188
apAction->
SetTrackingManagerPointer
(
this
);
189
}
190
}
191
192
inline
void
G4TrackingManager::SetUserAction
(
G4UserSteppingAction
* apAction){
193
fpSteppingManager->
SetUserAction
(apAction);
194
if
(apAction != 0){
195
apAction->
SetSteppingManagerPointer
(fpSteppingManager);
196
}
197
}
198
199
inline
void
G4TrackingManager::SetVerboseLevel
(
G4int
vLevel){
200
verboseLevel = vLevel;
201
fpSteppingManager ->
SetVerboseLevel
( vLevel );
202
}
203
204
205
inline
G4int
G4TrackingManager::GetVerboseLevel
()
const
{
206
return
verboseLevel;
207
}
208
209
inline
void
G4TrackingManager::SetUserTrackInformation
(
G4VUserTrackInformation
* aValue) {
210
if
(fpTrack) fpTrack->
SetUserInformation
(aValue);
211
}
212
213
#endif
Generated on Sat May 25 2013 14:34:12 for Geant4 by
1.8.4