File indexing completed on 2025-08-05 08:18:01
0001
0002
0003
0004 #ifndef G4EVAL_TRACKEVALUATIONCONTAINERV1_H
0005 #define G4EVAL_TRACKEVALUATIONCONTAINERV1_H
0006
0007
0008
0009
0010
0011
0012 #include "TrackEvaluationContainer.h"
0013
0014 #include <vector>
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 class TrackEvaluationContainerv1 : public TrackEvaluationContainer
0030 {
0031 public:
0032
0033 explicit TrackEvaluationContainerv1()
0034 {
0035
0036 m_events.reserve(1);
0037 }
0038
0039
0040 void Reset() override;
0041
0042
0043
0044 class EventStruct
0045 {
0046 public:
0047 using List = std::vector<EventStruct>;
0048 static constexpr size_t max_layer = 57;
0049
0050
0051 EventStruct()
0052 {
0053 for (size_t i = 0; i < max_layer; ++i)
0054 {
0055 nclusters[i] = 0;
0056 }
0057 }
0058
0059
0060 int nclusters[max_layer];
0061
0062
0063 int nclusters_mvtx = 0;
0064
0065
0066 int nclusters_intt = 0;
0067
0068
0069 int nclusters_tpc = 0;
0070
0071
0072 int nclusters_micromegas = 0;
0073 };
0074
0075
0076
0077 class ClusterStruct
0078 {
0079 public:
0080 using List = std::vector<ClusterStruct>;
0081
0082
0083 unsigned int layer = 0;
0084
0085
0086 unsigned int size = 0;
0087
0088
0089 unsigned int truth_size = 0;
0090
0091
0092 int phi_size = 0;
0093 int z_size = 0;
0094
0095
0096 unsigned int adc = 0;
0097 unsigned int max_adc = 0;
0098
0099 int ovlp = 0;
0100 int edge = 0;
0101
0102
0103
0104 float x = 0;
0105 float y = 0;
0106 float z = 0;
0107 float r = 0;
0108 float phi = 0;
0109 float phi_error = 0;
0110 float z_error = 0;
0111 float para_phi_error = 0;
0112 float para_z_error = 0;
0113
0114
0115
0116
0117 float trk_x = 0;
0118 float trk_y = 0;
0119 float trk_z = 0;
0120 float trk_r = 0;
0121 float trk_phi = 0;
0122
0123
0124 float trk_phi_error = 0;
0125 float trk_z_error = 0;
0126
0127
0128 float trk_alpha = 0;
0129
0130
0131 float trk_beta = 0;
0132
0133
0134 float trk_radius = 0;
0135
0136
0137
0138
0139
0140 float truth_x = 0;
0141 float truth_y = 0;
0142 float truth_z = 0;
0143 float truth_r = 0;
0144 float truth_phi = 0;
0145
0146
0147 float truth_alpha = 0;
0148
0149
0150 float truth_beta = 0;
0151
0152
0153
0154
0155
0156
0157 float energy_max = 0;
0158
0159
0160 float energy_sum = 0;
0161
0162
0163
0164
0165
0166
0167 float trk_px = 0;
0168 float trk_py = 0;
0169 float trk_pz = 0;
0170
0171
0172
0173
0174
0175 float truth_px = 0;
0176 float truth_py = 0;
0177 float truth_pz = 0;
0178
0179 };
0180
0181
0182
0183 class TrackStruct
0184 {
0185 public:
0186
0187 explicit TrackStruct()
0188 {
0189
0190 static constexpr int max_layers = 60;
0191 clusters.reserve(max_layers);
0192 }
0193
0194 using List = std::vector<TrackStruct>;
0195
0196 int charge = 0;
0197 int nclusters = 0;
0198 int64_t mask = 0;
0199
0200 int nclusters_mvtx = 0;
0201 int nclusters_intt = 0;
0202 int nclusters_tpc = 0;
0203 int nclusters_micromegas = 0;
0204
0205 float chisquare = 0;
0206 int ndf = 0;
0207
0208
0209
0210 float x = 0;
0211 float y = 0;
0212 float z = 0;
0213 float r = 0;
0214 float phi = 0;
0215
0216
0217
0218
0219 float px = 0;
0220 float py = 0;
0221 float pz = 0;
0222 float pt = 0;
0223 float p = 0;
0224 float eta = 0;
0225
0226
0227
0228
0229 int pid = 0;
0230 int embed = 0;
0231 bool is_primary = false;
0232 int gtrackID = 0;
0233 float truth_t = 0;
0234
0235
0236 int contributors = 0;
0237
0238 float truth_px = 0;
0239 float truth_py = 0;
0240 float truth_pz = 0;
0241 float truth_pt = 0;
0242 float truth_p = 0;
0243 float truth_eta = 0;
0244
0245
0246
0247 ClusterStruct::List clusters;
0248 };
0249
0250
0251
0252
0253 const EventStruct::List& events() const
0254 {
0255 return m_events;
0256 }
0257
0258 const ClusterStruct::List& clusters() const
0259 {
0260 return m_clusters;
0261 }
0262
0263 const TrackStruct::List& tracks() const
0264 {
0265 return m_tracks;
0266 }
0267
0268
0269
0270
0271
0272
0273 void addEvent(const EventStruct& event)
0274 {
0275 m_events.push_back(event);
0276 }
0277
0278 void addCluster(const ClusterStruct& cluster)
0279 {
0280 m_clusters.push_back(cluster);
0281 }
0282
0283 void addTrack(const TrackStruct& track)
0284 {
0285 m_tracks.push_back(track);
0286 }
0287
0288 void clearEvents()
0289 {
0290 m_events.clear();
0291 }
0292
0293 void clearClusters()
0294 {
0295 m_clusters.clear();
0296 }
0297
0298 void clearTracks()
0299 {
0300 m_tracks.clear();
0301 }
0302
0303
0304
0305 private:
0306
0307
0308 EventStruct::List m_events;
0309
0310
0311 ClusterStruct::List m_clusters;
0312
0313
0314 TrackStruct::List m_tracks;
0315
0316 ClassDefOverride(TrackEvaluationContainerv1, 1)
0317 };
0318
0319 #endif