Skip to content

Commit 6d80ff9

Browse files
committed
ITS: vertexer readability
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 539ab38 commit 6d80ff9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Detectors/ITSMFT/ITS/tracking/src/VertexerTraits.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ void VertexerTraits<NLayers>::computeVertices(const int iteration)
328328
const auto& lines = mTimeFrame->getLines(rofId);
329329
auto& clusters = mTimeFrame->getTrackletClusters(rofId);
330330
const int numTracklets{static_cast<int>(lines.size())};
331-
bounded_vector<bool> usedTracklets(numTracklets, false, mMemoryPool.get());
331+
bounded_vector<uint8_t> usedTracklets(numTracklets, 0, mMemoryPool.get());
332332

333333
for (int iLine1{0}; iLine1 < numTracklets; ++iLine1) {
334334
if (usedTracklets[iLine1]) {
@@ -345,26 +345,26 @@ void VertexerTraits<NLayers>::computeVertices(const int iteration)
345345
}
346346
auto dca2{Line::getDCA2(line1, line2)};
347347
if (dca2 < pairCut2) {
348-
clusters.emplace_back(iLine1, line1, iLine2, line2);
349-
if (!clusters.back().isValid() || clusters.back().getR2() > 4.f) {
348+
auto& cluster = clusters.emplace_back(iLine1, line1, iLine2, line2);
349+
if (!cluster.isValid() || cluster.getR2() > 4.f) {
350350
clusters.pop_back();
351351
continue;
352352
}
353353

354-
usedTracklets[iLine1] = true;
355-
usedTracklets[iLine2] = true;
354+
usedTracklets[iLine1] = 1;
355+
usedTracklets[iLine2] = 1;
356356
for (int iLine3{0}; iLine3 < numTracklets; ++iLine3) {
357357
if (usedTracklets[iLine3]) {
358358
continue;
359359
}
360360
const auto& line3 = lines[iLine3];
361-
if (!line3.mTime.isCompatible(clusters.back().getTimeStamp())) {
361+
if (!line3.mTime.isCompatible(cluster.getTimeStamp())) {
362362
continue;
363363
}
364-
const auto distance2 = Line::getDistance2FromPoint(line3, clusters.back().getVertex());
364+
const auto distance2 = Line::getDistance2FromPoint(line3, cluster.getVertex());
365365
if (distance2 < pairCut2) {
366-
clusters.back().add(iLine3, line3);
367-
usedTracklets[iLine3] = true;
366+
cluster.add(iLine3, line3);
367+
usedTracklets[iLine3] = 1;
368368
}
369369
}
370370
break;

0 commit comments

Comments
 (0)