Skip to content

Conversation

@shahor02
Copy link
Collaborator

The caching of MC truth info is wrong as in general the same MC event of given source may be reused in multiple collisions (always the case for the QED). For the simulation with QED + hadronic source the processing of QED leads to accessing non-existent interaction record, followed by the crash reported by @ChSonnabend

[1956199:tpc-tracker]: [09:22:00][FATAL] Unhandled o2::framework::runtime_error reached the top of main of o2-tpc-reco-workflow, device shutting down. Reason: Requested IR is ahead of the reference IR

For the proper loop over the contribution of different sources to the collision see e.g.

auto& eventParts = context->getEventParts(withQED);
// loop over all composite collisions given from context
// (aka loop over all the interaction records)
for (int collID = 0; collID < timesview.size(); ++collID) {
// Note: Very crude filter to neglect collisions coming before
// the first interaction record of the timeframe. Remove this, once these collisions can be handled
// within the digitization routine. Collisions before this timeframe might impact digits of this timeframe.
// See https://its.cern.ch/jira/browse/O2-5395.
if (timesview[collID] < firstTF) {
LOG(info) << "Too early: Not digitizing collision " << collID;
continue;
}
mDigitizer.setInteractionRecord(timesview[collID]);
LOG(debug) << " setInteractionRecord " << timesview[collID] << " bc " << mDigitizer.getBC() << " orbit " << mDigitizer.getOrbit();
// for each collision, loop over the constituents event and source IDs
// (background signal merging is basically taking place here)
for (auto& part : eventParts[collID]) {
// get the hits for this event and this source
.
Currently, I am simply discarding the QED source (99), but in principle, other sources may also be reused, so the code is not yet safe.

@shahor02 shahor02 requested a review from davidrohr as a code owner August 14, 2025 12:29
@github-actions
Copy link
Contributor

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

@shahor02 shahor02 merged commit dce7e0e into AliceO2Group:dev Aug 15, 2025
12 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.

1 participant