Skip to content

Commit

Permalink
Patch for VertexException
Browse files Browse the repository at this point in the history
  • Loading branch information
24LopezR committed Sep 4, 2024
1 parent 369cd7c commit 21d3103
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ class MuonBeamspotConstraintValueMapProducer : public edm::global::EDProducer<>
// SingleTrackVertexConstraint uses the width for the constraint,
// not the error)
if ((BeamWidthXError / BeamWidthX < 0.3) && (BeamWidthYError / BeamWidthY < 0.3)) {
SingleTrackVertexConstraint::BTFtuple btft =
stvc.constrain(ttkb->build(muon.muonBestTrack()), *beamSpotHandle);
if (std::get<0>(btft)) {
const reco::Track& trkBS = std::get<1>(btft).track();
pts.push_back(trkBS.pt());
ptErrs.push_back(trkBS.ptError());
chi2s.push_back(std::get<2>(btft));
tbd = false;
try {
SingleTrackVertexConstraint::BTFtuple btft =
stvc.constrain(ttkb->build(muon.muonBestTrack()), *beamSpotHandle);
if (std::get<0>(btft)) {
const reco::Track& trkBS = std::get<1>(btft).track();
pts.push_back(trkBS.pt());
ptErrs.push_back(trkBS.ptError());
chi2s.push_back(std::get<2>(btft));
tbd = false;
}
} catch (const VertexException& exc) {
// Update failed; give up.
}
}
}
Expand Down

0 comments on commit 21d3103

Please sign in to comment.