Skip to content

Commit

Permalink
Fixed bug with threshold and only compute cxPtR2 once.
Browse files Browse the repository at this point in the history
  • Loading branch information
aehart committed Apr 27, 2023
1 parent 98a11b8 commit 7b74c03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RecoVertex/V0Producer/src/V0Fitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,12 @@ void V0Fitter::fitAll(const edm::Event& iEvent,

// the POCA should at least be in the sensitive volume
GlobalPoint cxPt = cApp.crossingPoint();
if ((cxPt.x() * cxPt.x() + cxPt.y() * cxPt.y()) > 120. * 120. || std::abs(cxPt.z()) > 300.)
const double cxPtR2 = cxPt.x() * cxPt.x() + cxPt.y() * cxPt.y();
if (cxPtR2 > 120. * 120. || std::abs(cxPt.z()) > 300.)
continue;

if (cxPt.x() * cxPt.x() + cxPt.y() * cxPt.y() < innerOuterTkDCAThreshold_) {
// allow for different DCA cuts depending on position of POCA
if (cxPtR2 < innerOuterTkDCAThreshold_ * innerOuterTkDCAThreshold_) {
if (dca > innerTkDCACut_)
continue;
} else {
Expand Down

0 comments on commit 7b74c03

Please sign in to comment.