Skip to content

Commit

Permalink
Fix daughter labels when running parallel merger
Browse files Browse the repository at this point in the history
  • Loading branch information
preghenella authored and sawenzel committed Jan 25, 2021
1 parent db8a940 commit c2e368a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DataFormats/simulation/include/SimulationDataFormat/MCTrack.h
Expand Up @@ -202,6 +202,8 @@ class MCTrackT
}
bool getInhibited() const { return ((PropEncoding)mProp).inhibited; }

bool isTransported() const { return getToBeDone() && !getInhibited(); };

/// get the string representation of the production process
const char* getProdProcessAsString() const;

Expand Down
5 changes: 4 additions & 1 deletion run/O2HitMerger.h
Expand Up @@ -343,7 +343,10 @@ class O2HitMerger : public FairMQDevice
originbr->GetEntry(index);
for (Int_t i = 0; i < nprimaries[index]; i++) {
auto& track = incomingdata->at(i);
track.SetFirstDaughterTrackId(-1);
if (track.isTransported()) { // reset daughters only if track was transported, it will be fixed below
track.SetFirstDaughterTrackId(-1);
track.SetLastDaughterTrackId(-1);
}
targetdata->push_back(track);
}
incomingdata->clear();
Expand Down

0 comments on commit c2e368a

Please sign in to comment.