22 enum {MIN_IETA = 1, MIN_IPHI = 1, MAX_IETA = 85, MAX_IPHI = 360};
23 enum {IX_MIN = 1, IY_MIN = 1, IX_MAX = 100, IY_MAX = 100};
31 EcalPedestalsHist() :
cond::payloadInspector::PlotImage<
EcalPedestals>(
"ECAL pedestal map") {
34 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
35 uint32_t gainValues[kGains] = {12, 6, 1};
36 TH1F** barrel_m =
new TH1F*[kGains];
37 TH1F** endcap_m =
new TH1F*[kGains];
38 TH1F** barrel_r =
new TH1F*[kGains];
39 TH1F** endcap_r =
new TH1F*[kGains];
40 float bmin[kGains] ={0.7, 0.5, 0.4};
41 float bmax[kGains] ={2.2, 1.3, 0.7};
42 float emin[kGains] ={1.5, 0.8, 0.4};
43 float emax[kGains] ={2.5, 1.5, 0.8};
45 barrel_m[
gainId] =
new TH1F(Form(
"EBm%i",
gainId), Form(
"mean %i EB", gainValues[
gainId]), 100, 150., 250.);
46 endcap_m[
gainId] =
new TH1F(Form(
"EEm%i",
gainId), Form(
"mean %i EE", gainValues[
gainId]), 100, 150., 250.);
47 barrel_r[
gainId] =
new TH1F(Form(
"EBr%i",
gainId), Form(
"rms %i EB", gainValues[
gainId]), 100, bmin[gainId], bmax[gainId]);
48 endcap_r[
gainId] =
new TH1F(Form(
"EEr%i",
gainId), Form(
"rms %i EE", gainValues[
gainId]), 100, emin[gainId], emax[gainId]);
50 auto iov = iovs.front();
51 std::shared_ptr<EcalPedestals>
payload = fetchPayload( std::get<1>(iov) );
52 unsigned int run = std::get<0>(iov);
55 if (payload->barrelItems().empty())
return false;
60 if (payload->find(rawid) == payload->end())
continue;
61 barrel_m[0]->Fill((*payload)[rawid].mean_x12);
62 barrel_r[0]->Fill((*payload)[rawid].rms_x12);
63 barrel_m[1]->Fill((*payload)[rawid].mean_x6);
64 barrel_r[1]->Fill((*payload)[rawid].rms_x6);
65 barrel_m[2]->Fill((*payload)[rawid].mean_x1);
66 barrel_r[2]->Fill((*payload)[rawid].rms_x1);
68 if (payload->endcapItems().empty())
return false;
71 for(
int iz = -1; iz < 2; iz = iz + 2)
72 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
73 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
76 uint32_t rawid = myEEId.
rawId();
77 if (payload->find(rawid) == payload->end())
continue;
78 endcap_m[0]->Fill((*payload)[rawid].mean_x12);
79 endcap_r[0]->Fill((*payload)[rawid].rms_x12);
80 endcap_m[1]->Fill((*payload)[rawid].mean_x6);
81 endcap_r[1]->Fill((*payload)[rawid].rms_x6);
82 endcap_m[2]->Fill((*payload)[rawid].mean_x1);
83 endcap_r[2]->Fill((*payload)[rawid].rms_x1);
88 gStyle->SetPalette(1);
89 gStyle->SetOptStat(111110);
90 TCanvas
canvas(
"CC map",
"CC map", 1600, 2600);
95 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Pedestals, IOV %i", run));
97 float xmi[2] = {0.0 , 0.50};
98 float xma[2] = {0.50, 1.00};
99 TPad*** pad =
new TPad**[6];
100 for (
int gId = 0; gId < 6; gId++) {
101 pad[gId] =
new TPad*[2];
105 float yma = 0.94- (0.16 * gId);
106 float ymi = yma - 0.14;
107 pad[gId][
obj] =
new TPad(Form(
"p_%i_%i",
obj, gId),Form(
"p_%i_%i",
obj, gId),
108 xmi[
obj], ymi, xma[obj], yma);
109 pad[gId][
obj]->Draw();
112 for (
int gId = 0; gId < kGains; gId++) {
114 barrel_m[gId]->Draw();
115 pad[gId + kGains][0]->cd();
116 barrel_r[gId]->Draw();
118 endcap_m[gId]->Draw();
119 pad[gId + kGains][1]->cd();
120 endcap_r[gId]->Draw();
124 canvas.SaveAs(ImageName.c_str());
136 EcalPedestalsPlot() :
cond::payloadInspector::PlotImage<
EcalPedestals>(
"ECAL pedestal map") {
139 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
140 uint32_t gainValues[kGains] = {12, 6, 1};
141 TH2F** barrel_m =
new TH2F*[kGains];
142 TH2F** endc_p_m =
new TH2F*[kGains];
143 TH2F** endc_m_m =
new TH2F*[kGains];
144 TH2F** barrel_r =
new TH2F*[kGains];
145 TH2F** endc_p_r =
new TH2F*[kGains];
146 TH2F** endc_m_r =
new TH2F*[kGains];
147 double EBmean[kGains], EBrms[kGains], EEmean[kGains], EErms[kGains], pEBmin[kGains], pEBmax[kGains], pEEmin[kGains], pEEmax[kGains];
148 int EBtot[kGains], EEtot[kGains];
149 for (
int gId = 0; gId < kGains; gId++) {
150 barrel_m[gId] =
new TH2F(Form(
"EBm%i", gId),Form(
"mean %i EB", gainValues[gId]), MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA);
151 endc_p_m[gId] =
new TH2F(Form(
"EE+m%i",gId),Form(
"mean %i EE+",gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
152 endc_m_m[gId] =
new TH2F(Form(
"EE-m%i",gId),Form(
"mean %i EE-",gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
153 barrel_r[gId] =
new TH2F(Form(
"EBr%i", gId),Form(
"rms %i EB", gainValues[gId]), MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA);
154 endc_p_r[gId] =
new TH2F(Form(
"EE+r%i",gId),Form(
"rms %i EE+", gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
155 endc_m_r[gId] =
new TH2F(Form(
"EE-r%i",gId),Form(
"rms %i EE-", gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
163 auto iov = iovs.front();
164 std::shared_ptr<EcalPedestals> payload = fetchPayload( std::get<1>(iov) );
165 unsigned int run = std::get<0>(iov);
168 if (payload->barrelItems().empty())
return false;
171 if (payload->find(rawid) == payload->end())
continue;
172 Double_t
phi = (Double_t)(
EBDetId(rawid)).iphi() - 0.5;
173 Double_t
eta = (Double_t)(
EBDetId(rawid)).ieta();
174 if(eta > 0.) eta = eta - 0.5;
175 else eta = eta + 0.5;
176 barrel_m[0]->Fill(phi, eta, (*payload)[rawid].mean_x12);
177 Double_t
val =(*payload)[rawid].rms_x12;
178 barrel_r[0]->Fill(phi, eta, val);
180 EBmean[0] = EBmean[0] +
val;
181 EBrms[0] = EBrms[0] + val *
val;
185 barrel_m[1]->Fill(phi, eta, (*payload)[rawid].mean_x6);
186 val =(*payload)[rawid].rms_x6;
187 barrel_r[1]->Fill(phi, eta, val);
189 EBmean[1] = EBmean[1] +
val;
190 EBrms[1] = EBrms[1] + val *
val;
194 barrel_m[2]->Fill(phi, eta, (*payload)[rawid].mean_x1);
195 val =(*payload)[rawid].rms_x1;
196 barrel_r[2]->Fill(phi, eta, val);
198 EBmean[2] = EBmean[2] +
val;
199 EBrms[2] = EBrms[2] + val *
val;
204 if (payload->endcapItems().empty())
return false;
207 for(
int iz = -1; iz < 2; iz = iz + 2)
208 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
209 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
212 uint32_t rawid = myEEId.
rawId();
213 if (payload->find(rawid) == payload->end())
continue;
215 endc_p_m[0]->Fill(ix, iy, (*payload)[rawid].mean_x12);
216 Double_t val = (*payload)[rawid].rms_x12;
217 endc_p_r[0]->Fill(ix, iy, val);
219 EEmean[0] = EEmean[0] +
val;
220 EErms[0] = EErms[0] + val *
val;
223 endc_p_m[1]->Fill(ix, iy, (*payload)[rawid].mean_x6);
224 val = (*payload)[rawid].rms_x6;
225 endc_p_r[1]->Fill(ix, iy, val);
227 EEmean[1] = EEmean[1] +
val;
228 EErms[1] = EErms[1] + val *
val;
231 endc_p_m[2]->Fill(ix, iy, (*payload)[rawid].mean_x1);
232 val = (*payload)[rawid].rms_x1;
233 endc_p_r[2]->Fill(ix, iy, val);
235 EEmean[2] = EEmean[2] +
val;
236 EErms[2] = EErms[2] + val *
val;
241 endc_m_m[0]->Fill(ix, iy, (*payload)[rawid].mean_x12);
242 Double_t val = (*payload)[rawid].rms_x12;
243 endc_m_r[0]->Fill(ix, iy, val);
245 EEmean[0] = EEmean[0] +
val;
246 EErms[0] = EErms[0] + val *
val;
249 endc_m_m[1]->Fill(ix, iy, (*payload)[rawid].mean_x6);
250 val = (*payload)[rawid].rms_x6;
251 endc_m_r[1]->Fill(ix, iy, val);
253 EEmean[1] = EEmean[1] +
val;
254 EErms[1] = EErms[1] + val *
val;
257 endc_m_m[2]->Fill(ix, iy, (*payload)[rawid].mean_x1);
258 val = (*payload)[rawid].rms_x1;
259 endc_m_r[2]->Fill(ix, iy, val);
261 EEmean[2] = EEmean[2] +
val;
262 EErms[2] = EErms[2] + val *
val;
270 gStyle->SetPalette(1);
271 gStyle->SetOptStat(0);
272 TCanvas
canvas(
"CC map",
"CC map", 1600, 2600);
276 t1.SetTextSize(0.05);
277 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Pedestals, IOV %i", run));
279 float xmi[3] = {0.0 , 0.24, 0.76};
280 float xma[3] = {0.24, 0.76, 1.00};
281 TPad*** pad =
new TPad**[6];
283 for (
int gId = 0; gId < kGains; gId++) {
284 for (
int val = 0; val < 2; val++) {
285 pad[view] =
new TPad*[3];
287 float yma = 0.94- (0.16 * view);
288 float ymi = yma - 0.14;
289 pad[view][
obj] =
new TPad(Form(
"p_%i_%i",
obj, view),Form(
"p_%i_%i",
obj, view),
290 xmi[
obj], ymi, xma[obj], yma);
291 pad[view][
obj]->Draw();
295 double vt =(double)EBtot[gId];
296 EBmean[gId] = EBmean[gId] / vt;
297 EBrms[gId] = (EBrms[gId] / vt) - (EBmean[gId] * EBmean[gId]);
298 EBrms[gId] =
sqrt(EBrms[gId]);
299 if(EBrms[gId] == 0.) EBrms[gId] = 0.001;
300 pEBmin[gId] = EBmean[gId] - kRMS * EBrms[gId];
301 pEBmax[gId] = EBmean[gId] + kRMS * EBrms[gId];
304 if(pEBmin[gId] < 0.) pEBmin[gId] = 0.;
305 vt =(double)EEtot[gId];
306 EEmean[gId] = EEmean[gId] / vt;
307 EErms[gId] = (EErms[gId] / vt) -(EEmean[gId] * EEmean[gId]);
308 EErms[gId] =
sqrt(EErms[gId]);
309 if(EErms[gId] == 0.) EErms[gId] = 0.001;
310 pEEmin[gId] = EEmean[gId] - kRMS * EErms[gId];
311 pEEmax[gId] = EEmean[gId] + kRMS * EErms[gId];
314 if(pEEmin[gId] < 0.) pEEmin[gId] = 0.;
322 for (
int gId = 0; gId < kGains; gId++) {
324 DrawEE(endc_m_m[gId], 175., 225.);
325 pad[gId + kGains][0]->cd();
326 DrawEE(endc_m_r[gId], pEEmin[gId], pEEmax[gId]);
328 DrawEB(barrel_m[gId], 175., 225.);
329 pad[gId + kGains][1]->cd();
330 DrawEB(barrel_r[gId], pEBmin[gId], pEBmax[gId]);
332 DrawEE(endc_p_m[gId], 175., 225.);
333 pad[gId + kGains][2]->cd();
334 DrawEE(endc_p_r[gId], pEEmin[gId], pEEmax[gId]);
338 canvas.SaveAs(ImageName.c_str());
350 EcalPedestalsDiff() :
cond::payloadInspector::PlotImage<
EcalPedestals>(
"ECAL Barrel channel status difference") {
353 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
354 uint32_t gainValues[kGains] = {12, 6, 1};
355 TH2F** barrel_m =
new TH2F*[kGains];
356 TH2F** endc_p_m =
new TH2F*[kGains];
357 TH2F** endc_m_m =
new TH2F*[kGains];
358 TH2F** barrel_r =
new TH2F*[kGains];
359 TH2F** endc_p_r =
new TH2F*[kGains];
360 TH2F** endc_m_r =
new TH2F*[kGains];
361 double EBmean[kGains], EBrms[kGains], EEmean[kGains], EErms[kGains], pEBmin[kGains], pEBmax[kGains], pEEmin[kGains], pEEmax[kGains];
362 int EBtot[kGains], EEtot[kGains];
363 for (
int gId = 0; gId < kGains; gId++) {
364 barrel_m[gId] =
new TH2F(Form(
"EBm%i", gId),Form(
"mean %i EB", gainValues[gId]), MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA);
365 endc_p_m[gId] =
new TH2F(Form(
"EE+m%i",gId),Form(
"mean %i EE+",gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
366 endc_m_m[gId] =
new TH2F(Form(
"EE-m%i",gId),Form(
"mean %i EE-",gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
367 barrel_r[gId] =
new TH2F(Form(
"EBr%i", gId),Form(
"rms %i EB", gainValues[gId]), MAX_IPHI, 0, MAX_IPHI, 2 * MAX_IETA, -MAX_IETA, MAX_IETA);
368 endc_p_r[gId] =
new TH2F(Form(
"EE+r%i",gId),Form(
"rms %i EE+", gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
369 endc_m_r[gId] =
new TH2F(Form(
"EE-r%i",gId),Form(
"rms %i EE-", gainValues[gId]), IX_MAX, IX_MIN, IX_MAX + 1, IY_MAX, IY_MIN, IY_MAX + 1);
377 unsigned int run[2], irun = 0;
380 for (
auto const & iov: iovs) {
381 std::shared_ptr<EcalPedestals> payload = fetchPayload( std::get<1>(iov) );
382 run[irun] = std::get<0>(iov);
385 if (payload->barrelItems().empty())
return false;
390 if (payload->find(rawid) == payload->end())
continue;
393 meanEB[0][cellid] = (*payload)[rawid].mean_x12;
394 rmsEB[0][cellid] = (*payload)[rawid].rms_x12;
395 meanEB[1][cellid] = (*payload)[rawid].mean_x6;
396 rmsEB[1][cellid] = (*payload)[rawid].rms_x6;
397 meanEB[2][cellid] = (*payload)[rawid].mean_x1;
398 rmsEB[2][cellid] = (*payload)[rawid].rms_x1;
401 Double_t phi = (Double_t)(
EBDetId(rawid)).iphi() - 0.5;
402 Double_t eta = (Double_t)(
EBDetId(rawid)).ieta();
403 if(eta > 0.) eta = eta - 0.5;
404 else eta = eta + 0.5;
405 barrel_m[0]->Fill(phi, eta, (*payload)[rawid].mean_x12 - meanEB[0][cellid]);
406 double diff = (*payload)[rawid].rms_x12 - rmsEB[0][cellid];
407 barrel_r[0]->Fill(phi, eta, diff);
409 EBmean[0] = EBmean[0] +
diff;
410 EBrms[0] = EBrms[0] + diff *
diff;
414 barrel_m[1]->Fill(phi, eta,(*payload)[rawid].mean_x6 - meanEB[1][cellid]);
415 diff = (*payload)[rawid].rms_x6 - rmsEB[1][cellid];
416 barrel_r[1]->Fill(phi, eta, diff);
418 EBmean[1] = EBmean[1] +
diff;
419 EBrms[1] = EBrms[1] + diff *
diff;
423 barrel_m[2]->Fill(phi, eta, (*payload)[rawid].mean_x1 - meanEB[2][cellid]);
424 diff = (*payload)[rawid].rms_x1 - rmsEB[2][cellid];
425 barrel_r[2]->Fill(phi, eta, diff);
427 EBmean[2] = EBmean[2] +
diff;
428 EBrms[2] = EBrms[2] + diff *
diff;
435 if (payload->endcapItems().empty())
return false;
437 for(
int iz = -1; iz < 2; iz = iz + 2) {
438 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++) {
439 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++) {
442 uint32_t rawid = myEEId.
rawId();
444 if (payload->find(rawid) == payload->end())
continue;
446 meanEE[0][
index] = (*payload)[rawid].mean_x12;
447 rmsEE[0][
index] = (*payload)[rawid].rms_x12;
448 meanEE[1][
index] = (*payload)[rawid].mean_x6;
449 rmsEE[1][
index] = (*payload)[rawid].rms_x6;
450 meanEE[2][
index] = (*payload)[rawid].mean_x1;
451 rmsEE[2][
index] = (*payload)[rawid].rms_x1;
455 endc_p_m[0]->Fill(ix, iy, (*payload)[rawid].mean_x12 - meanEE[0][index]);
456 double diff = (*payload)[rawid].rms_x12 - rmsEE[0][
index];
457 endc_p_r[0]->Fill(ix, iy, rmsEE[0][index] - (*payload)[rawid].rms_x12);
459 EEmean[0] = EEmean[0] +
diff;
460 EErms[0] = EErms[0] + diff *
diff;
464 endc_p_m[1]->Fill(ix, iy, (*payload)[rawid].mean_x6 - meanEE[1][index]);
465 diff = (*payload)[rawid].rms_x6 - rmsEE[1][
index];
466 endc_p_r[1]->Fill(ix, iy, diff);
468 EEmean[1] = EEmean[1] +
diff;
469 EErms[1] = EErms[1] + diff *
diff;
473 endc_p_m[2]->Fill(ix, iy, (*payload)[rawid].mean_x1 - meanEE[2][index]);
474 diff = (*payload)[rawid].rms_x1 - rmsEE[2][
index];
475 endc_p_r[2]->Fill(ix, iy, diff);
477 EEmean[2] = EEmean[2] +
diff;
478 EErms[2] = EErms[2] + diff *
diff;
484 endc_m_m[0]->Fill(ix, iy, (*payload)[rawid].mean_x12 - meanEE[0][index]);
485 double diff = (*payload)[rawid].rms_x12 - rmsEE[0][
index];
486 endc_m_r[0]->Fill(ix, iy, rmsEE[0][index] - (*payload)[rawid].rms_x12);
488 EEmean[0] = EEmean[0] +
diff;
489 EErms[0] = EErms[0] + diff *
diff;
493 endc_m_m[1]->Fill(ix, iy, (*payload)[rawid].mean_x6 - meanEE[1][index]);
494 diff = (*payload)[rawid].rms_x6 - rmsEE[1][
index];
495 endc_m_r[1]->Fill(ix, iy, diff);
497 EEmean[1] = EEmean[1] +
diff;
498 EErms[1] = EErms[1] + diff *
diff;
502 endc_m_m[2]->Fill(ix, iy, (*payload)[rawid].mean_x1 - meanEE[2][index]);
503 diff = (*payload)[rawid].rms_x1 - rmsEE[2][
index];
504 endc_m_r[2]->Fill(ix, iy, diff);
506 EEmean[2] = EEmean[2] +
diff;
507 EErms[2] = EErms[2] + diff *
diff;
522 gStyle->SetPalette(1);
523 gStyle->SetOptStat(0);
524 TCanvas
canvas(
"CC map",
"CC map", 1600, 2600);
528 t1.SetTextSize(0.05);
529 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Pedestals, IOV %i - %i", run[1], run[0]));
531 float xmi[3] = {0.0 , 0.24, 0.76};
532 float xma[3] = {0.24, 0.76, 1.00};
533 TPad*** pad =
new TPad**[6];
535 for (
int gId = 0; gId < kGains; gId++) {
536 for (
int val = 0; val < 2; val++) {
537 pad[view] =
new TPad*[3];
539 float yma = 0.94- (0.16 * view);
540 float ymi = yma - 0.14;
541 pad[view][
obj] =
new TPad(Form(
"p_%i_%i",
obj, view),Form(
"p_%i_%i",
obj, view),
542 xmi[
obj], ymi, xma[obj], yma);
543 pad[view][
obj]->Draw();
547 double vt =(double)EBtot[gId];
548 EBmean[gId] = EBmean[gId] / vt;
549 EBrms[gId] = (EBrms[gId] / vt) - (EBmean[gId] * EBmean[gId]);
550 EBrms[gId] =
sqrt(EBrms[gId]);
551 if(EBrms[gId] == 0.) EBrms[gId] = 0.001;
552 pEBmin[gId] = EBmean[gId] - kRMS * EBrms[gId];
553 pEBmax[gId] = EBmean[gId] + kRMS * EBrms[gId];
556 vt =(double)EEtot[gId];
557 EEmean[gId] = EEmean[gId] / vt;
558 EErms[gId] = (EErms[gId] / vt) -(EEmean[gId] * EEmean[gId]);
559 EErms[gId] =
sqrt(EErms[gId]);
560 if(EErms[gId] == 0.) EErms[gId] = 0.001;
561 pEEmin[gId] = EEmean[gId] - kRMS * EErms[gId];
562 pEEmax[gId] = EEmean[gId] + kRMS * EErms[gId];
566 for (
int gId = 0; gId < kGains; gId++) {
568 DrawEE(endc_m_m[gId], -2., 2.);
569 pad[gId + kGains][0]->cd();
570 DrawEE(endc_m_r[gId], pEEmin[gId], pEEmax[gId]);
572 DrawEB(barrel_m[gId], -2., 2.);
573 pad[gId + kGains][1]->cd();
574 DrawEB(barrel_r[gId], pEBmin[gId], pEBmax[gId]);
576 DrawEE(endc_p_m[gId], -2., 2.);
577 pad[gId + kGains][2]->cd();
578 DrawEE(endc_p_r[gId], pEEmin[gId], pEEmax[gId]);
582 canvas.SaveAs(ImageName.c_str());
596 EcalPedestalsEBMean12Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel pedestal gain12 - map",
597 "iphi", MAX_IPHI, MIN_IPHI, MAX_IPHI+MIN_IPHI,
"ieta", 2*MAX_IETA+1, -1*MAX_IETA, MAX_IETA+1) {
598 Base::setSingleIov(
true );
602 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
604 for(
auto const & iov : iovs ) {
605 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
608 if (payload->barrelItems().empty())
return false;
615 if (payload->find(rawid) == payload->end())
continue;
616 if (!(*payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
continue;
623 float valped = (*payload)[rawid].mean_x12;
624 if(valped > 250.) valped = 250.;
626 fillWithValue( (
EBDetId(rawid)).iphi(), (
EBDetId(rawid)).ieta(), valped);
637 EcalPedestalsEBMean6Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel pedestal gain6 - map",
638 "iphi", MAX_IPHI, MIN_IPHI, MAX_IPHI+MIN_IPHI,
"ieta", 2*MAX_IETA+1, -MAX_IETA, MAX_IETA+1){
639 Base::setSingleIov(
true );
642 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
643 for(
auto const & iov : iovs ) {
644 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
647 if (payload->barrelItems().empty())
return false;
654 if (payload->find(rawid) == payload->end())
continue;
655 if (!(*payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
continue;
658 float valped = (*payload)[rawid].mean_x6;
659 if(valped > 250.) valped = 250.;
661 fillWithValue( (
EBDetId(rawid)).iphi(), (
EBDetId(rawid)).ieta(), valped);
672 EcalPedestalsEBMean1Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel pedestal gain1 - map",
673 "iphi", MAX_IPHI, MIN_IPHI, MAX_IPHI+MIN_IPHI,
"ieta", 2*MAX_IETA+1, -MAX_IETA, MAX_IETA+1) {
674 Base::setSingleIov(
true );
677 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
678 for(
auto const & iov : iovs ) {
679 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
682 if (payload->barrelItems().empty())
return false;
689 if (payload->find(rawid) == payload->end())
continue;
690 if (!(*payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x1)
continue;
693 float valped = (*payload)[rawid].mean_x1;
694 if(valped > 250.) valped = 250.;
696 fillWithValue( (
EBDetId(rawid)).iphi(), (
EBDetId(rawid)).ieta(), valped);
707 EcalPedestalsEEMean12Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap pedestal gain12 - map",
708 "ix", 2.2*IX_MAX, IX_MIN, 2.2*IX_MAX+1,
"iy", IY_MAX, IY_MIN, IY_MAX+IY_MIN) {
709 Base::setSingleIov(
true );
713 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
715 for(
auto const & iov : iovs ) {
716 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
718 if (payload->endcapItems().empty())
return false;
721 for(
int iz = -1; iz < 2; iz = iz + 2)
722 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
723 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
726 uint32_t rawid = myEEId.
rawId();
728 if (payload->find(rawid) == payload->end())
continue;
729 if (!(*payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
continue;
731 float valped = (*payload)[rawid].mean_x12;
732 if(valped > 250.) valped = 250.;
735 fillWithValue(ix, iy, valped);
737 fillWithValue(ix + IX_MAX + 20, iy, valped);
749 EcalPedestalsEEMean6Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap pedestal gain6 - map",
750 "ix", 2.2*IX_MAX, IX_MIN, 2.2*IX_MAX+1,
"iy", IY_MAX, IY_MIN, IY_MAX+IY_MIN) {
751 Base::setSingleIov(
true );
754 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
755 for(
auto const & iov : iovs ) {
756 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
758 if (payload->endcapItems().empty())
return false;
762 for(
int iz = -1; iz < 2; iz = iz + 2)
763 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
764 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
767 uint32_t rawid = myEEId.
rawId();
769 if (payload->find(rawid) == payload->end())
continue;
770 if (!(*payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
continue;
772 float valped = (*payload)[rawid].mean_x6;
773 if(valped > 250.) valped = 250.;
776 fillWithValue(ix, iy, valped);
778 fillWithValue(ix + IX_MAX + 20, iy, valped);
789 EcalPedestalsEEMean1Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap pedestal gain1 - map",
790 "ix", 2.2*IX_MAX, IX_MIN, 2.2*IX_MAX+1,
"iy", IY_MAX, IY_MIN, IY_MAX+IY_MIN) {
791 Base::setSingleIov(
true );
794 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
795 for(
auto const & iov : iovs ) {
796 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
798 if (payload->endcapItems().empty())
return false;
801 for(
int iz = -1; iz < 2; iz = iz + 2)
802 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
803 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
806 uint32_t rawid = myEEId.
rawId();
808 if (payload->find(rawid) == payload->end())
continue;
809 if (!(*payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x12)
continue;
811 float valped = (*payload)[rawid].mean_x1;
812 if(valped > 250.) valped = 250.;
815 fillWithValue(ix, iy, valped);
817 fillWithValue(ix + IX_MAX + 20, iy, valped);
828 EcalPedestalsEBRMS12Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel noise gain12 - map",
829 "iphi", MAX_IPHI, MIN_IPHI, MAX_IPHI+MIN_IPHI,
"ieta", 2*MAX_IETA+1, -1*MAX_IETA, MAX_IETA+1) { Base::setSingleIov(
true );
833 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
835 for(
auto const & iov : iovs ) {
836 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
839 if (payload->barrelItems().empty())
return false;
846 if (payload->find(rawid) == payload->end())
continue;
847 if (!(*payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
continue;
854 float valrms = (*payload)[rawid].rms_x12;
855 if(valrms > 2.2) valrms = 2.2;
856 fillWithValue( (
EBDetId(rawid)).iphi(), (
EBDetId(rawid)).ieta(), valrms);
867 EcalPedestalsEBRMS6Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel noise gain6 - map",
868 "iphi", MAX_IPHI, MIN_IPHI, MAX_IPHI+MIN_IPHI,
"ieta", 2*MAX_IETA+1, -1*MAX_IETA, MAX_IETA+1) { Base::setSingleIov(
true );
871 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
872 for(
auto const & iov : iovs ) {
873 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
876 if (payload->barrelItems().empty())
return false;
883 if (payload->find(rawid) == payload->end())
continue;
884 if (!(*payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
continue;
887 float valrms = (*payload)[rawid].rms_x6;
888 if(valrms > 1.5) valrms = 1.5;
889 fillWithValue( (
EBDetId(rawid)).iphi(), (
EBDetId(rawid)).ieta(), valrms);
900 EcalPedestalsEBRMS1Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Barrel noise gain1 - map",
901 "iphi", MAX_IPHI, MIN_IPHI, MAX_IPHI+MIN_IPHI,
"ieta", 2*MAX_IETA+1, -1*MAX_IETA, MAX_IETA+1) { Base::setSingleIov(
true );
904 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
905 for(
auto const & iov : iovs ) {
906 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
909 if (payload->barrelItems().empty())
return false;
916 if (payload->find(rawid) == payload->end())
continue;
917 if (!(*payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x1)
continue;
920 float valrms = (*payload)[rawid].rms_x1;
921 if(valrms > 1.0) valrms = 1.0;
922 fillWithValue( (
EBDetId(rawid)).iphi(), (
EBDetId(rawid)).ieta(), valrms);
933 EcalPedestalsEERMS12Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap noise gain12 - map",
934 "ix", 2.2*IX_MAX, IX_MIN, 2.2*IX_MAX+1,
"iy", IY_MAX, IY_MIN, IY_MAX+IY_MIN) {
935 Base::setSingleIov(
true );
939 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
941 for(
auto const & iov : iovs ) {
942 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
944 if (payload->endcapItems().empty())
return false;
947 for(
int iz = -1; iz < 2; iz = iz + 2)
948 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
949 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
952 uint32_t rawid = myEEId.
rawId();
954 if (payload->find(rawid) == payload->end())
continue;
955 if (!(*payload)[rawid].mean_x12 && !(*payload)[rawid].rms_x12)
continue;
957 float valrms = (*payload)[rawid].rms_x12;
958 if(valrms > 3.5) valrms = 3.5;
960 fillWithValue(ix, iy, valrms);
962 fillWithValue(ix + IX_MAX + 20, iy, valrms);
974 EcalPedestalsEERMS6Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap noise gain6 - map",
975 "ix", 2.2*IX_MAX, IX_MIN, 2.2*IX_MAX+1,
"iy", IY_MAX, IY_MIN, IY_MAX+IY_MIN) {
976 Base::setSingleIov(
true );
979 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
980 for(
auto const & iov : iovs ) {
981 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
983 if (payload->endcapItems().empty())
return false;
986 for(
int iz = -1; iz < 2; iz = iz + 2)
987 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
988 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
991 uint32_t rawid = myEEId.
rawId();
993 if (payload->find(rawid) == payload->end())
continue;
994 if (!(*payload)[rawid].mean_x6 && !(*payload)[rawid].rms_x6)
continue;
996 float valrms = (*payload)[rawid].rms_x6;
997 if(valrms > 2.0) valrms = 2.0;
999 fillWithValue( ix, iy, valrms);
1001 fillWithValue( ix + IX_MAX + 20, iy, valrms);
1012 EcalPedestalsEERMS1Map() :
cond::payloadInspector::Histogram2D<
EcalPedestals>(
"ECAL Endcap noise gain1 - map",
1013 "ix", 2.2*IX_MAX, IX_MIN, 2.2*IX_MAX+1,
"iy", IY_MAX, IY_MIN, IY_MAX+IY_MIN) {
1014 Base::setSingleIov(
true );
1017 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
1018 for(
auto const & iov : iovs ) {
1019 std::shared_ptr<EcalPedestals> payload = Base::fetchPayload( std::get<1>(iov) );
1020 if( payload.get() ){
1021 if (payload->endcapItems().empty())
return false;
1024 for(
int iz = -1; iz < 2; iz = iz + 2)
1025 for(
int iy = IY_MIN; iy < IY_MAX+IY_MIN; iy++)
1026 for(
int ix = IX_MIN; ix < IX_MAX+IX_MIN; ix++)
1029 uint32_t rawid = myEEId.
rawId();
1031 if (payload->find(rawid) == payload->end())
continue;
1032 if (!(*payload)[rawid].mean_x1 && !(*payload)[rawid].rms_x12)
continue;
1034 float valrms = (*payload)[rawid].rms_x1;
1035 if(valrms > 1.5) valrms = 1.5;
1037 fillWithValue( ix, iy, valrms);
1039 fillWithValue( ix + IX_MAX + 20, iy, valrms);
int gainId(sample_type sample)
get the gainId (2 bits)
void DrawEE(TH2F *endc, float min, float max)
void DrawEB(TH2F *ebmap, float min, float max)
uint32_t rawId() const
get the raw id
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
static const int MIN_HASH
Abs< T >::type abs(const T &t)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays