Analysis Software
Documentation for sPHENIX simulation software
 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 
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 = 0u;
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 
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 = 0u;
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 
70 };
71 
72 struct TruthHitData {
76  uint64_t hit_id = 0;
78  uint64_t geometry_id = 0u;
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 
101 };
102 
103 struct HitData {
105  uint64_t hit_id = 0;
107  uint64_t geometry_id = 0u;
109  float x = 0, y = 0, z = 0;
111  float t = 0.0f;
112 
114 };
115 
118  uint64_t measurement_id = 0;
120  uint64_t hit_id = 0;
121 
123 };
124 
127  uint64_t measurement_id = 0;
129  uint64_t geometry_id = 0u;
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 
139 };
140 
141 struct CellData {
143  uint64_t geometry_id = 0u;
147  uint64_t measurement_id = 0;
149  int32_t channel0 = 0, channel1 = 0;
151  float timestamp = 0;
153  float value = 0;
154 
156  timestamp, value);
157 };
158 
159 // uses hit id
162  uint64_t geometry_id = 0u;
166  uint64_t hit_id = 0;
168  int32_t channel0 = 0, channel1 = 0;
170  float timestamp = 0;
172  float value = 0;
173 
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 
208 };
209 
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 
226 };
227 
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
237  // half of the length of the bottom strip
239  // direction of the top strip
241  // direction of the bottom strip
243  // distance between the center of the two strips
245  // position of the center of the bottom strip
247 
257 };
258 
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 
275 };
276 
278  uint64_t measurement_id;
279  uint64_t geometry_id;
280  float x, y, z;
281  float var_r, var_z;
283  var_z);
284 };
285 
287  double d0;
288  double z0;
289  double phi;
290  double theta;
291  double qop;
292 
294 
300 
307 };
308 
310  std::size_t trackId;
312  double x, y, z;
313 
315 };
316 
317 } // namespace ActsExamples