Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CsvOutputData.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CsvOutputData.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019-2022 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
11
12
#pragma once
13
14
#include <
ActsExamples/EventData/Index.hpp
>
15
16
#include <cstdint>
17
18
#include <dfe/dfe_namedtuple.hpp>
19
20
namespace
ActsExamples {
21
22
struct
ParticleData
{
24
uint64_t
particle_id
= 0;
26
int32_t
particle_type
= 0;
28
uint32_t
process
= 0
u
;
30
float
vx
= 0,
vy
= 0,
vz
= 0;
31
// Production time in ns. Not available in the TrackML datasets.
32
float
vt
= 0.0f;
34
float
px
= 0,
py
= 0,
pz
= 0;
36
float
m
= 0.0f;
38
float
q
= 0;
39
40
DFE_NAMEDTUPLE
(
ParticleData
,
particle_id
,
particle_type
,
process
,
vx
,
vy
,
vz
,
41
vt
,
px
,
py
,
pz
,
m
,
q
);
42
};
43
44
// Write out simhits before digitization (no hi_id associated)
45
struct
SimHitData
{
47
uint64_t
geometry_id
= 0
u
;
49
uint64_t
particle_id
= 0;
51
float
tx
= 0,
ty
= 0,
tz
= 0;
52
// True global hit time in ns. Not available in the TrackML datasets.
53
float
tt
= 0.0f;
55
float
tpx
= 0,
tpy
= 0,
tpz
= 0;
58
float
te
= 0.0f;
61
float
deltapx
= 0.0f;
62
float
deltapy
= 0.0f;
63
float
deltapz
= 0.0f;
64
float
deltae
= 0.0f;
65
// Hit index along the trajectory. Not available in the TrackML datasets.
66
int32_t
index
= -1;
67
68
DFE_NAMEDTUPLE
(
SimHitData
,
particle_id
,
geometry_id
,
tx
,
ty
,
tz
,
tt
,
tpx
,
tpy
,
69
tpz
,
te
,
deltapx
,
deltapy
,
deltapz
,
deltae
,
index
);
70
};
71
72
struct
TruthHitData
{
76
uint64_t
hit_id
= 0;
78
uint64_t
geometry_id
= 0
u
;
80
uint64_t
particle_id
= 0;
82
float
tx
= 0,
ty
= 0,
tz
= 0;
83
// True global hit time in ns. Not available in the TrackML datasets.
84
float
tt
= 0.0f;
86
float
tpx
= 0,
tpy
= 0,
tpz
= 0;
89
float
te
= 0.0f;
92
float
deltapx
= 0.0f;
93
float
deltapy
= 0.0f;
94
float
deltapz
= 0.0f;
95
float
deltae
= 0.0f;
96
// Hit index along the trajectory. Not available in the TrackML datasets.
97
int32_t
index
= -1;
98
99
DFE_NAMEDTUPLE
(
TruthHitData
,
hit_id
,
particle_id
,
geometry_id
,
tx
,
ty
,
tz
,
tt
,
100
tpx
,
tpy
,
tpz
,
te
,
deltapx
,
deltapy
,
deltapz
,
deltae
,
index
);
101
};
102
103
struct
HitData
{
105
uint64_t
hit_id
= 0;
107
uint64_t
geometry_id
= 0
u
;
109
float
x
= 0,
y
= 0,
z
= 0;
111
float
t
= 0.0f;
112
113
DFE_NAMEDTUPLE
(
HitData
,
hit_id
,
geometry_id
,
x
,
y
,
z
,
t
);
114
};
115
116
struct
MeasurementSimHitLink
{
118
uint64_t
measurement_id
= 0;
120
uint64_t
hit_id
= 0;
121
122
DFE_NAMEDTUPLE
(
MeasurementSimHitLink
,
measurement_id
,
hit_id
);
123
};
124
125
struct
MeasurementData
{
127
uint64_t
measurement_id
= 0;
129
uint64_t
geometry_id
= 0
u
;
131
uint8_t
local_key
= 0;
132
float
local0
= 0,
local1
= 0,
phi
= 0,
theta
= 0,
time
= 0;
133
float
var_local0
= 0,
var_local1
= 0,
var_phi
= 0,
var_theta
= 0,
134
var_time
= 0;
135
136
DFE_NAMEDTUPLE
(
MeasurementData
,
measurement_id
,
geometry_id
,
local_key
,
137
local0
,
local1
,
phi
,
theta
,
time
,
var_local0
,
var_local1
,
138
var_phi
,
var_theta
,
var_time
);
139
};
140
141
struct
CellData
{
143
uint64_t
geometry_id
= 0
u
;
147
uint64_t
measurement_id
= 0;
149
int32_t
channel0
= 0,
channel1
= 0;
151
float
timestamp
= 0;
153
float
value
= 0;
154
155
DFE_NAMEDTUPLE
(
CellData
,
geometry_id
,
measurement_id
,
channel0
,
channel1
,
156
timestamp
,
value
);
157
};
158
159
// uses hit id
160
struct
CellDataLegacy
{
162
uint64_t
geometry_id
= 0
u
;
166
uint64_t
hit_id
= 0;
168
int32_t
channel0
= 0,
channel1
= 0;
170
float
timestamp
= 0;
172
float
value
= 0;
173
174
DFE_NAMEDTUPLE
(
CellDataLegacy
,
geometry_id
,
hit_id
,
channel0
,
channel1
,
175
timestamp
,
value
);
176
};
177
178
struct
SurfaceData
{
180
uint64_t
geometry_id
= 0;
182
uint32_t
volume_id
= 0,
boundary_id
= 0,
layer_id
= 0,
module_id
= 0;
184
float
cx
= 0,
cy
= 0,
cz
= 0;
186
float
rot_xu
= 0,
rot_xv
= 0,
rot_xw
= 0;
187
float
rot_yu
= 0,
rot_yv
= 0,
rot_yw
= 0;
188
float
rot_zu
= 0,
rot_zv
= 0,
rot_zw
= 0;
190
int
bounds_type
= 0;
191
float
bound_param0
= -1.f;
192
float
bound_param1
= -1.f;
193
float
bound_param2
= -1.f;
194
float
bound_param3
= -1.f;
195
float
bound_param4
= -1.f;
196
float
bound_param5
= -1.f;
197
float
bound_param6
= -1.f;
198
199
float
module_t
= -1.f;
200
float
pitch_u
= -1.f;
201
float
pitch_v
= -1.f;
202
203
DFE_NAMEDTUPLE
(
SurfaceData
,
geometry_id
,
volume_id
,
boundary_id
,
layer_id
,
204
module_id
,
cx
,
cy
,
cz
,
rot_xu
,
rot_xv
,
rot_xw
,
rot_yu
,
rot_yv
,
205
rot_yw
,
rot_zu
,
rot_zv
,
rot_zw
,
bounds_type
,
bound_param0
,
206
bound_param1
,
bound_param2
,
bound_param3
,
bound_param4
,
207
bound_param5
,
bound_param6
,
module_t
,
pitch_u
,
pitch_v
);
208
};
209
210
struct
LayerVolumeData
{
212
uint64_t
geometry_id
= 0;
214
uint32_t
volume_id
= 0,
layer_id
= 0;
216
int
volume_type
= 0;
217
float
min_v0
= -1.f;
218
float
max_v0
= -1.f;
219
float
min_v1
= -1.f;
220
float
max_v1
= -1.f;
221
float
min_v2
= -1.f;
222
float
max_v2
= -1.f;
223
224
DFE_NAMEDTUPLE
(
LayerVolumeData
,
geometry_id
,
volume_id
,
layer_id
,
min_v0
,
225
max_v0
,
min_v1
,
max_v1
,
min_v2
,
max_v2
);
226
};
227
228
struct
SpacePointData
{
230
uint64_t
measurement_id
= 0;
232
float
sp_x
= 0,
sp_y
= 0,
sp_z
= 0,
sp_radius
= 0;
233
float
sp_covr
= 0,
sp_covz
= 0;
234
235
// half of the length of the top strip
236
float
sp_topHalfStripLength
= 0;
237
// half of the length of the bottom strip
238
float
sp_bottomHalfStripLength
= 0;
239
// direction of the top strip
240
Acts::Vector3
sp_topStripDirection
;
241
// direction of the bottom strip
242
Acts::Vector3
sp_bottomStripDirection
;
243
// distance between the center of the two strips
244
Acts::Vector3
sp_stripCenterDistance
;
245
// position of the center of the bottom strip
246
Acts::Vector3
sp_topStripCenterPosition
;
247
248
DFE_NAMEDTUPLE
(
SpacePointData
,
measurement_id
,
sp_x
,
sp_y
,
sp_z
,
sp_radius
,
249
sp_covr
,
sp_covz
,
sp_topHalfStripLength
,
250
sp_bottomHalfStripLength
,
sp_topStripDirection
[0],
251
sp_topStripDirection
[1],
sp_topStripDirection
[2],
252
sp_bottomStripDirection
[0],
sp_bottomStripDirection
[1],
253
sp_bottomStripDirection
[2],
sp_stripCenterDistance
[0],
254
sp_stripCenterDistance
[1],
sp_stripCenterDistance
[2],
255
sp_topStripCenterPosition
[0],
sp_topStripCenterPosition
[1],
256
sp_topStripCenterPosition
[2]);
257
};
258
259
struct
SurfaceGridData
{
261
uint64_t
geometry_id
= 0;
263
uint32_t
volume_id
= 0,
layer_id
= 0,
surface_id
= 0;
265
int
type_loc0
= -1;
266
int
nbins_loc0
= -1;
267
float
min_loc0
= 0,
max_loc0
= 0;
268
int
type_loc1
= -1;
269
int
nbins_loc1
= -1;
270
float
min_loc1
= 0,
max_loc1
= 0;
271
272
DFE_NAMEDTUPLE
(
SurfaceGridData
,
geometry_id
,
volume_id
,
layer_id
,
surface_id
,
273
type_loc0
,
nbins_loc0
,
min_loc0
,
max_loc0
,
type_loc1
,
274
nbins_loc1
,
min_loc1
,
max_loc1
);
275
};
276
277
struct
SpacepointData
{
278
uint64_t
measurement_id
;
279
uint64_t
geometry_id
;
280
float
x
,
y
,
z
;
281
float
var_r
,
var_z
;
282
DFE_NAMEDTUPLE
(
SpacepointData
,
measurement_id
,
geometry_id
,
x
,
y
,
z
,
var_r
,
283
var_z
);
284
};
285
286
struct
TrackParameterData
{
287
double
d0
;
288
double
z0
;
289
double
phi
;
290
double
theta
;
291
double
qop
;
292
293
double
var_d0
,
var_z0
,
var_phi
,
var_theta
,
var_qop
;
294
295
double
cov_d0z0
,
cov_d0phi
,
cov_d0theta
,
cov_d0qop
;
296
double
cov_z0d0
,
cov_z0phi
,
cov_z0theta
,
cov_z0qop
;
297
double
cov_phid0
,
cov_phiz0
,
cov_phitheta
,
cov_phiqop
;
298
double
cov_thetad0
,
cov_thetaz0
,
cov_thetaphi
,
cov_thetaqop
;
299
double
cov_qopd0
,
cov_qopz0
,
cov_qopphi
,
cov_qoptheta
;
300
301
DFE_NAMEDTUPLE
(
TrackParameterData
,
d0
,
z0
,
phi
,
theta
,
qop
,
var_d0
,
var_z0
,
302
var_phi
,
var_theta
,
var_qop
,
cov_d0z0
,
cov_d0phi
,
cov_d0theta
,
303
cov_d0qop
,
cov_z0d0
,
cov_z0phi
,
cov_z0theta
,
cov_z0qop
,
304
cov_phid0
,
cov_phiz0
,
cov_phitheta
,
cov_phiqop
,
cov_thetad0
,
305
cov_thetaz0
,
cov_thetaphi
,
cov_thetaqop
,
cov_qopd0
,
cov_qopz0
,
306
cov_qopphi
,
cov_qoptheta
);
307
};
308
309
struct
ProtoTrackData
{
310
std::size_t
trackId
;
311
Index
measurementId
;
312
double
x
,
y
,
z
;
313
314
DFE_NAMEDTUPLE
(
ProtoTrackData
,
trackId
,
measurementId
,
x
,
y
,
z
);
315
};
316
317
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
Csv
src
CsvOutputData.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration