Skip to content

Commit 95c71f6

Browse files
f3schbazinski
authored andcommitted
ITS: fix truth seeding for events which are not in acceptance (AliceO2Group#14782)
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent ba0be8f commit 95c71f6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,12 @@ void VertexerTraits<nLayers>::addTruthSeedingVertices()
530530
}
531531
Vertex vert;
532532
vert.setTimeStamp(rofId);
533-
vert.setNContributors(std::ranges::count_if(mcReader.getTracks(iSrc, iEve), [](const auto& trk) {
534-
return trk.isPrimary() && trk.GetPt() > 0.2 && std::abs(trk.GetEta()) < 1.3;
535-
}));
533+
// set minimum to 1 sometimes for diffractive events there is nothing acceptance
534+
vert.setNContributors(std::max(1L, std::ranges::count_if(mcReader.getTracks(iSrc, iEve), [](const auto& trk) {
535+
return trk.isPrimary() && trk.GetPt() > 0.05 && std::abs(trk.GetEta()) < 1.1;
536+
})));
536537
vert.setXYZ((float)eve.GetX(), (float)eve.GetY(), (float)eve.GetZ());
537-
vert.setChi2(1);
538+
vert.setChi2(1); // not used as constraint
538539
constexpr float cov = 50e-9;
539540
vert.setCov(cov, cov, cov, cov, cov, cov);
540541
vertices[rofId].vertices.push_back(vert);

0 commit comments

Comments
 (0)