Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct TimeFrame {
gsl::span<const unsigned char>::iterator& pattIt,
const itsmft::TopologyDictionary* dict,
const dataformats::MCTruthContainer<MCCompLabel>* mcLabels = nullptr);
void resetROFrameData();

int getTotalClusters() const;
auto& getTotVertIteration() { return mTotVertPerIteration; }
Expand Down Expand Up @@ -138,7 +139,7 @@ struct TimeFrame {
gsl::span<const MCCompLabel> getClusterLabels(int layerId, const int clId) const { return mClusterLabels->getLabels(mClusterExternalIndices[layerId][clId]); }
int getClusterExternalIndex(int layerId, const int clId) const { return mClusterExternalIndices[layerId][clId]; }
int getClusterSize(int clusterId) const { return mClusterSize[clusterId]; }
void setClusterSize(const bounded_vector<uint8_t>& v) { mClusterSize = v; }
void setClusterSize(bounded_vector<uint8_t>& v) { mClusterSize = std::move(v); }

auto& getTrackletsLabel(int layer) { return mTrackletLabels[layer]; }
auto& getCellsLabel(int layer) { return mCellLabels[layer]; }
Expand Down
30 changes: 18 additions & 12 deletions Detectors/ITSMFT/ITS/tracking/src/TimeFrame.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,7 @@ int TimeFrame<nLayers>::loadROFrameData(gsl::span<o2::itsmft::ROFRecord> rofs,
const itsmft::TopologyDictionary* dict,
const dataformats::MCTruthContainer<MCCompLabel>* mcLabels)
{
for (int iLayer{0}; iLayer < nLayers; ++iLayer) {
deepVectorClear(mUnsortedClusters[iLayer], mMemoryPool.get());
deepVectorClear(mTrackingFrameInfo[iLayer], mMemoryPool.get());
deepVectorClear(mClusterExternalIndices[iLayer], mMemoryPool.get());
clearResizeBoundedVector(mROFramesClusters[iLayer], 1, mMemoryPool.get(), 0);

if (iLayer < 2) {
deepVectorClear(mTrackletsIndexROF[iLayer], mMemoryPool.get());
deepVectorClear(mNTrackletsPerCluster[iLayer], mMemoryPool.get());
deepVectorClear(mNTrackletsPerClusterSum[iLayer], mMemoryPool.get());
}
}
resetROFrameData();

GeometryTGeo* geom = GeometryTGeo::Instance();
geom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L, o2::math_utils::TransformType::L2G));
Expand Down Expand Up @@ -213,6 +202,23 @@ int TimeFrame<nLayers>::loadROFrameData(gsl::span<o2::itsmft::ROFRecord> rofs,
return mNrof;
}

template <int nLayers>
void TimeFrame<nLayers>::resetROFrameData()
{
for (int iLayer{0}; iLayer < nLayers; ++iLayer) {
deepVectorClear(mUnsortedClusters[iLayer], mMemoryPool.get());
deepVectorClear(mTrackingFrameInfo[iLayer], mMemoryPool.get());
deepVectorClear(mClusterExternalIndices[iLayer], mMemoryPool.get());
clearResizeBoundedVector(mROFramesClusters[iLayer], 1, mMemoryPool.get(), 0);

if (iLayer < 2) {
deepVectorClear(mTrackletsIndexROF[iLayer], mMemoryPool.get());
deepVectorClear(mNTrackletsPerCluster[iLayer], mMemoryPool.get());
deepVectorClear(mNTrackletsPerClusterSum[iLayer], mMemoryPool.get());
}
}
}

template <int nLayers>
void TimeFrame<nLayers>::prepareClusters(const TrackingParameters& trkParam, const int maxLayers)
{
Expand Down
2 changes: 2 additions & 0 deletions Detectors/Upgrades/ITS3/reconstruction/src/IOUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ int loadROFrameDataITS3(its::TimeFrame<7>* tf,
const its3::TopologyDictionary* dict,
const dataformats::MCTruthContainer<MCCompLabel>* mcLabels)
{
tf->resetROFrameData();

auto geom = its::GeometryTGeo::Instance();
geom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L, o2::math_utils::TransformType::L2G));

Expand Down