Skip to content

Commit

Permalink
Merge pull request #46312 from stahlleiton/Fix_CMSSW_14_2_X
Browse files Browse the repository at this point in the history
Fix crash in DeDxEstimatorRekeyer
  • Loading branch information
cmsbuild authored Oct 9, 2024
2 parents caeb31e + 221cd80 commit 753f1e8
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 753f1e8

Please sign in to comment.