Geant4
10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TrackingInformation.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
// Author: Mathieu Karamitros
28
29
// The code is developed in the framework of the ESA AO7146
30
//
31
// We would be very happy hearing from you, send us your feedback! :)
32
//
33
// In order for Geant4-DNA to be maintained and still open-source,
34
// article citations are crucial.
35
// If you use Geant4-DNA chemistry and you publish papers about your software,
36
// in addition to the general paper on Geant4-DNA:
37
//
38
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
39
//
40
// we would be very happy if you could please also cite the following
41
// reference papers on chemistry:
42
//
43
// J. Comput. Phys. 274 (2014) 841-882
44
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
45
46
#ifndef G4TRACKINGINFORMATION_HH
47
#define G4TRACKINGINFORMATION_HH
48
49
#include "
globals.hh
"
50
#include <vector>
51
#include <map>
52
#include "
G4StepStatus.hh
"
53
#include "
G4ThreeVector.hh
"
54
#include "
G4TouchableHandle.hh
"
55
#include "
G4TrackState.hh
"
56
#include "
G4memory.hh
"
57
#include "
G4ITStepProcessorState_Lock.hh
"
58
59
class
G4ITStepProcessor
;
60
61
typedef
std::vector<G4int>
G4SelectedAtRestDoItVector
;
62
typedef
std::vector<G4int>
G4SelectedAlongStepDoItVector
;
63
typedef
std::vector<G4int>
G4SelectedPostStepDoItVector
;
64
typedef
std::vector<G4int>
G4SelectedPostStepAtTimeDoItVector
;
65
66
class
G4Trajectory_Lock;
67
class
G4Track
;
68
struct
G4ProcessState_Lock
;
69
class
G4TrackingInformation
;
70
class
G4SaveNavigatorState_Lock;
71
struct
G4ITNavigatorState_Lock;
72
73
/** The class G4TrackingInformation (hold by G4IT)
74
* emcompasses processes informations computed
75
* at the PS/AS/AtRest/InteractionLength stage,
76
* and also, the selection of processes for the
77
* given step.
78
*/
79
class
G4TrackingInformation
80
{
81
public
:
82
G4TrackingInformation
();
83
~G4TrackingInformation
();
84
85
//________________________________________________
86
/** If the track is the one having the minimum step time,
87
* then it "leads" the step. It will interact will all the
88
* other tracks will be transported.
89
*/
90
inline
bool
IsLeadingStep
()
91
{
92
return
fStepLeader
;
93
}
94
inline
void
SetLeadingStep
(
bool
value)
95
{
96
fStepLeader
= value;
97
}
98
99
//________________________________________________
100
/** Every process should store the information
101
* computed at the InteractionLegth stage in the track.
102
*/
103
104
G4shared_ptr<G4ProcessState_Lock>
GetProcessState
(
size_t
index);
105
106
inline
void
RecordProcessState
(G4shared_ptr<G4ProcessState_Lock>,
107
size_t
index);
108
109
//___________________________________________________
110
111
void
SetStepProcessorState
(
G4ITStepProcessorState_Lock
*);
112
G4ITStepProcessorState_Lock
*
GetStepProcessorState
();
113
114
/*
115
std::map<int,G4VTrackStateHandle> fTrackStates;
116
std::map<void*,G4VTrackStateHandle> fMultipleTrackStates;
117
118
void SetTrackState(void* adress, G4VTrackStateHandle state)
119
{
120
fMultipleTrackStates[adress] = state;
121
}
122
G4VTrackStateHandle GetTrackState(void* adress)
123
{
124
return fMultipleTrackStates[adress];
125
}
126
127
void SetTrackState(G4VTrackStateHandle state)
128
{
129
fTrackStates[state->GetID()] = state;
130
}
131
template<typename T> G4VTrackStateHandle GetTrackState()
132
{
133
return fTrackStates[G4TrackStateID<T>::GetID()] ;
134
}
135
*/
136
137
G4TrackStateManager
&
GetTrackStateManager
()
138
{
139
return
fTrackStateManager
;
140
}
141
/*
142
G4TrackStateManager& GetTrackStateManager() const
143
{
144
return fTrackStateManager;
145
}
146
*/
147
inline
G4Trajectory_Lock*
GetTrajectory_Lock
()
148
{
149
return
fpTrajectory_Lock
;
150
}
151
152
inline
void
SetTrajectory_Lock
(G4Trajectory_Lock* trajLock)
153
{
154
fpTrajectory_Lock
= trajLock;
155
}
156
157
void
RecordCurrentPositionNTime
(
G4Track
*);
158
inline
const
G4ThreeVector
&
GetPreStepPosition
()
const
;
159
inline
G4double
GetPreStepLocalTime
()
const
;
160
inline
G4double
GetPreStepGlobalTime
()
const
;
161
162
inline
void
SetNavigatorState
(G4ITNavigatorState_Lock *);
163
inline
G4ITNavigatorState_Lock*
GetNavigatorState
()
const
;
164
165
//-------------
166
protected
:
167
//-------------
168
friend
class
G4ITStepProcessor
;
169
//_______________________________________________________
170
G4bool
fStepLeader
;
171
//_______________________________________________________
172
G4Trajectory_Lock*
fpTrajectory_Lock
;
173
174
G4TrackStateManager
fTrackStateManager
;
175
176
//_______________________________________________________
177
G4ThreeVector
fRecordedTrackPosition
;
178
G4double
fRecordedTrackLocalTime
;
179
G4double
fRecordedTrackGlobalTime
;
180
181
//_______________________________________________________
182
G4ITNavigatorState_Lock*
fNavigatorState
;
183
// G4SaveNavigatorState_Lock* fNavigatorState;
184
185
//_______________________________________________________
186
/** Holds the information related to processes
187
* Indexed on GetPhysIntVector
188
* (cf. G4ITStepProcessor header)
189
*/
190
// std::vector<G4ProcessState_Lock*> fProcessState;
191
std::vector<G4shared_ptr<G4ProcessState_Lock> >
fProcessState
;
192
193
//_______________________________________________________
194
G4ITStepProcessorState_Lock
*
fpStepProcessorState
;
195
196
//_______________________________________________________
197
/** Copy constructor
198
* \param other Object to copy from
199
*/
200
G4TrackingInformation
(
const
G4TrackingInformation
& other);
201
202
/** Assignment operator
203
* \param other Object to assign from
204
* \return A reference to this
205
*/
206
G4TrackingInformation
&
operator=
(
const
G4TrackingInformation
& other);
207
};
208
209
inline
210
void
G4TrackingInformation::SetStepProcessorState
(
G4ITStepProcessorState_Lock
* state)
211
{
212
fpStepProcessorState
= state;
213
}
214
215
inline
G4ITStepProcessorState_Lock
*
G4TrackingInformation::GetStepProcessorState
()
216
{
217
return
fpStepProcessorState
;
218
}
219
/*
220
inline void G4TrackingInformation::RecordProcessState(G4ProcessState_Lock* state,
221
size_t index)
222
{
223
// G4cout << "G4TrackingInformation::RecordProcessState" << G4endl;
224
fProcessState[index] = state;
225
}*/
226
227
inline
228
void
G4TrackingInformation::RecordProcessState
(G4shared_ptr<G4ProcessState_Lock> state,
229
size_t
index)
230
{
231
// G4cout << "G4TrackingInformation::RecordProcessState" << G4endl;
232
fProcessState
[index] = state;
233
}
234
235
inline
G4double
G4TrackingInformation::GetPreStepGlobalTime
()
const
236
{
237
return
fRecordedTrackGlobalTime
;
238
}
239
240
inline
G4double
G4TrackingInformation::GetPreStepLocalTime
()
const
241
{
242
return
fRecordedTrackLocalTime
;
243
}
244
245
inline
const
G4ThreeVector
&
G4TrackingInformation::GetPreStepPosition
()
const
246
{
247
return
fRecordedTrackPosition
;
248
}
249
250
inline
void
G4TrackingInformation::SetNavigatorState
(G4ITNavigatorState_Lock* state)
251
{
252
// G4cout << "Set Navigator state : " << state << G4endl;
253
fNavigatorState
= state;
254
}
255
256
inline
G4ITNavigatorState_Lock*
G4TrackingInformation::GetNavigatorState
()
const
257
{
258
return
fNavigatorState
;
259
}
260
261
#endif
// G4TRACKINGINFORMATION_HH
G4ITStepProcessorState_Lock.hh
G4StepStatus.hh
G4ThreeVector.hh
G4TouchableHandle.hh
G4TrackState.hh
G4SelectedPostStepAtTimeDoItVector
std::vector< G4int > G4SelectedPostStepAtTimeDoItVector
Definition:
G4TrackingInformation.hh:64
G4SelectedAlongStepDoItVector
std::vector< G4int > G4SelectedAlongStepDoItVector
Definition:
G4TrackingInformation.hh:62
G4SelectedAtRestDoItVector
std::vector< G4int > G4SelectedAtRestDoItVector
Definition:
G4TrackingInformation.hh:61
G4SelectedPostStepDoItVector
std::vector< G4int > G4SelectedPostStepDoItVector
Definition:
G4TrackingInformation.hh:63
G4double
double G4double
Definition:
G4Types.hh:83
G4bool
bool G4bool
Definition:
G4Types.hh:86
G4memory.hh
CLHEP::Hep3Vector
Definition:
ThreeVector.h:36
G4ITStepProcessorState_Lock
Definition:
G4ITStepProcessorState_Lock.hh:39
G4ITStepProcessor
Definition:
G4ITStepProcessor.hh:154
G4TrackStateManager
Definition:
G4TrackState.hh:142
G4Track
Definition:
G4Track.hh:67
G4TrackingInformation
Definition:
G4TrackingInformation.hh:80
G4TrackingInformation::SetTrajectory_Lock
void SetTrajectory_Lock(G4Trajectory_Lock *trajLock)
Definition:
G4TrackingInformation.hh:152
G4TrackingInformation::fTrackStateManager
G4TrackStateManager fTrackStateManager
Definition:
G4TrackingInformation.hh:174
G4TrackingInformation::fRecordedTrackLocalTime
G4double fRecordedTrackLocalTime
Definition:
G4TrackingInformation.hh:178
G4TrackingInformation::fProcessState
std::vector< G4shared_ptr< G4ProcessState_Lock > > fProcessState
Definition:
G4TrackingInformation.hh:191
G4TrackingInformation::GetProcessState
G4shared_ptr< G4ProcessState_Lock > GetProcessState(size_t index)
Definition:
G4TrackingInformation.cc:106
G4TrackingInformation::GetTrackStateManager
G4TrackStateManager & GetTrackStateManager()
Definition:
G4TrackingInformation.hh:137
G4TrackingInformation::fpStepProcessorState
G4ITStepProcessorState_Lock * fpStepProcessorState
Definition:
G4TrackingInformation.hh:194
G4TrackingInformation::SetStepProcessorState
void SetStepProcessorState(G4ITStepProcessorState_Lock *)
Definition:
G4TrackingInformation.hh:210
G4TrackingInformation::fNavigatorState
G4ITNavigatorState_Lock * fNavigatorState
Definition:
G4TrackingInformation.hh:182
G4TrackingInformation::IsLeadingStep
bool IsLeadingStep()
Definition:
G4TrackingInformation.hh:90
G4TrackingInformation::GetPreStepLocalTime
G4double GetPreStepLocalTime() const
Definition:
G4TrackingInformation.hh:240
G4TrackingInformation::fRecordedTrackPosition
G4ThreeVector fRecordedTrackPosition
Definition:
G4TrackingInformation.hh:177
G4TrackingInformation::RecordProcessState
void RecordProcessState(G4shared_ptr< G4ProcessState_Lock >, size_t index)
Definition:
G4TrackingInformation.hh:228
G4TrackingInformation::GetPreStepGlobalTime
G4double GetPreStepGlobalTime() const
Definition:
G4TrackingInformation.hh:235
G4TrackingInformation::SetNavigatorState
void SetNavigatorState(G4ITNavigatorState_Lock *)
Definition:
G4TrackingInformation.hh:250
G4TrackingInformation::GetStepProcessorState
G4ITStepProcessorState_Lock * GetStepProcessorState()
Definition:
G4TrackingInformation.hh:215
G4TrackingInformation::fpTrajectory_Lock
G4Trajectory_Lock * fpTrajectory_Lock
Definition:
G4TrackingInformation.hh:172
G4TrackingInformation::RecordCurrentPositionNTime
void RecordCurrentPositionNTime(G4Track *)
Definition:
G4TrackingInformation.cc:120
G4TrackingInformation::operator=
G4TrackingInformation & operator=(const G4TrackingInformation &other)
Definition:
G4TrackingInformation.cc:85
G4TrackingInformation::fRecordedTrackGlobalTime
G4double fRecordedTrackGlobalTime
Definition:
G4TrackingInformation.hh:179
G4TrackingInformation::fStepLeader
G4bool fStepLeader
Definition:
G4TrackingInformation.hh:170
G4TrackingInformation::SetLeadingStep
void SetLeadingStep(bool value)
Definition:
G4TrackingInformation.hh:94
G4TrackingInformation::GetNavigatorState
G4ITNavigatorState_Lock * GetNavigatorState() const
Definition:
G4TrackingInformation.hh:256
G4TrackingInformation::~G4TrackingInformation
~G4TrackingInformation()
Definition:
G4TrackingInformation.cc:52
G4TrackingInformation::GetTrajectory_Lock
G4Trajectory_Lock * GetTrajectory_Lock()
Definition:
G4TrackingInformation.hh:147
G4TrackingInformation::GetPreStepPosition
const G4ThreeVector & GetPreStepPosition() const
Definition:
G4TrackingInformation.hh:245
G4TrackingInformation::G4TrackingInformation
G4TrackingInformation()
Definition:
G4TrackingInformation.cc:40
globals.hh
G4ProcessState_Lock
Definition:
G4VITProcess.hh:59
geant4-v10.7.0
source
processes
electromagnetic
dna
management
include
G4TrackingInformation.hh
Generated by
1.9.6