Skip to content

AOD: don't emit MC collisions borrowed from the previous timeframe#15509

Open
sawenzel wants to merge 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/mc-coll-tf-ownership
Open

AOD: don't emit MC collisions borrowed from the previous timeframe#15509
sawenzel wants to merge 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/mc-coll-tf-ownership

Conversation

@sawenzel

Copy link
Copy Markdown
Collaborator

With --orbitsEarly (the timeframe history effect in O2DPG), the per-TF collision context is prefixed with the tail collisions of the previous timeframe. The AOD producer emitted BC and McCollision rows (plus McParticles) for these borrowed collisions as well, so merging per-TF AODs produced duplicate, non-monotonic BC entries and double-counted MC events.

We now apply an ownership cut at mStartIR (orbitFirstSampled): collisions with globalBC below the TF start are skipped in collectBCs, the McCollision table and the McParticles table. McCollision indices are compacted accordingly, and reconstructed-track MC labels pointing into a dropped collision are invalidated (-1).

The cut is applied uniformly to every TF, including the first one of a job, so that AODs of neighbouring jobs can also be merged without duplication. Merged AO2Ds now have a sorted, duplicate-free BC table and exactly one McCollision row per generated event, making the post-hoc AODBcRewriter (in O2DPG) repair unnecessary for new productions.

With --orbitsEarly (the timeframe history effect in O2DPG), the per-TF
collision context is prefixed with the tail collisions of the previous
timeframe. The AOD producer emitted BC and McCollision rows (plus McParticles)
for these borrowed collisions as well, so merging per-TF AODs produced duplicate,
non-monotonic BC entries and double-counted MC events.

We now apply an ownership cut at mStartIR (orbitFirstSampled): collisions
with globalBC below the TF start are skipped in collectBCs, the
McCollision table and the McParticles table. McCollision indices are
compacted accordingly, and reconstructed-track MC labels pointing
into a dropped collision are invalidated (-1).

The cut is applied uniformly to every TF, including the first one of
a job, so that AODs of neighbouring jobs can also be merged without
duplication. Merged AO2Ds now have a sorted, duplicate-free BC table
and exactly one McCollision row per generated event, making the
post-hoc AODBcRewriter (in O2DPG) repair unnecessary for new productions.
@sawenzel sawenzel requested a review from a team as a code owner June 10, 2026 14:59
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for feb5129 at 2026-06-10 19:44:

## sw/BUILD/O2Physics-latest/log
CMake Error at /sw/slc9_x86-64/CMake/v4.1.4-2/share/cmake-4.1/Modules/CMakeTestCCompiler.cmake:67 (message):
    ninja: build stopped: subcommand failed.

Full log here.

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