30 EcalPedestalsHist() :
cond::payloadInspector::PlotImage<
EcalPedestals>(
"ECAL pedestal map") { setSingleIov(
true); }
31 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
33 TH1F** barrel_m =
new TH1F*[
kGains];
34 TH1F** endcap_m =
new TH1F*[
kGains];
35 TH1F** barrel_r =
new TH1F*[
kGains];
36 TH1F** endcap_r =
new TH1F*[
kGains];
39 float emin[
kGains] = {1.5, 0.8, 0.4};
40 float emax[
kGains] = {2.5, 1.5, 0.8};
49 auto iov = iovs.front();
50 std::shared_ptr<EcalPedestals>
payload = fetchPayload(std::get<1>(iov));
51 unsigned int run = std::get<0>(iov);
54 if (
payload->barrelItems().empty())
60 barrel_m[0]->Fill((*
payload)[rawid].mean_x12);
61 barrel_r[0]->Fill((*
payload)[rawid].rms_x12);
62 barrel_m[1]->Fill((*
payload)[rawid].mean_x6);
63 barrel_r[1]->Fill((*
payload)[rawid].rms_x6);
64 barrel_m[2]->Fill((*
payload)[rawid].mean_x1);
65 barrel_r[2]->Fill((*
payload)[rawid].rms_x1);
67 if (
payload->endcapItems().empty())
71 for (
int iz = -1; iz < 2; iz = iz + 2)
76 uint32_t rawid = myEEId.
rawId();
79 endcap_m[0]->Fill((*
payload)[rawid].mean_x12);
80 endcap_r[0]->Fill((*
payload)[rawid].rms_x12);
81 endcap_m[1]->Fill((*
payload)[rawid].mean_x6);
82 endcap_r[1]->Fill((*
payload)[rawid].rms_x6);
83 endcap_m[2]->Fill((*
payload)[rawid].mean_x1);
84 endcap_r[2]->Fill((*
payload)[rawid].rms_x1);
90 gStyle->SetPalette(1);
91 gStyle->SetOptStat(111110);
92 TCanvas
canvas(
"CC map",
"CC map", 1600, 2600);
97 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Pedestals, IOV %i",
run));
99 float xmi[2] = {0.0, 0.50};
100 float xma[2] = {0.50, 1.00};
101 TPad*** pad =
new TPad**[6];
102 for (
int gId = 0; gId < 6; gId++) {
103 pad[gId] =
new TPad*[2];
107 float yma = 0.94 - (0.16 * gId);
108 float ymi = yma - 0.14;
109 pad[gId][
obj] =
new TPad(Form(
"p_%i_%i",
obj, gId), Form(
"p_%i_%i",
obj, gId), xmi[
obj], ymi, xma[
obj], yma);
110 pad[gId][
obj]->Draw();
113 for (
int gId = 0; gId <
kGains; gId++) {
115 barrel_m[gId]->Draw();
116 pad[gId +
kGains][0]->cd();
117 barrel_r[gId]->Draw();
119 endcap_m[gId]->Draw();
120 pad[gId +
kGains][1]->cd();
121 endcap_r[gId]->Draw();
125 canvas.SaveAs(ImageName.c_str());
136 EcalPedestalsPlot() :
cond::payloadInspector::PlotImage<
EcalPedestals>(
"ECAL pedestal map") { setSingleIov(
true); }
137 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
139 TH2F** barrel_m =
new TH2F*[
kGains];
140 TH2F** endc_p_m =
new TH2F*[
kGains];
141 TH2F** endc_m_m =
new TH2F*[
kGains];
142 TH2F** barrel_r =
new TH2F*[
kGains];
143 TH2F** endc_p_r =
new TH2F*[
kGains];
144 TH2F** endc_m_r =
new TH2F*[
kGains];
148 for (
int gId = 0; gId <
kGains; gId++) {
149 barrel_m[gId] =
new TH2F(Form(
"EBm%i", gId),
157 endc_p_m[gId] =
new TH2F(Form(
"EE+m%i", gId),
165 endc_m_m[gId] =
new TH2F(Form(
"EE-m%i", gId),
173 barrel_r[gId] =
new TH2F(Form(
"EBr%i", gId),
181 endc_p_r[gId] =
new TH2F(Form(
"EE+r%i", gId),
189 endc_m_r[gId] =
new TH2F(Form(
"EE-r%i", gId),
204 auto iov = iovs.front();
205 std::shared_ptr<EcalPedestals>
payload = fetchPayload(std::get<1>(iov));
206 unsigned int run = std::get<0>(iov);
209 if (
payload->barrelItems().empty())
222 Double_t
val = (*payload)[rawid].rms_x12;
225 EBmean[0] = EBmean[0] +
val;
226 EBrms[0] = EBrms[0] +
val *
val;
231 val = (*payload)[rawid].rms_x6;
234 EBmean[1] = EBmean[1] +
val;
235 EBrms[1] = EBrms[1] +
val *
val;
240 val = (*payload)[rawid].rms_x1;
243 EBmean[2] = EBmean[2] +
val;
244 EBrms[2] = EBrms[2] +
val *
val;
249 if (
payload->endcapItems().empty())
253 for (
int iz = -1; iz < 2; iz = iz + 2)
258 uint32_t rawid = myEEId.
rawId();
262 endc_p_m[0]->Fill(ix, iy, (*
payload)[rawid].mean_x12);
263 Double_t
val = (*payload)[rawid].rms_x12;
264 endc_p_r[0]->Fill(ix, iy,
val);
266 EEmean[0] = EEmean[0] +
val;
267 EErms[0] = EErms[0] +
val *
val;
270 endc_p_m[1]->Fill(ix, iy, (*
payload)[rawid].mean_x6);
271 val = (*payload)[rawid].rms_x6;
272 endc_p_r[1]->Fill(ix, iy,
val);
274 EEmean[1] = EEmean[1] +
val;
275 EErms[1] = EErms[1] +
val *
val;
278 endc_p_m[2]->Fill(ix, iy, (*
payload)[rawid].mean_x1);
279 val = (*payload)[rawid].rms_x1;
280 endc_p_r[2]->Fill(ix, iy,
val);
282 EEmean[2] = EEmean[2] +
val;
283 EErms[2] = EErms[2] +
val *
val;
287 endc_m_m[0]->Fill(ix, iy, (*
payload)[rawid].mean_x12);
288 Double_t
val = (*payload)[rawid].rms_x12;
289 endc_m_r[0]->Fill(ix, iy,
val);
291 EEmean[0] = EEmean[0] +
val;
292 EErms[0] = EErms[0] +
val *
val;
295 endc_m_m[1]->Fill(ix, iy, (*
payload)[rawid].mean_x6);
296 val = (*payload)[rawid].rms_x6;
297 endc_m_r[1]->Fill(ix, iy,
val);
299 EEmean[1] = EEmean[1] +
val;
300 EErms[1] = EErms[1] +
val *
val;
303 endc_m_m[2]->Fill(ix, iy, (*
payload)[rawid].mean_x1);
304 val = (*payload)[rawid].rms_x1;
305 endc_m_r[2]->Fill(ix, iy,
val);
307 EEmean[2] = EEmean[2] +
val;
308 EErms[2] = EErms[2] +
val *
val;
317 gStyle->SetPalette(1);
318 gStyle->SetOptStat(0);
319 TCanvas
canvas(
"CC map",
"CC map", 1600, 2600);
323 t1.SetTextSize(0.05);
324 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Pedestals, IOV %i",
run));
326 float xmi[3] = {0.0, 0.24, 0.76};
327 float xma[3] = {0.24, 0.76, 1.00};
328 TPad*** pad =
new TPad**[6];
330 for (
int gId = 0; gId <
kGains; gId++) {
332 pad[view] =
new TPad*[3];
334 float yma = 0.94 - (0.16 * view);
335 float ymi = yma - 0.14;
337 new TPad(Form(
"p_%i_%i",
obj, view), Form(
"p_%i_%i",
obj, view), xmi[
obj], ymi, xma[
obj], yma);
338 pad[view][
obj]->Draw();
342 double vt = (double)EBtot[gId];
343 EBmean[gId] = EBmean[gId] / vt;
344 EBrms[gId] = (EBrms[gId] / vt) - (EBmean[gId] * EBmean[gId]);
345 EBrms[gId] =
sqrt(EBrms[gId]);
346 if (EBrms[gId] == 0.)
348 pEBmin[gId] = EBmean[gId] - kRMS * EBrms[gId];
349 pEBmax[gId] = EBmean[gId] + kRMS * EBrms[gId];
352 if (pEBmin[gId] < 0.)
354 vt = (double)EEtot[gId];
355 EEmean[gId] = EEmean[gId] / vt;
356 EErms[gId] = (EErms[gId] / vt) - (EEmean[gId] * EEmean[gId]);
357 EErms[gId] =
sqrt(EErms[gId]);
358 if (EErms[gId] == 0.)
360 pEEmin[gId] = EEmean[gId] - kRMS * EErms[gId];
361 pEEmax[gId] = EEmean[gId] + kRMS * EErms[gId];
364 if (pEEmin[gId] < 0.)
373 for (
int gId = 0; gId <
kGains; gId++) {
375 DrawEE(endc_m_m[gId], 175., 225.);
376 pad[gId +
kGains][0]->cd();
377 DrawEE(endc_m_r[gId], pEEmin[gId], pEEmax[gId]);
379 DrawEB(barrel_m[gId], 175., 225.);
380 pad[gId +
kGains][1]->cd();
381 DrawEB(barrel_r[gId], pEBmin[gId], pEBmax[gId]);
383 DrawEE(endc_p_m[gId], 175., 225.);
384 pad[gId +
kGains][2]->cd();
385 DrawEE(endc_p_r[gId], pEEmin[gId], pEEmax[gId]);
389 canvas.SaveAs(ImageName.c_str());
400 EcalPedestalsDiff() :
cond::payloadInspector::PlotImage<
EcalPedestals>(
"ECAL Barrel channel status difference") {
403 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
405 TH2F** barrel_m =
new TH2F*[
kGains];
406 TH2F** endc_p_m =
new TH2F*[
kGains];
407 TH2F** endc_m_m =
new TH2F*[
kGains];
408 TH2F** barrel_r =
new TH2F*[
kGains];
409 TH2F** endc_p_r =
new TH2F*[
kGains];
410 TH2F** endc_m_r =
new TH2F*[
kGains];
414 for (
int gId = 0; gId <
kGains; gId++) {
415 barrel_m[gId] =
new TH2F(Form(
"EBm%i", gId),
423 endc_p_m[gId] =
new TH2F(Form(
"EE+m%i", gId),
431 endc_m_m[gId] =
new TH2F(Form(
"EE-m%i", gId),
439 barrel_r[gId] =
new TH2F(Form(
"EBr%i", gId),
447 endc_p_r[gId] =
new TH2F(Form(
"EE+r%i", gId),
455 endc_m_r[gId] =
new TH2F(Form(
"EE-r%i", gId),
470 unsigned int run[2], irun = 0;
474 for (
auto const& iov : iovs) {
475 std::shared_ptr<EcalPedestals>
payload = fetchPayload(std::get<1>(iov));
476 run[irun] = std::get<0>(iov);
479 if (
payload->barrelItems().empty())
487 meanEB[0][cellid] = (*payload)[rawid].mean_x12;
488 rmsEB[0][cellid] = (*payload)[rawid].rms_x12;
489 meanEB[1][cellid] = (*payload)[rawid].mean_x6;
490 rmsEB[1][cellid] = (*payload)[rawid].rms_x6;
491 meanEB[2][cellid] = (*payload)[rawid].mean_x1;
492 rmsEB[2][cellid] = (*payload)[rawid].rms_x1;
500 barrel_m[0]->Fill(
phi,
eta, (*
payload)[rawid].mean_x12 - meanEB[0][cellid]);
501 double diff = (*payload)[rawid].rms_x12 - rmsEB[0][cellid];
504 EBmean[0] = EBmean[0] +
diff;
509 barrel_m[1]->Fill(
phi,
eta, (*
payload)[rawid].mean_x6 - meanEB[1][cellid]);
510 diff = (*payload)[rawid].rms_x6 - rmsEB[1][cellid];
513 EBmean[1] = EBmean[1] +
diff;
518 barrel_m[2]->Fill(
phi,
eta, (*
payload)[rawid].mean_x1 - meanEB[2][cellid]);
519 diff = (*payload)[rawid].rms_x1 - rmsEB[2][cellid];
522 EBmean[2] = EBmean[2] +
diff;
530 if (
payload->endcapItems().empty())
533 for (
int iz = -1; iz < 2; iz = iz + 2) {
538 uint32_t rawid = myEEId.
rawId();
543 meanEE[0][
index] = (*payload)[rawid].mean_x12;
544 rmsEE[0][
index] = (*payload)[rawid].rms_x12;
545 meanEE[1][
index] = (*payload)[rawid].mean_x6;
546 rmsEE[1][
index] = (*payload)[rawid].rms_x6;
547 meanEE[2][
index] = (*payload)[rawid].mean_x1;
548 rmsEE[2][
index] = (*payload)[rawid].rms_x1;
552 endc_p_m[0]->Fill(ix, iy, (*
payload)[rawid].mean_x12 - meanEE[0][
index]);
553 double diff = (*payload)[rawid].rms_x12 - rmsEE[0][
index];
554 endc_p_r[0]->Fill(ix, iy, rmsEE[0][
index] - (*
payload)[rawid].rms_x12);
556 EEmean[0] = EEmean[0] +
diff;
561 endc_p_m[1]->Fill(ix, iy, (*
payload)[rawid].mean_x6 - meanEE[1][
index]);
562 diff = (*payload)[rawid].rms_x6 - rmsEE[1][
index];
563 endc_p_r[1]->Fill(ix, iy,
diff);
565 EEmean[1] = EEmean[1] +
diff;
570 endc_p_m[2]->Fill(ix, iy, (*
payload)[rawid].mean_x1 - meanEE[2][
index]);
571 diff = (*payload)[rawid].rms_x1 - rmsEE[2][
index];
572 endc_p_r[2]->Fill(ix, iy,
diff);
574 EEmean[2] = EEmean[2] +
diff;
581 endc_m_m[0]->Fill(ix, iy, (*
payload)[rawid].mean_x12 - meanEE[0][
index]);
582 double diff = (*payload)[rawid].rms_x12 - rmsEE[0][
index];
583 endc_m_r[0]->Fill(ix, iy, rmsEE[0][
index] - (*
payload)[rawid].rms_x12);
585 EEmean[0] = EEmean[0] +
diff;
590 endc_m_m[1]->Fill(ix, iy, (*
payload)[rawid].mean_x6 - meanEE[1][
index]);
591 diff = (*payload)[rawid].rms_x6 - rmsEE[1][
index];
592 endc_m_r[1]->Fill(ix, iy,
diff);
594 EEmean[1] = EEmean[1] +
diff;
599 endc_m_m[2]->Fill(ix, iy, (*
payload)[rawid].mean_x1 - meanEE[2][
index]);
600 diff = (*payload)[rawid].rms_x1 - rmsEE[2][
index];
601 endc_m_r[2]->Fill(ix, iy,
diff);
603 EEmean[2] = EEmean[2] +
diff;
620 gStyle->SetPalette(1);
621 gStyle->SetOptStat(0);
622 TCanvas
canvas(
"CC map",
"CC map", 1600, 2600);
626 t1.SetTextSize(0.05);
627 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Pedestals, IOV %i - %i",
run[1],
run[0]));
629 float xmi[3] = {0.0, 0.24, 0.76};
630 float xma[3] = {0.24, 0.76, 1.00};
631 TPad*** pad =
new TPad**[6];
633 for (
int gId = 0; gId <
kGains; gId++) {
635 pad[view] =
new TPad*[3];
637 float yma = 0.94 - (0.16 * view);
638 float ymi = yma - 0.14;
640 new TPad(Form(
"p_%i_%i",
obj, view), Form(
"p_%i_%i",
obj, view), xmi[
obj], ymi, xma[
obj], yma);
641 pad[view][
obj]->Draw();
645 double vt = (double)EBtot[gId];
646 EBmean[gId] = EBmean[gId] / vt;
647 EBrms[gId] = (EBrms[gId] / vt) - (EBmean[gId] * EBmean[gId]);
648 EBrms[gId] =
sqrt(EBrms[gId]);
649 if (EBrms[gId] == 0.)
651 pEBmin[gId] = EBmean[gId] - kRMS * EBrms[gId];
652 pEBmax[gId] = EBmean[gId] + kRMS * EBrms[gId];
655 vt = (double)EEtot[gId];
656 EEmean[gId] = EEmean[gId] / vt;
657 EErms[gId] = (EErms[gId] / vt) - (EEmean[gId] * EEmean[gId]);
658 EErms[gId] =
sqrt(EErms[gId]);
659 if (EErms[gId] == 0.)
661 pEEmin[gId] = EEmean[gId] - kRMS * EErms[gId];
662 pEEmax[gId] = EEmean[gId] + kRMS * EErms[gId];
666 for (
int gId = 0; gId <
kGains; gId++) {
668 DrawEE(endc_m_m[gId], -2., 2.);
669 pad[gId +
kGains][0]->cd();
670 DrawEE(endc_m_r[gId], pEEmin[gId], pEEmax[gId]);
672 DrawEB(barrel_m[gId], -2., 2.);
673 pad[gId +
kGains][1]->cd();
674 DrawEB(barrel_r[gId], pEBmin[gId], pEBmax[gId]);
676 DrawEE(endc_p_m[gId], -2., 2.);
677 pad[gId +
kGains][2]->cd();
678 DrawEE(endc_p_r[gId], pEEmin[gId], pEEmax[gId]);
682 canvas.SaveAs(ImageName.c_str());
694 EcalPedestalsEBMean12Map()
695 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel pedestal gain12 - map",
704 Base::setSingleIov(
true);
708 bool fill()
override {
709 auto tag = PlotBase::getTag<0>();
710 for (
auto const& iov :
tag.iovs) {
711 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
714 if (
payload->barrelItems().empty())
722 if (!(*
payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
730 float valped = (*payload)[rawid].mean_x12;
744 EcalPedestalsEBMean6Map()
745 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel pedestal gain6 - map",
754 Base::setSingleIov(
true);
757 bool fill()
override {
758 auto tag = PlotBase::getTag<0>();
759 for (
auto const& iov :
tag.iovs) {
760 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
763 if (
payload->barrelItems().empty())
771 if (!(*
payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
775 float valped = (*payload)[rawid].mean_x6;
789 EcalPedestalsEBMean1Map()
790 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel pedestal gain1 - map",
799 Base::setSingleIov(
true);
802 bool fill()
override {
803 auto tag = PlotBase::getTag<0>();
804 for (
auto const& iov :
tag.iovs) {
805 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
808 if (
payload->barrelItems().empty())
816 if (!(*
payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x1)
820 float valped = (*payload)[rawid].mean_x1;
834 EcalPedestalsEEMean12Map()
835 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap pedestal gain12 - map",
844 Base::setSingleIov(
true);
848 bool fill()
override {
849 auto tag = PlotBase::getTag<0>();
850 for (
auto const& iov :
tag.iovs) {
851 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
853 if (
payload->endcapItems().empty())
857 for (
int iz = -1; iz < 2; iz = iz + 2)
862 uint32_t rawid = myEEId.
rawId();
866 if (!(*
payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
869 float valped = (*payload)[rawid].mean_x12;
874 fillWithValue(ix, iy, valped);
876 fillWithValue(ix +
IX_MAX + 20, iy, valped);
887 EcalPedestalsEEMean6Map()
888 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap pedestal gain6 - map",
897 Base::setSingleIov(
true);
900 bool fill()
override {
901 auto tag = PlotBase::getTag<0>();
902 for (
auto const& iov :
tag.iovs) {
903 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
905 if (
payload->endcapItems().empty())
909 for (
int iz = -1; iz < 2; iz = iz + 2)
914 uint32_t rawid = myEEId.
rawId();
918 if (!(*
payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
921 float valped = (*payload)[rawid].mean_x6;
926 fillWithValue(ix, iy, valped);
928 fillWithValue(ix +
IX_MAX + 20, iy, valped);
938 EcalPedestalsEEMean1Map()
939 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap pedestal gain1 - map",
948 Base::setSingleIov(
true);
951 bool fill()
override {
952 auto tag = PlotBase::getTag<0>();
953 for (
auto const& iov :
tag.iovs) {
954 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
956 if (
payload->endcapItems().empty())
960 for (
int iz = -1; iz < 2; iz = iz + 2)
965 uint32_t rawid = myEEId.
rawId();
969 if (!(*
payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x12)
972 float valped = (*payload)[rawid].mean_x1;
977 fillWithValue(ix, iy, valped);
979 fillWithValue(ix +
IX_MAX + 20, iy, valped);
989 EcalPedestalsEBRMS12Map()
990 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel noise gain12 - map",
999 Base::setSingleIov(
true);
1003 bool fill()
override {
1004 auto tag = PlotBase::getTag<0>();
1005 for (
auto const& iov :
tag.iovs) {
1006 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
1009 if (
payload->barrelItems().empty())
1017 if (!(*
payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
1025 float valrms = (*payload)[rawid].rms_x12;
1038 EcalPedestalsEBRMS6Map()
1039 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel noise gain6 - map",
1048 Base::setSingleIov(
true);
1051 bool fill()
override {
1052 auto tag = PlotBase::getTag<0>();
1053 for (
auto const& iov :
tag.iovs) {
1054 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
1057 if (
payload->barrelItems().empty())
1065 if (!(*
payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
1069 float valrms = (*payload)[rawid].rms_x6;
1082 EcalPedestalsEBRMS1Map()
1083 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel noise gain1 - map",
1092 Base::setSingleIov(
true);
1095 bool fill()
override {
1096 auto tag = PlotBase::getTag<0>();
1097 for (
auto const& iov :
tag.iovs) {
1098 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
1101 if (
payload->barrelItems().empty())
1109 if (!(*
payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x1)
1113 float valrms = (*payload)[rawid].rms_x1;
1126 EcalPedestalsEERMS12Map()
1127 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap noise gain12 - map",
1136 Base::setSingleIov(
true);
1140 bool fill()
override {
1141 auto tag = PlotBase::getTag<0>();
1142 for (
auto const& iov :
tag.iovs) {
1143 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
1145 if (
payload->endcapItems().empty())
1149 for (
int iz = -1; iz < 2; iz = iz + 2)
1154 uint32_t rawid = myEEId.
rawId();
1158 if (!(*
payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
1161 float valrms = (*payload)[rawid].rms_x12;
1165 fillWithValue(ix, iy, valrms);
1167 fillWithValue(ix +
IX_MAX + 20, iy, valrms);
1178 EcalPedestalsEERMS6Map()
1179 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap noise gain6 - map",
1188 Base::setSingleIov(
true);
1191 bool fill()
override {
1192 auto tag = PlotBase::getTag<0>();
1193 for (
auto const& iov :
tag.iovs) {
1194 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
1196 if (
payload->endcapItems().empty())
1200 for (
int iz = -1; iz < 2; iz = iz + 2)
1205 uint32_t rawid = myEEId.
rawId();
1209 if (!(*
payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
1212 float valrms = (*payload)[rawid].rms_x6;
1216 fillWithValue(ix, iy, valrms);
1218 fillWithValue(ix +
IX_MAX + 20, iy, valrms);
1228 EcalPedestalsEERMS1Map()
1229 :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap noise gain1 - map",
1238 Base::setSingleIov(
true);
1241 bool fill()
override {
1242 auto tag = PlotBase::getTag<0>();
1243 for (
auto const& iov :
tag.iovs) {
1244 std::shared_ptr<EcalPedestals>
payload = Base::fetchPayload(std::get<1>(iov));
1246 if (
payload->endcapItems().empty())
1250 for (
int iz = -1; iz < 2; iz = iz + 2)
1255 uint32_t rawid = myEEId.
rawId();
1259 if (!(*
payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x12)
1262 float valrms = (*payload)[rawid].rms_x1;
1266 fillWithValue(ix, iy, valrms);
1268 fillWithValue(ix +
IX_MAX + 20, iy, valrms);
1281 EcalPedestalsSummaryPlot() :
cond::payloadInspector::PlotImage<
EcalPedestals>(
"Ecal Pedestals Summary - map ") {
1285 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
1286 auto iov = iovs.front();
1287 std::shared_ptr<EcalPedestals>
payload =
1288 fetchPayload(std::get<1>(iov));
1289 unsigned int run = std::get<0>(iov);
1297 align =
new TH2F(
"Ecal Pedestals Summary",
1298 "EB/EE Gain Mean RMS Total Items",
1306 float ebVals[] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
1307 float eeVals[] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
1309 long unsigned int ebTotal = (
payload->barrelItems()).
size();
1310 long unsigned int eeTotal = (
payload->endcapItems()).
size();
1312 pedestalsSummary(
payload->barrelItems(), ebVals, ebTotal);
1313 pedestalsSummary(
payload->endcapItems(), eeVals, eeTotal);
1315 double row = NbRows - 0.5;
1318 align->Fill(1.5, row, 12);
1319 align->Fill(2.5, row, ebVals[0]);
1320 align->Fill(3.5, row, ebVals[1]);
1324 align->Fill(0.5, row, 1);
1325 align->Fill(1.5, row, 6);
1326 align->Fill(2.5, row, ebVals[2]);
1327 align->Fill(3.5, row, ebVals[3]);
1328 align->Fill(4.5, row, ebTotal);
1332 align->Fill(1.5, row, 1);
1333 align->Fill(2.5, row, ebVals[4]);
1334 align->Fill(3.5, row, ebVals[5]);
1339 align->Fill(1.5, row, 12);
1340 align->Fill(2.5, row, eeVals[0]);
1341 align->Fill(3.5, row, eeVals[1]);
1345 align->Fill(0.5, row, 2);
1346 align->Fill(1.5, row, 6);
1347 align->Fill(2.5, row, eeVals[2]);
1348 align->Fill(3.5, row, eeVals[3]);
1349 align->Fill(4.5, row, eeTotal);
1353 align->Fill(1.5, row, 1);
1354 align->Fill(2.5, row, eeVals[4]);
1355 align->Fill(3.5, row, eeVals[5]);
1361 gStyle->SetPalette(1);
1362 gStyle->SetOptStat(0);
1363 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
1366 t1.SetTextAlign(26);
1367 t1.SetTextSize(0.05);
1369 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Pedestals Summary, IOV %i",
run));
1371 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
1374 align->Draw(
"TEXT");
1375 TLine*
l =
new TLine;
1378 for (
int i = 1;
i < NbRows;
i++) {
1379 double y = (double)
i;
1380 if (
i == NbRows / 2)
1381 l =
new TLine(0.,
y, NbColumns,
y);
1383 l =
new TLine(1.,
y, NbColumns - 1,
y);
1387 for (
int i = 1;
i < NbColumns;
i++) {
1388 double x = (double)
i;
1389 double y = (double)NbRows;
1390 l =
new TLine(
x, 0.,
x,
y);
1394 align->GetXaxis()->SetTickLength(0.);
1395 align->GetXaxis()->SetLabelSize(0.);
1396 align->GetYaxis()->SetTickLength(0.);
1397 align->GetYaxis()->SetLabelSize(0.);
1400 canvas.SaveAs(ImageName.c_str());
1404 void pedestalsSummary(std::vector<EcalPedestal> vItems,
float vals[],
long unsigned int&
total) {
1405 for (std::vector<EcalPedestal>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems) {
1407 vals[0] += iItems->mean(1);
1408 vals[1] += iItems->rms(1);
1409 vals[2] += iItems->mean(2);
1410 vals[3] += iItems->rms(2);
1411 vals[4] += iItems->mean(3);
1412 vals[5] += iItems->rms(3);
1415 vals[0] = vals[0] /
total;
1416 vals[1] = vals[1] /
total;
1417 vals[2] = vals[2] /
total;
1418 vals[3] = vals[3] /
total;
1419 vals[4] = vals[4] /
total;
1420 vals[5] = vals[5] /
total;