Skip to content

Data model fix: avoid classifying TPC loopers as physical primary#15609

Draft
ddobrigk wants to merge 5 commits into
AliceO2Group:devfrom
ddobrigk:physicalprimaryfix
Draft

Data model fix: avoid classifying TPC loopers as physical primary#15609
ddobrigk wants to merge 5 commits into
AliceO2Group:devfrom
ddobrigk:physicalprimaryfix

Conversation

@ddobrigk

@ddobrigk ddobrigk commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This PR re-defines mcparticle::IsPhysicalPrimary to embed a safety feature in which particles that are (a) created beyond 5 cm from the beam axis and (b) marked as physical primary will be forcibly re-classified as FromBackgroundEvent. The new definition is provided in a separate namespace called mcparticle_v2, given that mcparticle::IsPhysicalPrimary is used multiple times in derived data.

Further, this PR adds a layer of abstraction to mcparticle::Flags by declaring two new columns: one standard mcparticle_v2::Flags (getter: storedFlags()) and a dynamic mcparticle_v2::McParticleFlags (getter: flags()), with the idea being that Flags are the ones read in, but the use of the flags getter is captured by the dynamic column, which explicitly includes a protection against the physical primary misclassification. This will mean any derived data creation task that directly asks for flags() will get a preprocessed uint8_t that embeds the correction, meaning a simple re-creation of derived data without any further derived data model change - i.e. even retaining the old mcparticle::IsPhysicalPrimary in the derived tables - should be enough to embed the fix.

Note that this PR is only a draft for now: I'll still test it thoroughly, but wanted to share it here already for discussion. Tagging @jackal1-66, but also @aalkin (with whom I discussed this briefly today, thanks again!) as well as @alcaliva @catalinristea @dsekihat: please also let me know if you have any comments or suggestions. Thank you!

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