Skip to content
Merged
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
16 changes: 5 additions & 11 deletions Detectors/ITSMFT/ITS/tracking/src/TrackerTraits.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -596,20 +596,14 @@ void TrackerTraits<nLayers>::findCellsNeighbours(const int iteration)
mTimeFrame->getCellsNeighbours()[iLayer].reserve(cellsNeighbours.size());
std::ranges::transform(cellsNeighbours, std::back_inserter(mTimeFrame->getCellsNeighbours()[iLayer]), [](const auto& neigh) { return neigh.cell; });

auto it = cellsNeighbours.begin();
int current = it->nextCell;
int maxLvl = it->level;
++it;
for (; it != cellsNeighbours.end(); ++it) {
if (it->nextCell == current) {
for (auto it = cellsNeighbours.begin(); it != cellsNeighbours.end();) {
int cellIdx = it->nextCell;
int maxLvl = it->level;
while (++it != cellsNeighbours.end() && it->nextCell == cellIdx) {
maxLvl = std::max(maxLvl, it->level);
} else {
mTimeFrame->getCells()[iLayer + 1][current].setLevel(maxLvl);
current = it->nextCell;
maxLvl = it->level;
}
o2::gpu::CAMath::AtomicMax(mTimeFrame->getCells()[iLayer + 1][cellIdx].getLevelPtr(), maxLvl);
}
mTimeFrame->getCells()[iLayer + 1][current].setLevel(maxLvl);
}
});
}
Expand Down