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_) &&