EIC Software
Reference for
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
TrackEvaluationContainerv1.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackEvaluationContainerv1.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
4
#ifndef G4EVAL_TRACKEVALUATIONCONTAINERV1_H
5
#define G4EVAL_TRACKEVALUATIONCONTAINERV1_H
6
12
#include "
TrackEvaluationContainer.h
"
13
14
#include <vector>
15
17
29
class
TrackEvaluationContainerv1
:
public
TrackEvaluationContainer
30
{
31
32
public
:
33
35
explicit
TrackEvaluationContainerv1
()
36
{
37
// only one event structure per event (!)
38
m_events
.reserve(1);
39
}
40
42
void
Reset
()
override
;
43
45
46
class
EventStruct
47
{
48
49
public
:
50
using
List
= std::vector<EventStruct>;
51
static
constexpr
size_t
max_layer
= 57;
52
53
// constructor
54
EventStruct
()
55
{
56
for
(
size_t
i = 0; i <
max_layer
; ++i )
57
{
nclusters
[i] = 0; }
58
}
59
61
int
nclusters
[
max_layer
];
62
64
int
nclusters_mvtx
= 0;
65
67
int
nclusters_intt
= 0;
68
70
int
nclusters_tpc
= 0;
71
73
int
nclusters_micromegas
= 0;
74
};
75
77
78
class
ClusterStruct
79
{
80
public
:
81
82
using
List
= std::vector<ClusterStruct>;
83
85
unsigned
int
layer
= 0;
86
88
unsigned
int
size
= 0;
89
91
unsigned
int
truth_size
= 0;
92
94
int
phi_size
= 0;
95
int
z_size
= 0;
96
98
99
float
x
= 0;
100
float
y
= 0;
101
float
z
= 0;
102
float
r
= 0;
103
float
phi
= 0;
104
float
phi_error
= 0;
105
float
z_error
= 0;
107
109
110
float
trk_x
= 0;
111
float
trk_y
= 0;
112
float
trk_z
= 0;
113
float
trk_r
= 0;
114
float
trk_phi
= 0;
115
117
float
trk_phi_error
= 0;
118
float
trk_z_error
= 0;
119
121
float
trk_alpha
= 0;
122
124
float
trk_beta
= 0;
125
127
129
130
float
truth_x
= 0;
131
float
truth_y
= 0;
132
float
truth_z
= 0;
133
float
truth_r
= 0;
134
float
truth_phi
= 0;
135
137
float
truth_alpha
= 0;
138
140
float
truth_beta
= 0;
142
144
145
146
//* maximum charge on strip
147
float
energy_max
= 0;
148
149
//* sum of strip charges
150
float
energy_sum
= 0;
151
153
156
157
float
trk_px
= 0;
158
float
trk_py
= 0;
159
float
trk_pz
= 0;
161
164
165
float
truth_px
= 0;
166
float
truth_py
= 0;
167
float
truth_pz
= 0;
169
170
};
171
173
174
class
TrackStruct
175
{
176
public
:
177
178
// constructor
179
explicit
TrackStruct
()
180
{
181
// allocate enough size for the clusters
182
static
constexpr
int
max_layers = 60;
183
clusters
.reserve( max_layers );
184
}
185
186
using
List
= std::vector<TrackStruct>;
187
188
int
charge
= 0;
189
int
nclusters
= 0;
190
int64_t
mask
= 0;
191
192
int
nclusters_mvtx
= 0;
193
int
nclusters_intt
= 0;
194
int
nclusters_tpc
= 0;
195
int
nclusters_micromegas
= 0;
196
197
float
chisquare
= 0;
198
int
ndf
= 0;
199
201
202
float
x
= 0;
203
float
y
= 0;
204
float
z
= 0;
205
float
r
= 0;
206
float
phi
= 0;
208
210
211
float
px
= 0;
212
float
py
= 0;
213
float
pz
= 0;
214
float
pt
= 0;
215
float
p
= 0;
216
float
eta
= 0;
218
220
221
int
pid
= 0;
222
int
embed
= 0;
223
bool
is_primary
=
false
;
224
225
// number of g4hits from this MC track that match
226
int
contributors
= 0;
227
228
float
truth_px
= 0;
229
float
truth_py
= 0;
230
float
truth_pz
= 0;
231
float
truth_pt
= 0;
232
float
truth_p
= 0;
233
float
truth_eta
= 0;
235
236
// associate clusters
237
ClusterStruct::List
clusters
;
238
};
239
241
242
243
const
EventStruct::List
&
events
()
const
244
{
return
m_events
; }
245
246
const
ClusterStruct::List
&
clusters
()
const
247
{
return
m_clusters
; }
248
249
const
TrackStruct::List
&
tracks
()
const
250
{
return
m_tracks
; }
251
253
255
256
257
void
addEvent
(
const
EventStruct
& event )
258
{
m_events
.push_back( event ); }
259
260
void
addCluster
(
const
ClusterStruct
& cluster )
261
{
m_clusters
.push_back( cluster ); }
262
263
void
addTrack
(
const
TrackStruct
& track )
264
{
m_tracks
.push_back( track ); }
265
266
void
clearEvents
()
267
{
m_events
.clear(); }
268
269
void
clearClusters
()
270
{
m_clusters
.clear(); }
271
272
void
clearTracks
()
273
{
m_tracks
.clear(); }
274
276
277
private
:
278
280
/* there is only one element per event in this array */
281
EventStruct::List
m_events
;
282
284
ClusterStruct::List
m_clusters
;
285
287
TrackStruct::List
m_tracks
;
288
289
ClassDefOverride(
TrackEvaluationContainerv1
,1)
290
291
};
292
293
#endif
fun4all_coresoftware
blob
master
simulation
g4simulation
g4eval
TrackEvaluationContainerv1.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:49
using
1.8.2 with
EIC GitHub integration