From 09e236e44620b64e583c109ee64e5336c4201334 Mon Sep 17 00:00:00 2001 From: Matthias Kleiner Date: Sat, 3 Oct 2026 21:35:10 +0200 Subject: [PATCH] MatchCosmics: propagate the seed covariance to the DCA MatchCosmics::process propagates every seed to the DCA to the origin with propagateToDCABxByBz(Point3D, ...). With a Point3D this resolves to the TrackPar_t overload: only the track parameters are propagated, the covariance stays the one at the track's reference X (TPC inner radius). checkPair then compares the two legs at the DCA with these too small errors, so the y/snp cuts and the chi2 are far too tight and genuine legs are rejected (RejY). Using a VertexBase (origin, zero covariance) selects the TrackParCov overload; the propagation itself is unchanged. Tests, same input with and without the fix, TPC-only legs: - COSMICS run 562658 (0.5 T, no TPC distortion correction), 2000 TFs: cosmics with legs in opposite halves 221 -> 402 (total 253 -> 456). Example of a rejected pair (matcher debug tree): dy = 0.79 cm with sigma2_y = 0.0013 cm2 used (= the value at x = 83 cm), while the covariance propagated to the DCA gives sigma2_y = 0.021 cm2, i.e. a 7 sigma window of 1.6 cm instead of < 0.8 cm. - Cosmic MC (O2DPG, GenCosmics, 0.5 T, no distortions, 5 TFs, MC labels): practically unchanged, 159 -> 165 cosmics; efficiency for muons with a TPC leg in each half 79.5 % -> 82.1 %; no wrong leg pairs (legs from different muons) in either case. The gain in data comes from the uncorrected static distortions shifting the legs beyond the too narrow window; without distortions (MC) the legs agree well enough to pass also with the unpropagated covariance. Co-Authored-By: Claude Opus 5.5 --- Detectors/GlobalTracking/src/MatchCosmics.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Detectors/GlobalTracking/src/MatchCosmics.cxx b/Detectors/GlobalTracking/src/MatchCosmics.cxx index d3dacf86a128a..ca6bb50e3e9a8 100644 --- a/Detectors/GlobalTracking/src/MatchCosmics.cxx +++ b/Detectors/GlobalTracking/src/MatchCosmics.cxx @@ -57,8 +57,10 @@ void MatchCosmics::process(const o2::globaltracking::RecoContainer& data) createSeeds(data); int ntr = mSeeds.size(); const auto prop = o2::base::Propagator::Instance(); - // propagate to DCA to origin - const o2::math_utils::Point3D v{0., 0., 0}; + // propagate to DCA to origin. A VertexBase (origin, zero covariance) selects the TrackParCov overload of propagateToDCABxByBz: + // with a Point3D the TrackPar_t overload is used and only the parameters are propagated, the covariance stays the one at the + // track's reference X (TPC inner radius), which makes the y/snp cuts and the chi2 of checkPair far too tight. + const o2::dataformats::VertexBase v; for (int i = 0; i < ntr; i++) { auto& trc = mSeeds[i]; if (trc.matchID != Reject) {