38 #include "TPaveStats.h"
46 class SiPixelQualityTest
51 "SiPixelQuality test",
"SiPixelQuality test", 10, 0.0, 10.0) {}
53 bool fill()
override {
54 auto tag = PlotBase::getTag<0>();
55 for (
auto const& iov :
tag.iovs) {
60 auto theDisabledModules =
payload->getBadComponentList();
61 for (
const auto&
mod : theDisabledModules) {
63 for (
unsigned short n = 0;
n < 16;
n++) {
64 unsigned short mask = 1 <<
n;
65 if (
mod.BadRocs & mask)
68 COUT <<
"detId:" <<
mod.DetID <<
" error type:" <<
mod.errorType <<
" BadRocs:" << BadRocCount << std::endl;
80 class SiPixelQualityBadRocsSummary
83 SiPixelQualityBadRocsSummary()
85 "SiPixel Quality Summary") {}
87 bool fill()
override {
88 auto tag = PlotBase::getTag<0>();
89 for (
const auto& iov :
tag.iovs) {
93 COUT <<
"======================= " << unpacked.first <<
" : " << unpacked.second << std::endl;
94 auto theDisabledModules =
payload->getBadComponentList();
95 for (
const auto&
mod : theDisabledModules) {
96 COUT <<
"detId: " <<
mod.DetID <<
" |error type: " <<
mod.errorType <<
" |BadRocs: " <<
mod.BadRocs
102 TCanvas
canvas(
"Partion summary",
"partition summary", 1200, 1000);
105 canvas.SetBottomMargin(0.11);
106 canvas.SetLeftMargin(0.13);
107 canvas.SetRightMargin(0.05);
121 class SiPixelQualityBadRocsTimeHistory
124 SiPixelQualityBadRocsTimeHistory()
125 :
cond::payloadInspector::TimeHistoryPlot<
SiPixelQuality,
std::pair<double, double> >(
"bad ROCs count vs time",
129 return std::make_pair(extractBadRocCount(
payload), 0.);
133 unsigned int BadRocCount(0);
134 auto theDisabledModules =
payload.getBadComponentList();
135 for (
const auto&
mod : theDisabledModules) {
136 for (
unsigned short n = 0;
n < 16;
n++) {
137 unsigned short mask = 1 <<
n;
138 if (
mod.BadRocs & mask)
150 class SiPixelBPixQualityMap
153 SiPixelBPixQualityMap()
155 "SiPixelQuality Barrel Pixel Map"),
159 bool fill()
override {
160 auto tag = PlotBase::getTag<0>();
161 auto iov =
tag.iovs.front();
166 auto theDisabledModules =
payload->getBadComponentList();
167 for (
const auto&
mod : theDisabledModules) {
169 std::bitset<16> bad_rocs(
mod.BadRocs);
172 theBPixMap.fillWholeModule(
mod.DetID, 1.);
174 theBPixMap.fillSelectedRocs(
mod.DetID, bad_rocs, 1.);
179 gStyle->SetOptStat(0);
181 TCanvas
canvas(
"Summary",
"Summary", 1200, 1200);
182 theBPixMap.drawBarrelMaps(
canvas);
186 for (
unsigned int lay = 1; lay <= 4; lay++) {
190 ltx.SetTextColor(kBlue);
191 ltx.SetTextSize(0.055);
192 ltx.SetTextAlign(11);
193 ltx.DrawLatexNDC(gPad->GetLeftMargin(),
194 1 - gPad->GetTopMargin() + 0.01,
196 ? (
"IOV:" + std::to_string(unpacked.second)).c_str()
197 : (std::to_string(unpacked.first) +
"," + std::to_string(unpacked.second)).c_str());
203 canvas.SaveAs(
"outBPix.root");
217 class SiPixelFPixQualityMap
220 SiPixelFPixQualityMap()
222 "SiPixelQuality Forward Pixel Map"),
226 bool fill()
override {
227 auto tag = PlotBase::getTag<0>();
228 auto iov =
tag.iovs.front();
233 auto theDisabledModules =
payload->getBadComponentList();
234 for (
const auto&
mod : theDisabledModules) {
236 std::bitset<16> bad_rocs(
mod.BadRocs);
239 theFPixMap.fillWholeModule(
mod.DetID, 1.);
241 theFPixMap.fillSelectedRocs(
mod.DetID, bad_rocs, 1.);
246 gStyle->SetOptStat(0);
248 TCanvas
canvas(
"Summary",
"Summary", 1200, 600);
249 theFPixMap.drawForwardMaps(
canvas);
257 ltx.SetTextColor(kBlue);
258 ltx.SetTextSize(0.050);
259 ltx.SetTextAlign(11);
260 ltx.DrawLatexNDC(gPad->GetLeftMargin(),
261 1 - gPad->GetTopMargin() + 0.01,
263 ? (
"IOV:" + std::to_string(unpacked.second)).c_str()
264 : (std::to_string(unpacked.first) +
"," + std::to_string(unpacked.second)).c_str());
270 canvas.SaveAs(
"outFPix.root");