Skip to content

SVertexer: fix V0 causality check for prongs without ITS - #16196

Open
matthias-kleiner wants to merge 3 commits into
AliceO2Group:devfrom
matthias-kleiner:svertexer-causality-tpc-noits
Open

matthias-kleiner wants to merge 3 commits into
AliceO2Group:devfrom
matthias-kleiner:svertexer-causality-tpc-noits

Conversation

@matthias-kleiner

Copy link
Copy Markdown
Contributor

For global tracks with a TPC part but no ITS part (TPC-TOF, TPC-TRD, TPC-TRD-TOF) the radius used in the V0 causality check was the radius of the track parameters, i.e. the TPC inner reference (~83 cm). A V0 decaying inside the TPC with such a prong was therefore always rejected, since its radius exceeded this "innermost point" by more than causalityRTolerance.

The upper side of the check (V0 radius must not exceed the prong's innermost measured point) now uses the radius of the innermost TPC cluster of these tracks, as already done for TPC-only tracks (correctTPCTrack, now through getTPCInnermostR). The lower side (maxV0ToProngsRDiff) is unchanged: with the innermost cluster it would reject V0s whose TPC track misses its inner part. The TPC cluster references are also set up when TPC-only tracks are excluded (mExcludeTPCtracks), so that the check works in that configuration too.

Pb-Pb MC TF (anchored, production settings): identical V0s except one additional true K0s at r = 110 cm, also with mExcludeTPCtracks=true. K0s gun MC, K0s decaying at 85-200 cm with both prongs reconstructed: found 2 -> 18 of 42 (with maxRIni=250 and maxDCAXYToMeanVertex=2 for this test).

For global tracks with a TPC part but no ITS part (TPC-TOF, TPC-TRD,
TPC-TRD-TOF) the radius used in the V0 causality check was the radius of the
track parameters, i.e. the TPC inner reference (~83 cm). A V0 decaying inside
the TPC with such a prong was therefore always rejected, since its radius
exceeded this "innermost point" by more than causalityRTolerance.

The upper side of the check (V0 radius must not exceed the prong's innermost
measured point) now uses the radius of the innermost TPC cluster of these
tracks, as already done for TPC-only tracks (correctTPCTrack, now through
getTPCInnermostR). The lower side (maxV0ToProngsRDiff) is unchanged: with the
innermost cluster it would reject V0s whose TPC track misses its inner part.
The TPC cluster references are also set up when TPC-only tracks are excluded
(mExcludeTPCtracks), so that the check works in that configuration too.

Pb-Pb MC TF (anchored, production settings): identical V0s except one
additional true K0s at r = 110 cm, also with mExcludeTPCtracks=true. K0s gun
MC, K0s decaying at 85-200 cm with both prongs reconstructed: found 2 -> 18
of 42 (with maxRIni=250 and maxDCAXYToMeanVertex=2 for this test).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthias-kleiner
matthias-kleiner requested a review from a team as a code owner November 25, 2026 16:26

@shahor02 shahor02 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting, @matthias-kleiner !
See some questions below

bool hasTPC = false;
int8_t nITSclu = -1;
bool compatibleProton = false; // dE/dx compatibility with proton hypothesis (FIXME: use better, uint8_t compat mask?)
float innermostR = -1.f; // radius of the innermost measured point if it differs from minR (tracks with TPC but without ITS), < 0: minR

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move it after minR to save a few bytes of padding. Also, better to rename to more explicit e.g. rInnerUpdate

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I just changed it

Comment thread Detectors/Vertexing/src/SVertexer.cxx Outdated
Comment on lines +662 to +664
// upper side of the causality check: the V0 must not lie beyond the innermost measured point of a prong. The lower side
// (maxV0ToProngsRDiff) stays with minR, the TPC inner reference for tracks with TPC but without ITS: with the innermost cluster
// it would reject V0s whose TPC track misses its inner part.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this logic, but why should it apply only to TPC tracks matched to TRD/TOF? I would do the same for standalone TPC.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For standalone TPC tracks this is already the case: correctTPCTrack, which every standalone TPC track goes through (processTPCTrack for the unconstrained ones, buildT2V for the CE-crossing ones), sets minR to the radius of the innermost cluster: L1381, trc.minR = getTPCInnermostR(tTPC, tTB); (before the PR the same code was inline at the end of correctTPCTrack). So the upper side of the check was already correct for them. Only TPC tracks matched to TRD/TOF have minR at the TPC inner reference radius and only those got the wrong upper limit.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to the lower limit: TPC-only tracks have their minR modified to the innermost update R and rInnerUpdate is never set. So the minR = R_IU is used both for upper and lower limits check, while for TPC-TRD/TOF tracks one uses separate rInnerUpdate and minR for that purpose.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I changed it so that it's consistent: TPC-only tracks now also use R_IU for the upper and the TPC inner reference for the lower limit. On 12 Pb-Pb MC TFs this gives +6.6 % true photons (fake fraction 32 → 36 % for V0s with a leg without ITS), K0s/Λ unchanged, same CPU.

// depends on it). Needs the TPC clusters, i.e. TPC among the vertexing sources.
const auto& tpcTrack = recoData.getTPCTrack(tpcGID);
mTracksPool[posneg].back().innermostR = getTPCInnermostR(tpcTrack, tpcTrack.getTime0());
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not all TPC tracks w/o ITS? See below.

matthias-kleiner and others added 2 commits November 25, 2026 20:09
Review: more explicit name; next to minR the struct has less padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… check

Review: for all tracks with TPC but without ITS the upper side of the
check uses the innermost cluster (rInnerUpdate) and the lower side
(maxV0ToProngsRDiff) the TPC inner reference (minR). TPC-only tracks so
far had minR = innermost cluster for both sides, i.e. a tighter lower
side for tracks missing their inner part.

12 LHC26h3 Pb-Pb MC TFs (CCDB settings), V0s with a leg without ITS:
+182 true photons (+6.6 %), K0s / Lambda unchanged, +394 fakes (fake
fraction 32 -> 36 %); all V0s +2.2 %, same CPU. With the photon tuning
off: +42 photons, +2 K0s / Lambda, +736 fakes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@shahor02 shahor02 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants