Skip to content

Commit

Permalink
Merge pull request #37239 from CMSTrackerDPG/LAPCL_mergemodules
Browse files Browse the repository at this point in the history
[12_2_X] Merged central modules at L3&L4 in SiPixelLorentzAngle PCL workflow
  • Loading branch information
cmsbuild authored Mar 14, 2022
2 parents e365c06 + 61a6ba2 commit 8e6682e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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_));
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.;
Expand Down

0 comments on commit 8e6682e

Please sign in to comment.