From f6c18fb5f22c74faa7d54e8cd13084f4adbbb86a Mon Sep 17 00:00:00 2001 From: mmusich Date: Wed, 24 May 2023 13:32:07 +0200 Subject: [PATCH] TrackSplittingMonitor: fix bug in the BPix hits counting --- DQM/TrackingMonitor/src/TrackSplittingMonitor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DQM/TrackingMonitor/src/TrackSplittingMonitor.cc b/DQM/TrackingMonitor/src/TrackSplittingMonitor.cc index 87afecaaddc6e..997265c5c4868 100644 --- a/DQM/TrackingMonitor/src/TrackSplittingMonitor.cc +++ b/DQM/TrackingMonitor/src/TrackSplittingMonitor.cc @@ -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; + } } } @@ -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_) &&