34 for (
auto rofIt = inROFRecords.begin(); rofIt != inROFRecords.end(); ++rofIt) {
35 auto nextRofIt = rofIt + 1;
36 bool mergeInteractions = mergeInBunchPileup && nextRofIt != inROFRecords.end() && rofIt->interactionRecord == nextRofIt->interactionRecord;
38 for (
size_t idigit = rofIt->firstEntry,
end = rofIt->getEndIndex(); idigit <
end; ++idigit) {
39 mHandler.
merge(inDigitStore[idigit], idigit);
42 if (mergeInteractions) {
46 auto firstEntry = mDigitStore.size();
48 mROFRecords.emplace_back(rofIt->interactionRecord, rofIt->eventType, firstEntry,
digits.size());
49 mDigitStore.insert(mDigitStore.end(),
digits.begin(),
digits.end());
52 for (
auto imdig = 0; imdig <
digits.size(); ++imdig) {
54 for (
auto labelIdx : indexes) {
55 mMCContainer.addElements(firstEntry + imdig, inMCContainer->
getLabels(labelIdx));
void process(const std::vector< ColumnData > &inDigitStore, const o2::dataformats::MCTruthContainer< MCLabel > &inMCContainer, const std::vector< ROFRecord > &inROFRecords, bool mergeInBunchPileup=true)
Merges the MC digits that are provided per hit into the format that we expect from data.