@@ -71,11 +71,12 @@ class TimeFrameMixin : public Base
7171 void deriveAndInitTiming (const std::array<gsl::span<const o2::trkft3::ROFRecord>, nLayers>& layerROFs);
7272
7373 const o2::InteractionRecord& getTFAnchorIR () const noexcept { return mTFAnchorIR ; }
74+ const auto & getClusterSensorIDs () const noexcept { return mClusterSensorIDs ; }
7475
7576 protected:
7677 void initTimingTables (const std::array<o2::its::LayerTiming, nLayers>& timings);
7778 void updateHostROFVertexLookupTable ();
78-
79+ std::array<std::vector< int >, nLayers> mClusterSensorIDs ;
7980 bool mTimingTablesInitialised {false };
8081 o2::InteractionRecord mTFAnchorIR {0 , 0 };
8182};
@@ -205,6 +206,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
205206 this ->mUnsortedClusters [iLayer].clear ();
206207 this ->mTrackingFrameInfo [iLayer].clear ();
207208 this ->mClusterExternalIndices [iLayer].clear ();
209+ mClusterSensorIDs [iLayer].clear ();
208210 this ->mClusterSize [iLayer].clear ();
209211 }
210212
@@ -228,6 +230,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
228230 this ->mUnsortedClusters [iLayer].reserve (clusterCountPerLayer[iLayer]);
229231 this ->mTrackingFrameInfo [iLayer].reserve (clusterCountPerLayer[iLayer]);
230232 this ->mClusterExternalIndices [iLayer].reserve (clusterCountPerLayer[iLayer]);
233+ mClusterSensorIDs [iLayer].reserve (clusterCountPerLayer[iLayer]);
231234 this ->mClusterSize [iLayer].reserve (clusterCountPerLayer[iLayer]);
232235 }
233236
@@ -294,6 +297,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
294297 std::array<float , 2 >{trkXYZ.y (), trkXYZ.z ()},
295298 std::array<float , 3 >{resolution[layer] * resolution[layer], 0 ., resolution[layer] * resolution[layer]});
296299 this ->addClusterToLayer (layer, gloXYZ.x (), gloXYZ.y (), gloXYZ.z (), this ->mUnsortedClusters [layer].size ());
300+ mClusterSensorIDs [layer].push_back (hit.GetDetectorID ());
297301 const int layerHitCounter = hitCounterPerLayer[layer]++;
298302 this ->addClusterExternalIndexToLayer (layer, layerHitCounter);
299303 this ->mClusterSize [layer].push_back (1 );
@@ -344,10 +348,12 @@ int TimeFrameMixin<nLayers, Base>::loadROFrameData(const std::array<gsl::span<co
344348 this ->mUnsortedClusters [iLayer].clear ();
345349 this ->mTrackingFrameInfo [iLayer].clear ();
346350 this ->mClusterExternalIndices [iLayer].clear ();
351+ mClusterSensorIDs [iLayer].clear ();
347352 this ->mClusterSize [iLayer].clear ();
348353 this ->mUnsortedClusters [iLayer].reserve (layerClusters[iLayer].size ());
349354 this ->mTrackingFrameInfo [iLayer].reserve (layerClusters[iLayer].size ());
350355 this ->mClusterExternalIndices [iLayer].reserve (layerClusters[iLayer].size ());
356+ mClusterSensorIDs [iLayer].reserve (layerClusters[iLayer].size ());
351357 this ->mClusterSize [iLayer].reserve (layerClusters[iLayer].size ());
352358 }
353359
@@ -436,6 +442,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFrameData(const std::array<gsl::span<co
436442 std::array<float , 2 >{trkXYZ.y (), trkXYZ.z ()},
437443 std::array<float , 3 >{sigmaY2, 0 .f , sigmaZ2});
438444 this ->addClusterToLayer (iLayer, gloXYZ.x (), gloXYZ.y (), gloXYZ.z (), this ->mUnsortedClusters [iLayer].size ());
445+ mClusterSensorIDs [iLayer].push_back (c.chipID );
439446 this ->addClusterExternalIndexToLayer (iLayer, clusterId);
440447 this ->mClusterSize [iLayer].push_back (std::clamp (static_cast <unsigned int >(c.size ), 0u , 255u ));
441448 }
0 commit comments