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 @@ -80,6 +80,8 @@ struct TrackingParameters {
float TrackFollowerNSigmaCutZ = 1.f;
float TrackFollowerNSigmaCutPhi = 1.f;

bool createArtefactLabels{false};

bool PrintMemory = false; // print allocator usage in epilog report
size_t MaxMemory = std::numeric_limits<size_t>::max();
bool DropTFUponFailure = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
bool doUPCIteration = false; // Perform an additional iteration for UPC events on tagged vertices. You want to combine this config with VertexerParamConfig.nIterations=2
int nIterations = MaxIter; // overwrite the number of iterations

bool createArtefactLabels{false}; // create on-the-fly labels for the artefacts

int nThreads = 1;
bool printMemory = false;
size_t maxMemory = std::numeric_limits<size_t>::max();
Expand Down
2 changes: 2 additions & 0 deletions Detectors/ITSMFT/ITS/tracking/src/Configuration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ std::vector<TrackingParameters> TrackingMode::getTrackingParameters(TrackingMode
p.MinPt[lslot] *= bFactor;
}

p.createArtefactLabels = tc.createArtefactLabels;

p.PrintMemory = tc.printMemory;
p.MaxMemory = tc.maxMemory;
p.DropTFUponFailure = tc.dropTFUponFailure;
Expand Down
11 changes: 8 additions & 3 deletions Detectors/ITSMFT/ITS/tracking/src/TimeFrame.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ void TimeFrame<nLayers>::wipe()
deepVectorClear(mROFramesPV);
deepVectorClear(mPrimaryVertices);
deepVectorClear(mRoads);
deepVectorClear(mRoadLabels);
deepVectorClear(mMSangles);
deepVectorClear(mPhiCuts);
deepVectorClear(mPositionResolution);
Expand All @@ -676,9 +675,15 @@ void TimeFrame<nLayers>::wipe()
deepVectorClear(mTrackletsIndexROF);
deepVectorClear(mPrimaryVertices);
deepVectorClear(mTrackletClusters);
deepVectorClear(mVerticesContributorLabels);
deepVectorClear(mLines);
deepVectorClear(mLinesLabels);
if (hasMCinformation()) {
deepVectorClear(mLinesLabels);
deepVectorClear(mVerticesContributorLabels);
deepVectorClear(mTrackletLabels);
deepVectorClear(mCellLabels);
deepVectorClear(mRoadLabels);
deepVectorClear(mTracksLabel);
}
}

template class TimeFrame<7>;
Expand Down
25 changes: 15 additions & 10 deletions Detectors/ITSMFT/ITS/tracking/src/TrackerTraits.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void TrackerTraits<nLayers>::computeLayerTracklets(const int iteration, int iROF
});

/// Create tracklets labels
if (mTimeFrame->hasMCinformation()) {
if (mTimeFrame->hasMCinformation() && mTrkParams[iteration].createArtefactLabels) {
tbb::parallel_for(
tbb::blocked_range<int>(0, mTrkParams[iteration].TrackletsPerRoad()),
[&](const tbb::blocked_range<int>& Layers) {
Expand Down Expand Up @@ -313,7 +313,7 @@ void TrackerTraits<nLayers>::computeLayerCells(const int iteration)
if (iLayer > 0) {
deepVectorClear(mTimeFrame->getCellsLookupTable()[iLayer - 1]);
}
if (mTimeFrame->hasMCinformation()) {
if (mTimeFrame->hasMCinformation() && mTrkParams[iteration].createArtefactLabels) {
deepVectorClear(mTimeFrame->getCellsLabel(iLayer));
}
}
Expand Down Expand Up @@ -458,14 +458,19 @@ void TrackerTraits<nLayers>::computeLayerCells(const int iteration)
});

/// Create cells labels
if (mTimeFrame->hasMCinformation()) {
for (int iLayer{0}; iLayer < mTrkParams[iteration].CellsPerRoad(); ++iLayer) {
for (const auto& cell : mTimeFrame->getCells()[iLayer]) {
MCCompLabel currentLab{mTimeFrame->getTrackletsLabel(iLayer)[cell.getFirstTrackletIndex()]};
MCCompLabel nextLab{mTimeFrame->getTrackletsLabel(iLayer + 1)[cell.getSecondTrackletIndex()]};
mTimeFrame->getCellsLabel(iLayer).emplace_back(currentLab == nextLab ? currentLab : MCCompLabel());
}
}
if (mTimeFrame->hasMCinformation() && mTrkParams[iteration].createArtefactLabels) {
tbb::parallel_for(
tbb::blocked_range<int>(0, mTrkParams[iteration].CellsPerRoad()),
[&](const tbb::blocked_range<int>& Layers) {
for (int iLayer = Layers.begin(); iLayer < Layers.end(); ++iLayer) {
mTimeFrame->getCellsLabel(iLayer).reserve(mTimeFrame->getCells()[iLayer].size());
for (const auto& cell : mTimeFrame->getCells()[iLayer]) {
MCCompLabel currentLab{mTimeFrame->getTrackletsLabel(iLayer)[cell.getFirstTrackletIndex()]};
MCCompLabel nextLab{mTimeFrame->getTrackletsLabel(iLayer + 1)[cell.getSecondTrackletIndex()]};
mTimeFrame->getCellsLabel(iLayer).emplace_back(currentLab == nextLab ? currentLab : MCCompLabel());
}
}
});
}
}

Expand Down