Skip to content

Commit

Permalink
TrackSplittingMonitor: fix bug in the BPix hits counting
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed May 24, 2023
1 parent 8cc6f24 commit f6c18fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion DQM/TrackingMonitor/src/TrackSplittingMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,14 @@ void TrackSplittingMonitor::analyze(const edm::Event& iEvent, const edm::EventSe
}
// looping through the hits for track 2
double nRechits2 = 0;
double nRechitinBPIX2 = 0;
for (auto const& iHit : track2.recHits()) {
if (iHit->isValid()) {
nRechits2++;
int type = iHit->geographicalId().subdetId();
if (type == int(PixelSubdetector::PixelBarrel)) {
++nRechitinBPIX2;
}
}
}

Expand All @@ -227,7 +232,7 @@ void TrackSplittingMonitor::analyze(const edm::Event& iEvent, const edm::EventSe

// basic selection
// pixel hits and total hits
if ((nRechitinBPIX1 >= pixelHitsPerLeg_) && (nRechitinBPIX1 >= pixelHitsPerLeg_) &&
if ((nRechitinBPIX1 >= pixelHitsPerLeg_) && (nRechitinBPIX2 >= pixelHitsPerLeg_) &&
(nRechits1 >= totalHitsPerLeg_) && (nRechits2 >= totalHitsPerLeg_)) {
// dca cut
if (((std::abs(d01) < d0Cut_)) && (std::abs(d02) < d0Cut_) && (std::abs(dz1) < dzCut_) &&
Expand Down

0 comments on commit f6c18fb

Please sign in to comment.