ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
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
65
class
G4VUserTrackInformation
;
66
68
class
G4TrackingManager
70
{
71
72
//--------
73
public
:
// without description
74
//--------
75
76
// Constructor/Destructor
77
78
G4TrackingManager
();
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
85
~G4TrackingManager
();
86
87
// Get/Set functions
88
89
G4Track
*
GetTrack
()
const
;
90
91
G4int
GetStoreTrajectory
()
const
;
92
void
SetStoreTrajectory
(
G4int
value
);
93
94
G4SteppingManager
*
GetSteppingManager
()
const
;
95
96
G4UserTrackingAction
*
GetUserTrackingAction
()
const
;
97
98
G4VTrajectory
*
GimmeTrajectory
()
const
;
99
void
SetTrajectory
(
G4VTrajectory
* aTrajectory);
100
101
G4TrackVector
*
GimmeSecondaries
()
const
;
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
125
void
SetUserTrackInformation
(
G4VUserTrackInformation
* aValue);
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
136
G4Track
*
fpTrack
;
137
G4SteppingManager
*
fpSteppingManager
;
138
G4UserTrackingAction
*
fpUserTrackingAction
;
139
G4VTrajectory
*
fpTrajectory
;
140
G4int
StoreTrajectory
;
141
G4int
verboseLevel
;
142
G4TrackingMessenger
*
messenger
;
143
G4bool
EventIsAborted
;
144
// verbose
145
void
TrackBanner
();
146
147
};
148
149
150
//*******************************************************************
151
//
152
// Inline function
153
//
154
//*******************************************************************
155
156
inline
G4Track
*
G4TrackingManager::GetTrack
()
const
{
157
return
fpTrack
;
158
}
159
160
inline
G4int
G4TrackingManager::GetStoreTrajectory
()
const
{
161
return
StoreTrajectory
;
162
}
163
164
inline
void
G4TrackingManager::SetStoreTrajectory
(
G4int
value
){
165
StoreTrajectory
=
value
;
166
}
167
168
inline
G4SteppingManager
*
G4TrackingManager::GetSteppingManager
()
const
{
169
return
fpSteppingManager
;
170
}
171
172
inline
G4UserTrackingAction
*
G4TrackingManager::GetUserTrackingAction
()
const
{
173
return
fpUserTrackingAction
;
174
}
175
176
inline
G4VTrajectory
*
G4TrackingManager::GimmeTrajectory
()
const
{
177
return
fpTrajectory
;
178
}
179
180
inline
G4TrackVector
*
G4TrackingManager::GimmeSecondaries
()
const
{
181
return
fpSteppingManager
->
GetfSecondary
();
182
}
183
184
inline
void
G4TrackingManager::SetUserAction
(
G4UserTrackingAction
* apAction){
185
fpUserTrackingAction
= apAction;
186
if
(apAction != 0){
187
apAction->
SetTrackingManagerPointer
(
this
);
188
}
189
}
190
191
inline
void
G4TrackingManager::SetUserAction
(
G4UserSteppingAction
* apAction){
192
fpSteppingManager
->
SetUserAction
(apAction);
193
if
(apAction != 0){
194
apAction->
SetSteppingManagerPointer
(
fpSteppingManager
);
195
}
196
}
197
198
inline
void
G4TrackingManager::SetVerboseLevel
(
G4int
vLevel){
199
verboseLevel
= vLevel;
200
fpSteppingManager
->
SetVerboseLevel
( vLevel );
201
}
202
203
204
inline
G4int
G4TrackingManager::GetVerboseLevel
()
const
{
205
return
verboseLevel
;
206
}
207
208
inline
void
G4TrackingManager::SetUserTrackInformation
(
G4VUserTrackInformation
* aValue) {
209
if
(
fpTrack
)
fpTrack
->
SetUserInformation
(aValue);
210
}
211
212
#endif
geant4
tree
geant4-10.6-release
source
tracking
include
G4TrackingManager.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:53
using
1.8.2 with
ECCE GitHub integration