Skip to content

Commit a2f1d7e

Browse files
MatchCosmics: include the last compatible vertex in the DCA veto
vtIDMax is the id of the last compatible vertex (inclusive), but the veto loop stopped before it: a seed associated to a single vertex (vtIDMin == vtIDMax) was never checked, so with --use-pv-info the DCA cut never removed collision tracks associated to one vertex. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9c88580 commit a2f1d7e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Detectors/GlobalTracking/src/MatchCosmics.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ void MatchCosmics::process(const o2::globaltracking::RecoContainer& data)
6868
trc.matchID = Reject; // reject track
6969
continue;
7070
}
71-
if (mMatchParams->dcaCutChi2[trc.origID.getSource()] > 0.f && mUsePVInfo && (std::abs(trc.getY()) < mMatchParams->fiducialRIP && std::abs(trc.getZ()) < mMatchParams->fiducialZIP)) {
71+
if (mMatchParams->dcaCutChi2[trc.origID.getSource()] > 0.f && mUsePVInfo && trc.vtIDMin >= 0 && (std::abs(trc.getY()) < mMatchParams->fiducialRIP && std::abs(trc.getZ()) < mMatchParams->fiducialZIP)) {
7272
// do the propagation only if we are in the fiducial IP range.
73-
for (int iv = trc.vtIDMin; iv < trc.vtIDMax; iv++) {
73+
for (int iv = trc.vtIDMin; iv <= trc.vtIDMax; iv++) { // vtIDMax is the last compatible vertex (inclusive); vtIDMin < 0: no compatible vertex
7474
const auto& pv = data.getPrimaryVertex(iv);
7575
o2::track::TrackParCov trcatPV(trc);
7676
o2::dataformats::DCA dca;

0 commit comments

Comments
 (0)