Skip to content

SVertexer: fix V0 index of cascades when the V0 is cloned for other PVs - #16227

Merged
shahor02 merged 1 commit into
AliceO2Group:devfrom
matthias-kleiner:svertexer-cascade-v0copy-index
Nov 27, 2026
Merged

shahor02 merged 1 commit into
AliceO2Group:devfrom
matthias-kleiner:svertexer-cascade-v0copy-index

Conversation

@matthias-kleiner

Copy link
Copy Markdown
Contributor

Fixes two errors in the V0 index that SVertexer sets in cascades when a V0 is cloned with another primary vertex (PV) for a cascade:

  1. checkCascades: when a second cascade reuses the clone already made for its PV, the clone's index was taken from mV0sTmp.size(). mV0sTmp is only filled with createFullV0s=true, so with the default the index is 0 and the cascade points to V0 0 of the thread, a V0 with other tracks. Introduced in c07f254.
  2. checkV0: cascades that use the V0 with its own PV got nV0Ini. The clones are added before the V0 itself, so these cascades pointed to the first clone: same tracks, but another PV. This happens for any createFullV0s setting.

Effect without the fix (current dev, run 568663, 30 TFs, 807 953 cascades):

  • (1): 3019 cascades (0.37 %) get a different V0 with createFullV0s=false than with true.
  • (2): 11 215 cascades (1.4 %) point, with createFullV0s=true, to a V0 whose PV is not the cascade's PV.

Test with the fix (one MC TF, createFullV0s=false): the number of cascades is unchanged (546). The 2 cascades that pointed to a V0 at another PV now point to the right V0, and the other 544 are unchanged.

🤖 Generated with Claude Code

Fixes two errors in the V0 index that SVertexer sets in cascades when a V0
is cloned with another primary vertex for a cascade:

1. checkCascades: when a second cascade reuses the clone already made for
   its primary vertex, the clone's index was taken from mV0sTmp.size().
   mV0sTmp is only filled with createFullV0s=true, so with the default the
   index is 0 and the cascade points to V0 0 of the thread, a V0 with other
   tracks. Introduced in c07f254.
2. checkV0: cascades that use the V0 with its own primary vertex got
   nV0Ini. The clones are added before the V0 itself, so these cascades
   pointed to the first clone: same tracks, but another primary vertex.
   This happens for any createFullV0s setting.

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 27, 2026 13:25

@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/fixing!

@shahor02
shahor02 merged commit dbc276a into AliceO2Group:dev Nov 27, 2026
10 of 11 checks passed
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