Data model fix: avoid classifying TPC loopers as physical primary#15609
Draft
ddobrigk wants to merge 5 commits into
Draft
Data model fix: avoid classifying TPC loopers as physical primary#15609ddobrigk wants to merge 5 commits into
ddobrigk wants to merge 5 commits into
Conversation
Please consider the following formatting changes to AliceO2Group#15609
alcaliva
approved these changes
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR re-defines
mcparticle::IsPhysicalPrimaryto 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 asFromBackgroundEvent. The new definition is provided in a separate namespace calledmcparticle_v2, given thatmcparticle::IsPhysicalPrimaryis used multiple times in derived data.Further, this PR adds a layer of abstraction to
mcparticle::Flagsby declaring two new columns: one standardmcparticle_v2::Flags(getter:storedFlags()) and a dynamicmcparticle_v2::McParticleFlags(getter:flags()), with the idea being thatFlagsare the ones read in, but the use of theflagsgetter 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 forflags()will get a preprocesseduint8_tthat embeds the correction, meaning a simple re-creation of derived data without any further derived data model change - i.e. even retaining the oldmcparticle::IsPhysicalPrimaryin 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!