Skip to content

Commit

Permalink
Set the time for SimTrackerHits and CaloHitContributions from background
Browse files Browse the repository at this point in the history
in the Overlay algorithm
  • Loading branch information
jmcarcell committed Dec 6, 2024
1 parent 8d13b38 commit ef481cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions k4Reco/Overlay/components/OverlayTiming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ retType OverlayTiming::operator()(const edm4hep::EventHeaderCollection&
continue;
auto nhit = elem.clone(false);
nhit.setOverlay(true);
nhit.setTime(elem.getTime() + timeOffset);
nhit.setParticle(oparticles[oldToNewMap[elem.getParticle().getObjectID().index]]);
ocoll->push_back(nhit);
}
Expand Down Expand Up @@ -344,6 +345,7 @@ retType OverlayTiming::operator()(const edm4hep::EventHeaderCollection&
// TODO: Make sure a contribution is not added twice
auto newcontrib = contrib.clone(false);
newcontrib.setParticle(oparticles[oldToNewMap[contrib.getParticle().getObjectID().index]]);
newcontrib.setTime(contrib.getTime() + timeOffset);
calhit.addToContributions(newcontrib);
calHitContribs.push_back(newcontrib);
}
Expand All @@ -362,6 +364,7 @@ retType OverlayTiming::operator()(const edm4hep::EventHeaderCollection&
// TODO: Make sure a contribution is not added twice
auto newcontrib = contrib.clone(false);
newcontrib.setParticle(oparticles[oldToNewMap[contrib.getParticle().getObjectID().index]]);
newcontrib.setTime(contrib.getTime() + timeOffset);
calhit.addToContributions(newcontrib);
calHitContribs.push_back(newcontrib);
}
Expand Down

0 comments on commit ef481cb

Please sign in to comment.