Analysis Software
Documentation for sPHENIX simulation software
 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 
13 
14 #include <vector>
15 
17 
30 {
31  public:
34  {
35  // only one event structure per event (!)
36  m_events.reserve(1);
37  }
38 
40  void Reset() override;
41 
43 
45  {
46  public:
47  using List = std::vector<EventStruct>;
48  static constexpr size_t max_layer = 57;
49 
50  // constructor
52  {
53  for (size_t i = 0; i < max_layer; ++i)
54  {
55  nclusters[i] = 0;
56  }
57  }
58 
61 
63  int nclusters_mvtx = 0;
64 
66  int nclusters_intt = 0;
67 
69  int nclusters_tpc = 0;
70 
73  };
74 
76 
78  {
79  public:
80  using List = std::vector<ClusterStruct>;
81 
83  unsigned int layer = 0;
84 
86  unsigned int size = 0;
87 
89  unsigned int truth_size = 0;
90 
92  int phi_size = 0;
93  int z_size = 0;
94 
96  unsigned int adc = 0;
97  unsigned int max_adc = 0;
99  int ovlp = 0;
100  int edge = 0;
101 
103 
104  float x = 0;
105  float y = 0;
106  float z = 0;
107  float r = 0;
108  float phi = 0;
109  float phi_error = 0;
110  float z_error = 0;
111  float para_phi_error = 0;
112  float para_z_error = 0;
114 
116 
117  float trk_x = 0;
118  float trk_y = 0;
119  float trk_z = 0;
120  float trk_r = 0;
121  float trk_phi = 0;
122 
124  float trk_phi_error = 0;
125  float trk_z_error = 0;
126 
128  float trk_alpha = 0;
129 
131  float trk_beta = 0;
132 
134  float trk_radius = 0;
135 
137 
139 
140  float truth_x = 0;
141  float truth_y = 0;
142  float truth_z = 0;
143  float truth_r = 0;
144  float truth_phi = 0;
145 
147  float truth_alpha = 0;
148 
150  float truth_beta = 0;
152 
154 
155 
156  //* maximum charge on strip
157  float energy_max = 0;
158 
159  //* sum of strip charges
160  float energy_sum = 0;
161 
163 
166 
167  float trk_px = 0;
168  float trk_py = 0;
169  float trk_pz = 0;
171 
174 
175  float truth_px = 0;
176  float truth_py = 0;
177  float truth_pz = 0;
179  };
180 
182 
184  {
185  public:
186  // constructor
187  explicit TrackStruct()
188  {
189  // allocate enough size for the clusters
190  static constexpr int max_layers = 60;
191  clusters.reserve(max_layers);
192  }
193 
194  using List = std::vector<TrackStruct>;
195 
196  int charge = 0;
197  int nclusters = 0;
198  int64_t mask = 0;
199 
200  int nclusters_mvtx = 0;
201  int nclusters_intt = 0;
202  int nclusters_tpc = 0;
204 
205  float chisquare = 0;
206  int ndf = 0;
207 
209 
210  float x = 0;
211  float y = 0;
212  float z = 0;
213  float r = 0;
214  float phi = 0;
216 
218 
219  float px = 0;
220  float py = 0;
221  float pz = 0;
222  float pt = 0;
223  float p = 0;
224  float eta = 0;
226 
228 
229  int pid = 0;
230  int embed = 0;
231  bool is_primary = false;
232  int gtrackID = 0;
233  float truth_t = 0;
234 
235  // number of g4hits from this MC track that match
236  int contributors = 0;
237 
238  float truth_px = 0;
239  float truth_py = 0;
240  float truth_pz = 0;
241  float truth_pt = 0;
242  float truth_p = 0;
243  float truth_eta = 0;
245 
246  // associate clusters
248  };
249 
251 
252 
253  const EventStruct::List& events() const
254  {
255  return m_events;
256  }
257 
259  {
260  return m_clusters;
261  }
262 
263  const TrackStruct::List& tracks() const
264  {
265  return m_tracks;
266  }
267 
269 
271 
272 
274  {
275  m_events.push_back(event);
276  }
277 
278  void addCluster(const ClusterStruct& cluster)
279  {
280  m_clusters.push_back(cluster);
281  }
282 
283  void addTrack(const TrackStruct& track)
284  {
285  m_tracks.push_back(track);
286  }
287 
288  void clearEvents()
289  {
290  m_events.clear();
291  }
292 
294  {
295  m_clusters.clear();
296  }
297 
298  void clearTracks()
299  {
300  m_tracks.clear();
301  }
302 
304 
305  private:
307  /* there is only one element per event in this array */
309 
312 
315 
316  ClassDefOverride(TrackEvaluationContainerv1, 1)
317 };
318 
319 #endif