diff --git a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLHarvester.cc b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLHarvester.cc index 48e3a81df7b95..9deecaf2d27cf 100644 --- a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLHarvester.cc +++ b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLHarvester.cc @@ -319,7 +319,7 @@ void SiPixelLorentzAnglePCLHarvester::dqmEndJob(DQMStore::IBooker& iBooker, DQMS // retrieve the number of bins from the other monitoring histogram const auto& maxSect = hists.h_bySectOccupancy_->getNbinsX(); const double lo = -0.5; - const double hi = maxSect + 0.5; + const double hi = maxSect - 0.5; // this will be booked in the Harvesting folder iBooker.setCurrentFolder(fmt::format("{}Harvesting/SectorMonitoring", dqmDir_)); @@ -337,7 +337,7 @@ void SiPixelLorentzAnglePCLHarvester::dqmEndJob(DQMStore::IBooker& iBooker, DQMS iBooker.book1D("h_bySectorChi2", "Fit #chi^{2}/ndf by sector;pixel sector; fit #chi^{2}/ndf", maxSect, lo, hi); // copy the bin labels from the occupancy histogram - for (int bin = 1; bin < maxSect; bin++) { + for (int bin = 1; bin <= maxSect; bin++) { const auto& binName = hists.h_bySectOccupancy_->getTH1()->GetXaxis()->GetBinLabel(bin); hists.h_bySectMeasLA_->setBinLabel(bin, binName); hists.h_bySectSetLA_->setBinLabel(bin, binName); diff --git a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc index 7a8f116ee6991..64636ff8f5425 100644 --- a/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc +++ b/CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc @@ -536,6 +536,24 @@ void SiPixelLorentzAnglePCLWorker::analyze(edm::Event const& iEvent, edm::EventS iHists.h_drift_depth_adc2_.at(i_index)->Fill(drift, depth, pixinfo_.adc[j] * pixinfo_.adc[j]); iHists.h_drift_depth_noadc_.at(i_index)->Fill(drift, depth, 1.); iHists.h_bySectOccupancy_->Fill(i_index - 1); // histogram starts at 0 + + if (tracker->getDetectorType(subDetID) == TrackerGeometry::ModuleType::Ph1PXB) { + if ((module_ == 3 || module_ == 5) && (layer_ == 3 || layer_ == 4)) { + int i_index_merge = i_index + 1; + iHists.h_drift_depth_adc_.at(i_index_merge)->Fill(drift, depth, pixinfo_.adc[j]); + iHists.h_drift_depth_adc2_.at(i_index_merge)->Fill(drift, depth, pixinfo_.adc[j] * pixinfo_.adc[j]); + iHists.h_drift_depth_noadc_.at(i_index_merge)->Fill(drift, depth, 1.); + iHists.h_bySectOccupancy_->Fill(i_index_merge - 1); + } + if ((module_ == 4 || module_ == 6) && (layer_ == 3 || layer_ == 4)) { + int i_index_merge = i_index - 1; + iHists.h_drift_depth_adc_.at(i_index_merge)->Fill(drift, depth, pixinfo_.adc[j]); + iHists.h_drift_depth_adc2_.at(i_index_merge)->Fill(drift, depth, pixinfo_.adc[j] * pixinfo_.adc[j]); + iHists.h_drift_depth_noadc_.at(i_index_merge)->Fill(drift, depth, 1.); + iHists.h_bySectOccupancy_->Fill(i_index_merge - 1); + } + } + } else { int new_index = iHists.nModules_[iHists.nlay - 1] + (iHists.nlay - 1) * iHists.nModules_[iHists.nlay - 1] + 1 + DetId_index; @@ -697,7 +715,7 @@ void SiPixelLorentzAnglePCLWorker::bookHistograms(DQMStore::IBooker& iBooker, iBooker.setCurrentFolder(fmt::sprintf("%s/SectorMonitoring", folder_.data())); iHists.h_bySectOccupancy_ = iBooker.book1D( - "h_bySectorOccupancy", "hit occupancy by sector;pixel sector;hits on track", maxSect, -0.5, maxSect + 0.5); + "h_bySectorOccupancy", "hit occupancy by sector;pixel sector;hits on track", maxSect, -0.5, maxSect - 0.5); iBooker.setCurrentFolder(folder_); static constexpr double min_depth_ = -100.;