46 EcalLaserAPDPNRatiosEBMap()
56 Base::setSingleIov(
true);
60 bool fill()
override {
61 auto tag = PlotBase::getTag<0>();
62 for (
auto const& iov :
tag.iovs) {
87 EcalLaserAPDPNRatiosEEMap()
97 Base::setSingleIov(
true);
100 bool fill()
override {
101 auto tag = PlotBase::getTag<0>();
102 for (
auto const& iov :
tag.iovs) {
116 if (myEEId.zside() == -1)
132 EcalLaserAPDPNRatiosPlot()
137 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
138 TH2F**
barrel =
new TH2F*[3];
139 TH2F** endc_p =
new TH2F*[3];
140 TH2F** endc_m =
new TH2F*[3];
141 float pEBmin[3], pEEmin[3];
143 for (
int i = 0;
i < 3;
i++) {
154 auto iov = iovs.front();
156 unsigned long IOV = std::get<0>(iov);
158 if (IOV < 4294967296)
159 run = std::get<0>(iov);
201 if (myEEId.zside() == 1) {
202 endc_p[0]->Fill(myEEId.ix(), myEEId.iy(),
p1);
203 endc_p[1]->Fill(myEEId.ix(), myEEId.iy(),
p2);
204 endc_p[2]->Fill(myEEId.ix(), myEEId.iy(),
p3);
206 endc_m[0]->Fill(myEEId.ix(), myEEId.iy(),
p1);
207 endc_m[1]->Fill(myEEId.ix(), myEEId.iy(),
p2);
208 endc_m[2]->Fill(myEEId.ix(), myEEId.iy(),
p3);
215 gStyle->SetPalette(1);
216 gStyle->SetOptStat(0);
217 TCanvas
canvas(
"CC map",
"CC map", 2800, 2600);
221 t1.SetTextSize(0.05);
222 if (IOV < 4294967296)
223 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser APD/PN, IOV %i",
run));
228 localtime_r(&
t, <);
229 strftime(
buf,
sizeof(
buf),
"%F %R:%S", <);
231 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser APD/PN, IOV %s",
buf));
234 float xmi[3] = {0.0, 0.26, 0.74};
235 float xma[3] = {0.26, 0.74, 1.00};
236 TPad*** pad =
new TPad**[3];
237 for (
int i = 0;
i < 3;
i++) {
238 pad[
i] =
new TPad*[3];
240 float yma = 0.94 - (0.32 *
i);
241 float ymi = yma - 0.28;
242 pad[
i][
obj] =
new TPad(Form(
"p_%i_%i",
obj,
i), Form(
"p_%i_%i",
obj,
i), xmi[
obj], ymi, xma[
obj], yma);
247 for (
int i = 0;
i < 3;
i++) {
250 float xmin = pEBmin[
i] * 10.;
254 xmin = pEEmin[
i] * 10.;
267 canvas.SaveAs(ImageName.c_str());
277 EcalLaserAPDPNRatiosDiff()
282 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
283 TH2F**
barrel =
new TH2F*[3];
284 TH2F** endc_p =
new TH2F*[3];
285 TH2F** endc_m =
new TH2F*[3];
286 float pEBmin[3], pEEmin[3], pEBmax[3], pEEmax[3];
288 for (
int i = 0;
i < 3;
i++) {
300 unsigned int run[2] = {0, 0}, irun = 0;
301 unsigned long IOV = 0;
303 for (
auto const& iov : iovs) {
305 IOV = std::get<0>(iov);
306 if (IOV < 4294967296)
307 run[irun] = std::get<0>(iov);
309 run[irun] = IOV >> 32;
315 pEB[0][cellid] = (
payload->getLaserMap())[rawid].
p1;
316 pEB[1][cellid] = (
payload->getLaserMap())[rawid].
p2;
317 pEB[2][cellid] = (
payload->getLaserMap())[rawid].
p3;
325 double diff = (
payload->getLaserMap())[rawid].
p1 - pEB[0][cellid];
326 if (
diff < pEBmin[0])
328 if (
diff > pEBmax[0])
332 if (
diff < pEBmin[1])
334 if (
diff > pEBmax[1])
338 if (
diff < pEBmin[2])
340 if (
diff > pEBmax[2])
353 pEE[0][cellid] = (
payload->getLaserMap())[rawid].
p1;
354 pEE[1][cellid] = (
payload->getLaserMap())[rawid].
p2;
355 pEE[2][cellid] = (
payload->getLaserMap())[rawid].
p3;
357 double diff1 = (
payload->getLaserMap())[rawid].
p1 - pEE[0][cellid];
358 if (diff1 < pEEmin[0])
360 if (diff1 > pEEmax[0])
362 double diff2 = (
payload->getLaserMap())[rawid].
p2 - pEE[1][cellid];
363 if (diff2 < pEEmin[1])
365 if (diff2 > pEEmax[1])
367 double diff3 = (
payload->getLaserMap())[rawid].
p3 - pEE[2][cellid];
368 if (diff3 < pEEmin[2])
370 if (diff3 > pEEmax[2])
372 if (myEEId.zside() == 1) {
373 endc_p[0]->Fill(myEEId.ix(), myEEId.iy(), diff1);
374 endc_p[1]->Fill(myEEId.ix(), myEEId.iy(), diff2);
375 endc_p[2]->Fill(myEEId.ix(), myEEId.iy(), diff3);
377 endc_m[0]->Fill(myEEId.ix(), myEEId.iy(), diff1);
378 endc_m[1]->Fill(myEEId.ix(), myEEId.iy(), diff2);
379 endc_m[2]->Fill(myEEId.ix(), myEEId.iy(), diff3);
389 gStyle->SetPalette(1);
390 gStyle->SetOptStat(0);
391 TCanvas
canvas(
"CC map",
"CC map", 2800, 2600);
395 t1.SetTextSize(0.05);
396 if (IOV < 4294967296) {
397 t1.SetTextSize(0.05);
398 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser APD/PN, IOV %i - %i",
run[1],
run[0]));
401 char buf0[256], buf1[256];
403 localtime_r(&
t, <);
404 strftime(buf0,
sizeof(buf0),
"%F %R:%S", <);
405 buf0[
sizeof(buf0) - 1] = 0;
407 localtime_r(&
t, <);
408 strftime(buf1,
sizeof(buf1),
"%F %R:%S", <);
409 buf1[
sizeof(buf1) - 1] = 0;
410 t1.SetTextSize(0.015);
411 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser APD/PN, IOV %s - %s", buf1, buf0));
414 float xmi[3] = {0.0, 0.24, 0.76};
415 float xma[3] = {0.24, 0.76, 1.00};
416 TPad*** pad =
new TPad**[3];
417 for (
int i = 0;
i < 3;
i++) {
418 pad[
i] =
new TPad*[3];
420 float yma = 0.94 - (0.32 *
i);
421 float ymi = yma - 0.28;
422 pad[
i][
obj] =
new TPad(Form(
"p_%i_%i",
obj,
i), Form(
"p_%i_%i",
obj,
i), xmi[
obj], ymi, xma[
obj], yma);
427 for (
int i = 0;
i < 3;
i++) {
430 float xmin = (pEBmin[
i] - 0.009) * 100.;
433 float xmax = (pEBmax[
i] + 0.009) * 100.;
437 xmin = (pEEmin[
i] + 0.009) * 100.;
440 xmax = (pEEmax[
i] + 0.009) * 100.;
446 endc_m[
i]->GetZaxis()->SetLabelSize(0.02);
451 endc_p[
i]->GetZaxis()->SetLabelSize(0.02);
455 canvas.SaveAs(ImageName.c_str());