Skip to content

Commit

Permalink
Fix crash in DeDxEstimatorRekeyer
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Govinda Stahl Leiton committed Oct 8, 2024
1 parent 4bc3e62 commit c08160f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PhysicsTools/PatAlgos/plugins/DeDxEstimatorRekeyer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ void DeDxEstimatorRekeyer::produce(edm::StreamID, edm::Event& iEvent, const edm:
for (const auto& h : pcTrkMap) {
std::vector<int> indices(h.first->size(), -1);
for (const auto& p : h.second) {
indices[p.first.key()] = resultdedxHitColl->size();
const auto& dedxHit = dedxHitAss[p.second];
if (dedxHit.isNull())
continue;
indices[p.first.key()] = resultdedxHitColl->size();
resultdedxHitColl->emplace_back(*dedxHit);
momenta.emplace_back(dedxHitMom[dedxHit]);
}
Expand Down

0 comments on commit c08160f

Please sign in to comment.