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

TkDQM: PixelPhase1 Summary plots #35865

Merged
merged 12 commits into from Nov 4, 2021
1 change: 1 addition & 0 deletions DQM/SiPixelPhase1Summary/interface/SiPixelPhase1Summary.h
Expand Up @@ -78,6 +78,7 @@ class SiPixelPhase1Summary : public DQMEDHarvester {

//Error thresholds for the dead ROC plots
std::vector<double> deadRocThresholds_;
std::vector<double> deadRocWarnThresholds_;

//book the summary plots
void bookSummaries(DQMStore::IBooker& iBooker);
Expand Down
10 changes: 6 additions & 4 deletions DQM/SiPixelPhase1Summary/python/SiPixelPhase1Summary_cfi.py
Expand Up @@ -35,7 +35,8 @@
)
),
# Number of dead ROCs required to generate an error. Order must be layers 1-4, ring1, ring2.
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2)
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2),
DeadROCWarningThreshold = cms.vdouble(0.1,0.1,0.1,0.1,0.1,0.1)
)

SiPixelPhase1SummaryOffline = DQMEDHarvester("SiPixelPhase1Summary",
Expand Down Expand Up @@ -67,8 +68,8 @@
MapHist = cms.string("mean_charge")
)
),
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2)

DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2),
DeadROCWarningThreshold = cms.vdouble(0.1,0.1,0.1,0.1,0.1,0.1)
)

SiPixelPhase1SummaryCosmics = DQMEDHarvester("SiPixelPhase1Summary",
Expand All @@ -92,7 +93,8 @@
MapHist = cms.string("mean_charge")
)
),
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2)
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2),
DeadROCWarningThreshold = cms.vdouble(0.1,0.1,0.1,0.1,0.1,0.1)
)

from DQMServices.Core.DQMQualityTester import DQMQualityTester
Expand Down
28 changes: 18 additions & 10 deletions DQM/SiPixelPhase1Summary/src/SiPixelPhase1Summary.cc
Expand Up @@ -60,6 +60,7 @@ SiPixelPhase1Summary::SiPixelPhase1Summary(const edm::ParameterSet& iConfig)
summaryPlotName_[mapPSet.getParameter<std::string>("MapName")] = mapPSet.getParameter<std::string>("MapHist");
}
deadRocThresholds_ = conf_.getParameter<std::vector<double> >("DeadROCErrorThreshold");
deadRocWarnThresholds_ = conf_.getParameter<std::vector<double> >("DeadROCWarningThreshold");
}

SiPixelPhase1Summary::~SiPixelPhase1Summary() {
Expand Down Expand Up @@ -282,6 +283,8 @@ void SiPixelPhase1Summary::fillSummaries(DQMStore::IBooker& iBooker, DQMStore::I
nROCs = tempProfile->GetBinContent(i + 1);
}
deadROCSummary->setBinContent(xBin, yBin, nROCs / nRocsPerTrend[i]);
deadROCSummary->setBinContent(2, 3, -1);
deadROCSummary->setBinContent(2, 4, -1);
}

//Sum of non-negative bins for the reportSummary
Expand Down Expand Up @@ -325,20 +328,25 @@ void SiPixelPhase1Summary::fillSummaries(DQMStore::IBooker& iBooker, DQMStore::I
}
for (int j = 0; j < 4; j++) { // !??!?!? yAxisLabels_.size() ?!?!?!
//Ignore the bins without detectors in them
if (i == 1 && j > 1)
continue;
summaryMap_["Grand"]->setBinContent(
i + 1,
j + 1,
1); // This resets the map to be good. We only then set it to 0 if there has been a problem in one of the other summaries.
if (deadROCSummary->getBinContent(i + 1, j + 1) > deadRocThresholds_[i * 4 + j])
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 0);
sumOfNonNegBins += summaryMap_["Grand"]->getBinContent(i + 1, j + 1);
if (i == 1 && j > 1) {
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, -1);
} else {
if (deadROCSummary->getBinContent(i + 1, j + 1) < deadRocWarnThresholds_[i * 4 + j])
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 1);

else if (deadROCSummary->getBinContent(i + 1, j + 1) > deadRocWarnThresholds_[i * 4 + j] &&
deadROCSummary->getBinContent(i + 1, j + 1) < deadRocThresholds_[i * 4 + j])
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 0.8);

else
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 0);

sumOfNonNegBins += summaryMap_["Grand"]->getBinContent(i + 1, j + 1);
}
}
}
}
}

//------------------------------------------------------------------
// Fill the trend plots
//------------------------------------------------------------------
Expand Down