Skip to content

Commit 0f0e233

Browse files
matthias-kleinerclaude
authored andcommitted
TPC track reader: do not accumulate MC labels over entries
With one entry per call, TrackReader::accumulate swapped the tracks and cluster references of the new entry in, but appended its MC labels to mMCTruthOut, which is never cleared. From the second tree entry on, the consumers therefore got the labels of the first entry for the tracks of the current one (label i = label of track i of entry 0). Swap the labels as well. Only visible when a tpctracks.root holds more than one TF (e.g. merged MC files); O2DPG writes one TF per file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 21d4ce4 commit 0f0e233

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Detectors/TPC/workflow/readers/src/TrackReaderSpec.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void TrackReader::accumulate(int from, int n)
9797
mTracksOut.swap(*mTracksInp);
9898
mCluRefVecOut.swap(*mCluRefVecInp);
9999
if (mUseMC) {
100-
std::copy(mMCTruthInp->begin(), mMCTruthInp->end(), std::back_inserter(mMCTruthOut));
100+
mMCTruthOut.swap(*mMCTruthInp);
101101
}
102102
} else {
103103
for (int iev = 0; iev < n; iev++) {

0 commit comments

Comments
 (0)