Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge central modules at L3&L4 #18

Open
wants to merge 3 commits into
base: SiPixelLorentzAngleCalibrationInPCL
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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