30 EcalChannelStatusEBMap() :
cond::payloadInspector::PlotImage<
EcalChannelStatus>(
"ECAL Barrel channel status") {
33 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs)
override {
39 auto iov = iovs.front();
41 run = std::get<0>(iov);
44 if (
payload->barrelItems().empty())
52 Double_t
weight = (Double_t)(*
payload)[rawid].getEncodedStatusCode();
62 ebmap_coarse->Fill(
phi,
eta);
69 gStyle->SetOptStat(0);
71 gStyle->SetFillColor(10);
72 gStyle->SetFrameFillColor(10);
73 gStyle->SetCanvasColor(10);
74 gStyle->SetPadColor(10);
75 gStyle->SetTitleFillColor(0);
76 gStyle->SetStatColor(10);
78 gStyle->SetFrameBorderMode(0);
79 gStyle->SetCanvasBorderMode(0);
80 gStyle->SetPadBorderMode(0);
82 gStyle->SetPalette(1);
84 Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
85 Double_t
red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
86 Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
87 Double_t
blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
88 TColor::CreateGradientColorTable(NRGBs, stops,
red, green,
blue, NCont);
89 gStyle->SetNumberContours(NCont);
91 TCanvas
c1(
"c1",
"c1", 1200, 700);
100 ebmap->SetXTitle(
"i#phi");
101 ebmap->SetYTitle(
"i#eta");
102 ebmap->GetXaxis()->SetNdivisions(-418, kFALSE);
103 ebmap->GetYaxis()->SetNdivisions(-1702, kFALSE);
104 ebmap->GetXaxis()->SetLabelSize(0.03);
105 ebmap->GetYaxis()->SetLabelSize(0.03);
106 ebmap->GetXaxis()->SetTickLength(0.01);
107 ebmap->GetYaxis()->SetTickLength(0.01);
108 ebmap->SetMaximum(15);
113 ebmap_coarse->SetMarkerSize(1.3);
114 ebmap_coarse->Draw(
"text,same");
116 t1.SetTextSize(0.05);
117 t1.DrawLatex(0.5, 0.96, Form(
"EB Channel Status Masks, IOV %i",
run));
120 Double_t prop = (Double_t)ebcount /
kEBChannels * 100.;
121 sprintf(txt,
"%d/61200 (%4.3f%%)", ebcount, prop);
123 t1.SetTextSize(0.045);
124 t1.DrawLatex(0.5, 0.91, txt);
127 c1.SaveAs(ImageName.c_str());
137 EcalChannelStatusEEMap() :
cond::payloadInspector::PlotImage<
EcalChannelStatus>(
"ECAL Barrel channel status") {
140 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs)
override {
143 TH2F *eemap_coarse =
new TH2F(
"eemap_coarse",
"", 2, 0, 2 *
IX_MAX, 1, 0,
IY_MAX);
146 unsigned int run = 0;
147 auto iov = iovs.front();
149 run = std::get<0>(iov);
151 if (
payload->endcapItems().empty())
155 for (
int iz = -1; iz < 2; iz = iz + 2)
160 uint32_t rawid = myEEId.
rawId();
168 eemap->Fill(ix - 1, iy - 1,
weight);
171 eemap_coarse->Fill(ix - 1, iy - 1);
178 eemap_coarse->Fill(ix +
IX_MAX - 1, iy - 1);
184 gStyle->SetOptStat(0);
186 gStyle->SetFillColor(10);
187 gStyle->SetFrameFillColor(10);
188 gStyle->SetCanvasColor(10);
189 gStyle->SetPadColor(10);
190 gStyle->SetTitleFillColor(0);
191 gStyle->SetStatColor(10);
193 gStyle->SetFrameBorderMode(0);
194 gStyle->SetCanvasBorderMode(0);
195 gStyle->SetPadBorderMode(0);
197 gStyle->SetPalette(1);
199 Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
200 Double_t
red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
201 Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
202 Double_t
blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
203 TColor::CreateGradientColorTable(NRGBs, stops,
red, green,
blue, NCont);
204 gStyle->SetNumberContours(NCont);
212 eetemp->SetBinContent(
i,
j, 2);
213 eetemp->SetBinContent(
i +
IX_MAX,
j, 2);
218 eetemp->SetFillColor(920);
219 TCanvas
c1(
"c1",
"c1", 1200, 600);
226 t1.SetTextSize(0.06);
228 eetemp->GetXaxis()->SetNdivisions(40, kFALSE);
229 eetemp->GetYaxis()->SetNdivisions(20, kFALSE);
230 eetemp->GetXaxis()->SetLabelSize(0.00);
231 eetemp->GetYaxis()->SetLabelSize(0.00);
232 eetemp->GetXaxis()->SetTickLength(0.01);
233 eetemp->GetYaxis()->SetTickLength(0.01);
234 eetemp->SetMaximum(1.15);
236 eemap->GetXaxis()->SetNdivisions(40, kFALSE);
237 eemap->GetYaxis()->SetNdivisions(20, kFALSE);
238 eemap->GetXaxis()->SetLabelSize(0.00);
239 eemap->GetYaxis()->SetLabelSize(0.00);
240 eemap->GetXaxis()->SetTickLength(0.01);
241 eemap->GetYaxis()->SetTickLength(0.01);
242 eemap->SetMaximum(15);
245 eemap->Draw(
"same,colz");
247 eemap_coarse->SetMarkerSize(2);
248 eemap_coarse->Draw(
"same,text");
251 t1.SetTextSize(0.055);
252 t1.DrawLatex(0.5, 0.96, Form(
"EE Channel Status Masks, IOV %i",
run));
255 Double_t prop = (Double_t)eecount /
kEEChannels * 100.;
256 sprintf(txt,
"%d/14648 (%4.3f%%)", eecount, prop);
258 t1.SetTextSize(0.045);
259 t1.DrawLatex(0.5, 0.91, txt);
261 t1.SetTextSize(0.05);
262 t1.DrawLatex(0.14, 0.84,
"EE-");
263 t1.DrawLatex(0.86, 0.84,
"EE+");
266 c1.SaveAs(ImageName.c_str());
276 EcalChannelStatusEBDiff()
280 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs)
override {
285 for (
auto const &iov : iovs) {
289 if (
payload->barrelItems().empty())
291 run[irun] = std::get<0>(iov);
299 status[cellid] = (*payload)[rawid].getEncodedStatusCode();
301 unsigned int new_status = (*payload)[rawid].getEncodedStatusCode();
302 if (new_status !=
status[cellid]) {
304 if (new_status >
status[cellid])
314 ebmap->Fill(
phi,
eta, 0.05 + 0.95 * (tmp3 > 0));
316 ebmap_coarse->Fill(
phi,
eta, tmp3);
326 gStyle->SetOptStat(0);
328 gStyle->SetFillColor(10);
329 gStyle->SetFrameFillColor(10);
330 gStyle->SetCanvasColor(10);
331 gStyle->SetPadColor(10);
332 gStyle->SetTitleFillColor(0);
333 gStyle->SetStatColor(10);
335 gStyle->SetFrameBorderMode(0);
336 gStyle->SetCanvasBorderMode(0);
337 gStyle->SetPadBorderMode(0);
339 gStyle->SetPalette(1);
341 Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
342 Double_t
red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
343 Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
344 Double_t
blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
345 TColor::CreateGradientColorTable(NRGBs, stops,
red, green,
blue, NCont);
346 gStyle->SetNumberContours(NCont);
348 TCanvas
c1(
"c1",
"c1", 1200, 700);
355 t1.SetTextSize(0.06);
357 ebmap->SetXTitle(
"i#phi");
358 ebmap->SetYTitle(
"i#eta");
359 ebmap->GetXaxis()->SetNdivisions(-418, kFALSE);
360 ebmap->GetYaxis()->SetNdivisions(-1702, kFALSE);
361 ebmap->GetXaxis()->SetLabelSize(0.03);
362 ebmap->GetYaxis()->SetLabelSize(0.03);
363 ebmap->GetXaxis()->SetTickLength(0.01);
364 ebmap->GetYaxis()->SetTickLength(0.01);
365 ebmap->SetMaximum(1.15);
370 ebmap_coarse->SetMarkerSize(1.3);
371 ebmap_coarse->Draw(
"text,same");
373 t1.SetTextSize(0.05);
374 t1.DrawLatex(0.5, 0.96, Form(
"EB Channel Status Masks (Diff), IOV: %i vs %i",
run[0],
run[1]));
377 sprintf(txt,
"Net difference: %d channel(s)", ebcount);
379 t1.SetTextSize(0.045);
380 t1.DrawLatex(0.5, 0.91, txt);
383 c1.SaveAs(ImageName.c_str());
393 EcalChannelStatusEEDiff()
397 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs)
override {
399 TH2F *eemap_coarse =
new TH2F(
"eemap_coarse",
"", 2, 0, 2 *
IX_MAX, 1, 0,
IY_MAX);
403 for (
auto const &iov : iovs) {
405 run[irun] = std::get<0>(iov);
407 if (
payload->endcapItems().empty())
411 for (
int iz = -1; iz < 2; iz = iz + 2)
416 uint32_t rawid = myEEId.
rawId();
422 status[channel] = (*payload)[rawid].getEncodedStatusCode();
424 unsigned int new_status = (*payload)[rawid].getEncodedStatusCode();
425 if (new_status !=
status[channel]) {
427 if (new_status >
status[channel])
432 eemap->Fill(ix - 1, iy - 1, 0.05 + 0.95 * (tmp3 > 0));
434 eemap_coarse->Fill(ix - 1, iy - 1, tmp3);
436 eemap->Fill(ix +
IX_MAX - 1, iy - 1, 0.05 + 0.95 * (tmp3 > 0));
438 eemap_coarse->Fill(ix +
IX_MAX - 1, iy - 1, tmp3);
447 gStyle->SetOptStat(0);
449 gStyle->SetFillColor(10);
450 gStyle->SetFrameFillColor(10);
451 gStyle->SetCanvasColor(10);
452 gStyle->SetPadColor(10);
453 gStyle->SetTitleFillColor(0);
454 gStyle->SetStatColor(10);
456 gStyle->SetFrameBorderMode(0);
457 gStyle->SetCanvasBorderMode(0);
458 gStyle->SetPadBorderMode(0);
460 gStyle->SetPalette(1);
462 Double_t stops[NRGBs] = {0.00, 0.34, 0.61, 0.84, 1.00};
463 Double_t
red[NRGBs] = {0.00, 0.00, 0.87, 1.00, 0.51};
464 Double_t green[NRGBs] = {0.00, 0.81, 1.00, 0.20, 0.00};
465 Double_t
blue[NRGBs] = {0.51, 1.00, 0.12, 0.00, 0.00};
466 TColor::CreateGradientColorTable(NRGBs, stops,
red, green,
blue, NCont);
467 gStyle->SetNumberContours(NCont);
473 eetemp->SetBinContent(
i,
j, 2);
474 eetemp->SetBinContent(
i +
IX_MAX,
j, 2);
479 eetemp->SetFillColor(920);
480 TCanvas
c1(
"c1",
"c1", 1200, 600);
487 t1.SetTextSize(0.06);
489 eetemp->GetXaxis()->SetNdivisions(40, kFALSE);
490 eetemp->GetYaxis()->SetNdivisions(20, kFALSE);
491 eetemp->GetXaxis()->SetLabelSize(0.00);
492 eetemp->GetYaxis()->SetLabelSize(0.00);
493 eetemp->GetXaxis()->SetTickLength(0.01);
494 eetemp->GetYaxis()->SetTickLength(0.01);
495 eetemp->SetMaximum(1.15);
497 eemap->GetXaxis()->SetNdivisions(40, kFALSE);
498 eemap->GetYaxis()->SetNdivisions(20, kFALSE);
499 eemap->GetXaxis()->SetLabelSize(0.00);
500 eemap->GetYaxis()->SetLabelSize(0.00);
501 eemap->GetXaxis()->SetTickLength(0.01);
502 eemap->GetYaxis()->SetTickLength(0.01);
503 eemap->SetMaximum(1.15);
506 eemap->Draw(
"same,colz");
508 eemap_coarse->SetMarkerSize(2);
509 eemap_coarse->Draw(
"same,text");
512 t1.SetTextSize(0.055);
513 t1.DrawLatex(0.5, 0.96, Form(
"EE Channel Status Masks (Diff), IOV %i vs %i",
run[0],
run[1]));
516 sprintf(txt,
"Net difference: %d channel(s)", eecount);
518 t1.SetTextSize(0.045);
519 t1.DrawLatex(0.5, 0.91, txt);
521 t1.SetTextSize(0.05);
522 t1.DrawLatex(0.14, 0.84,
"EE-");
523 t1.DrawLatex(0.86, 0.84,
"EE+");
526 c1.SaveAs(ImageName.c_str());
536 EcalChannelStatusSummaryPlot()
541 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> > &iovs)
override {
542 auto iov = iovs.front();
543 std::shared_ptr<EcalChannelStatus>
payload =
545 unsigned int run = std::get<0>(iov);
553 align =
new TH2F(
"Ecal Channel Status Error Summary",
554 "EB/EE-/EE+ ErrorCount Total Number",
562 long unsigned int ebErrorCount = 0;
563 long unsigned int ee1ErrorCount = 0;
564 long unsigned int ee2ErrorCount = 0;
566 long unsigned int ebTotal = (
payload->barrelItems()).
size();
567 long unsigned int ee1Total = 0;
568 long unsigned int ee2Total = 0;
570 getBarrelErrorSummary<EcalChannelStatusCode>(
payload->barrelItems(), ebErrorCount);
571 getEndCapErrorSummary<EcalChannelStatusCode>(
572 payload->endcapItems(), ee1ErrorCount, ee2ErrorCount, ee1Total, ee2Total);
574 double row = NbRows - 0.5;
577 align->Fill(0.5, row, 1);
578 align->Fill(1.5, row, ebErrorCount);
579 align->Fill(2.5, row, ebTotal);
583 align->Fill(0.5, row, 2);
584 align->Fill(1.5, row, ee1ErrorCount);
585 align->Fill(2.5, row, ee1Total);
589 align->Fill(0.5, row, 3);
590 align->Fill(1.5, row, ee2ErrorCount);
591 align->Fill(2.5, row, ee2Total);
597 gStyle->SetPalette(1);
598 gStyle->SetOptStat(0);
599 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
603 t1.SetTextSize(0.045);
605 t1.DrawLatex(0.5, 0.96, Form(
"EcalChannelStatus Error Summary, IOV %i",
run));
607 TPad *pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
614 align->GetXaxis()->SetTickLength(0.);
615 align->GetXaxis()->SetLabelSize(0.);
616 align->GetYaxis()->SetTickLength(0.);
617 align->GetYaxis()->SetLabelSize(0.);
620 canvas.SaveAs(ImageName.c_str());