28 : offlineXMLfile_(offlineXMLfile), Tier0Flag_(
Tier0Flag) {
29 edm::LogInfo(
"SiPixelActionExecutor") <<
" Creating SiPixelActionExecutor " 41 edm::LogInfo(
"SiPixelActionExecutor") <<
" Deleting SiPixelActionExecutor " 55 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
57 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
70 int &sum_grandbarrel_freq,
71 int &sum_grandendcap_freq,
79 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
81 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
88 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read " 89 "TrackerMap configuration parameters!! ";
93 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Barrel Summary configuration parameters!! " 98 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " 103 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Barrel Summary configuration parameters!! " 108 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Endcap Summary configuration parameters!! " 113 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read QTest Message Limit" 118 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Source Type" 123 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Calib Type" 137 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
139 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
146 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read " 147 "TrackerMap configuration parameters!! ";
151 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Summary configuration parameters!! " 165 string barrel_structure_name;
166 vector<string> barrel_me_names;
169 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
171 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
178 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Barrel " 179 "Summary configuration parameters!! ";
186 fillSummary(iBooker, iGetter, barrel_structure_name, barrel_me_names,
true,
190 string endcap_structure_name;
191 vector<string> endcap_me_names;
193 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " 203 fillSummary(iBooker, iGetter, endcap_structure_name, endcap_me_names,
false,
209 string federror_structure_name;
210 vector<string> federror_me_names;
212 cout <<
"SiPixelActionExecutor::createSummary: Failed to read FED Error " 213 "Summary configuration parameters!! ";
241 "DEV_adc_Barrel",
"Deviation from reference;Module;<adc_ref>-<adc>", nBPixModules, 0., nBPixModules);
243 "DEV_ndigis_Barrel",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>", nBPixModules, 0., nBPixModules);
245 "DEV_charge_Barrel",
"Deviation from reference;Module;<charge_ref>-<charge>", nBPixModules, 0., nBPixModules);
247 "Deviation from reference;Module;<nclusters_ref>-<nclusters>",
252 "DEV_size_Barrel",
"Deviation from reference;Module;<size_ref>-<size>", nBPixModules, 0., nBPixModules);
255 DEV_adc_Endcap = iBooker.
book1D(
"DEV_adc_Endcap",
"Deviation from reference;Module;<adc_ref>-<adc>", 672, 0., 672.);
257 iBooker.
book1D(
"DEV_ndigis_Endcap",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>", 672, 0., 672.);
259 iBooker.
book1D(
"DEV_charge_Endcap",
"Deviation from reference;Module;<charge_ref>-<charge>", 672, 0., 672.);
261 "DEV_nclusters_Endcap",
"Deviation from reference;Module;<nclusters_ref>-<nclusters>", 672, 0., 672.);
263 iBooker.
book1D(
"DEV_size_Endcap",
"Deviation from reference;Module;<size_ref>-<size>", 672, 0., 672.);
271 vector<string> &blade_subdirs) {
272 blade_subdirs.clear();
275 for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
279 for (vector<string>::const_iterator m_it =
modules.begin(); m_it !=
modules.end(); m_it++) {
280 blade_subdirs.push_back(*m_it);
290 vector<string> &me_names,
294 string currDir = iBooker.
pwd();
310 if (currDir.find(
dir_name) != string::npos) {
311 vector<MonitorElement *> sum_mes;
312 for (vector<string>::const_iterator
iv = me_names.begin();
iv != me_names.end();
iv++) {
314 if ((*
iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
315 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" || (*iv) ==
"ROCId" ||
316 (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" || (*iv) ==
"TBMMessage" ||
317 (*iv) ==
"Type36Hitmap")
319 else if ((*
iv) ==
"ndigis" || (*iv) ==
"adc")
321 else if ((*
iv) ==
"nclusters" || (*iv) ==
"x" || (*iv) ==
"y" || (*iv) ==
"charge" || (*iv) ==
"size" ||
322 (*iv) ==
"sizeX" || (*iv) ==
"sizeY" || (*iv) ==
"minrow" || (*iv) ==
"maxrow" || (*iv) ==
"mincol" ||
325 if (currDir.find(
"Track") != string::npos)
327 else if ((*
iv) ==
"residualX" || (*iv) ==
"residualY")
329 else if ((*
iv) ==
"ClustX" || (*iv) ==
"ClustY" || (*iv) ==
"nRecHits" || (*iv) ==
"ErrorX" ||
332 else if ((*
iv) ==
"Gain1d" || (*iv) ==
"GainChi2NDF1d" || (*iv) ==
"GainChi2Prob1d" || (*iv) ==
"Pedestal1d" ||
333 (*iv) ==
"GainNPoints1d" || (*iv) ==
"GainHighPoint1d" || (*iv) ==
"GainLowPoint1d" ||
334 (*iv) ==
"GainEndPoint1d" || (*iv) ==
"GainFitResult2d" || (*iv) ==
"GainDynamicRange2d" ||
335 (*iv) ==
"GainSaturate2d" || (*iv) ==
"ScurveChi2ProbSummary" || (*iv) ==
"ScurveFitResultSummary" ||
336 (*iv) ==
"ScurveSigmasSummary" || (*iv) ==
"ScurveThresholdSummary" || (*iv) ==
"pixelAliveSummary" ||
337 (*iv) ==
"SiPixelErrorsCalibDigis")
342 if ((*iv).find(
"residual") != string::npos) {
345 sum_mes.push_back(
temp);
348 sum_mes.push_back(
temp);
349 }
else if (
prefix ==
"SUMCAL") {
350 if ((*
iv) ==
"Gain1d" || (*
iv) ==
"GainChi2NDF1d" || (*
iv) ==
"GainChi2Prob1d" || (*
iv) ==
"GainNPoints1d" ||
351 (*
iv) ==
"GainHighPoint1d" || (*
iv) ==
"GainLowPoint1d" || (*
iv) ==
"GainEndPoint1d" ||
352 (*
iv) ==
"GainDynamicRange2d" || (*
iv) ==
"GainSaturate2d" || (*
iv) ==
"Pedestal1d" ||
353 (*
iv) ==
"ScurveChi2ProbSummary" || (*
iv) ==
"ScurveFitResultSummary" || (*
iv) ==
"ScurveSigmasSummary" ||
354 (*
iv) ==
"ScurveThresholdSummary") {
357 sum_mes.push_back(
temp);
360 sum_mes.push_back(
temp);
361 }
else if ((*
iv) ==
"SiPixelErrorsCalibDigis") {
362 tag =
prefix +
"_" + (*iv) +
"_NCalibErrors_" + currDir.substr(currDir.find(
dir_name));
364 sum_mes.push_back(
temp);
365 }
else if ((*
iv) ==
"GainFitResult2d") {
366 tag =
prefix +
"_" + (*iv) +
"_NNegativeFits_" + currDir.substr(currDir.find(
dir_name));
368 sum_mes.push_back(
temp);
369 }
else if ((*
iv) ==
"pixelAliveSummary") {
370 tag =
prefix +
"_" + (*iv) +
"_FracOfPerfectPix_" + currDir.substr(currDir.find(
dir_name));
372 sum_mes.push_back(
temp);
375 sum_mes.push_back(
temp);
380 sum_mes.push_back(
temp);
381 if ((*
iv) ==
"ndigis") {
384 sum_mes.push_back(
temp);
386 if (
prefix ==
"SUMDIG" && (*
iv) ==
"adc") {
387 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(
dir_name));
389 string fullpathname = iBooker.
pwd() +
"/" +
tag;
390 temp = iGetter.
get(fullpathname);
396 sum_mes.push_back(
temp);
398 if (
prefix ==
"SUMCLU" && (*
iv) ==
"charge") {
399 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(
dir_name));
401 string fullpathname = iBooker.
pwd() +
"/" +
tag;
402 temp = iGetter.
get(fullpathname);
409 sum_mes.push_back(
temp);
413 if (sum_mes.empty()) {
414 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" 424 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
425 if (
prefix !=
"SUMOFF" && (*it).find(
"Module_") == string::npos)
427 if (
prefix ==
"SUMOFF" && (*it).find(isbarrel ?
"Layer_" :
"Disk_") == string::npos)
435 for (vector<MonitorElement *>::const_iterator
isum = sum_mes.begin();
isum != sum_mes.end();
isum++) {
436 for (vector<string>::const_iterator im =
contents.begin(); im !=
contents.end(); im++) {
437 string sname = ((*isum)->getName());
439 tname = sname.substr(7, (sname.find(
'_', 7) - 6));
440 if (sname.find(
"ALLMODS_adcCOMB_") != string::npos)
442 if (sname.find(
"ALLMODS_chargeCOMB_") != string::npos)
444 if (sname.find(
"_charge_") != string::npos && sname.find(
"Track_") == string::npos)
446 if (sname.find(
"_nclusters_") != string::npos && sname.find(
"Track_") == string::npos)
447 tname =
"nclusters_";
448 if (sname.find(
"_size_") != string::npos && sname.find(
"Track_") == string::npos)
450 if (sname.find(
"_charge_OffTrack_") != string::npos)
451 tname =
"charge_OffTrack_";
452 if (sname.find(
"_nclusters_OffTrack_") != string::npos)
453 tname =
"nclusters_OffTrack_";
454 if (sname.find(
"_size_OffTrack_") != string::npos)
455 tname =
"size_OffTrack_";
456 if (sname.find(
"_sizeX_OffTrack_") != string::npos)
457 tname =
"sizeX_OffTrack_";
458 if (sname.find(
"_sizeY_OffTrack_") != string::npos)
459 tname =
"sizeY_OffTrack_";
460 if (sname.find(
"_charge_OnTrack_") != string::npos)
461 tname =
"charge_OnTrack_";
462 if (sname.find(
"_nclusters_OnTrack_") != string::npos)
463 tname =
"nclusters_OnTrack_";
464 if (sname.find(
"_size_OnTrack_") != string::npos)
465 tname =
"size_OnTrack_";
466 if (sname.find(
"_sizeX_OnTrack_") != string::npos)
467 tname =
"sizeX_OnTrack_";
468 if (sname.find(
"_sizeY_OnTrack_") != string::npos)
469 tname =
"sizeY_OnTrack_";
470 if (
tname.find(
"FREQ") != string::npos)
472 if (((*im)).find(
tname) == 0) {
473 string fullpathname = iBooker.
pwd() +
"/" + (*im);
477 if (sname.find(
"_charge") != string::npos && sname.find(
"Track_") == string::npos &&
478 me->getName().find(
"Track_") != string::npos)
480 if (sname.find(
"_nclusters_") != string::npos && sname.find(
"Track_") == string::npos &&
481 me->getName().find(
"Track_") != string::npos)
483 if (sname.find(
"_size") != string::npos && sname.find(
"Track_") == string::npos &&
484 me->getName().find(
"Track_") != string::npos)
487 if (sname.find(
"_RMS_") != string::npos && sname.find(
"GainDynamicRange2d") == string::npos &&
488 sname.find(
"GainSaturate2d") == string::npos) {
489 (*isum)->
Fill(ndet,
me->getRMS());
490 }
else if (sname.find(
"GainDynamicRange2d") != string::npos ||
491 sname.find(
"GainSaturate2d") != string::npos) {
492 float SumOfEntries = 0.;
493 float SumOfSquaredEntries = 0.;
495 for (
int cols = 1; cols !=
me->getNbinsX() + 1; cols++)
497 SumOfEntries +=
me->getBinContent(cols,
rows);
498 SumOfSquaredEntries += (
me->getBinContent(cols,
rows)) * (
me->getBinContent(cols,
rows));
502 float MeanInZ = SumOfEntries /
float(SumOfPixels);
503 float RMSInZ =
sqrt(SumOfSquaredEntries /
float(SumOfPixels));
504 if (sname.find(
"_mean_") != string::npos)
505 (*isum)->Fill(ndet, MeanInZ);
506 if (sname.find(
"_RMS_") != string::npos)
507 (*isum)->Fill(ndet, RMSInZ);
508 }
else if (sname.find(
"_FracOfPerfectPix_") != string::npos) {
509 float nlast =
me->getBinContent(
me->getNbinsX());
510 float nall = (
me->getTH1F())->Integral(1, 11);
511 (*isum)->Fill(ndet,
nlast / nall);
512 }
else if (sname.find(
"_NCalibErrors_") != string::npos || sname.find(
"FREQ_") != string::npos) {
513 float nall =
me->getEntries();
514 (*isum)->Fill(ndet, nall);
515 }
else if (sname.find(
"GainFitResult2d") != string::npos) {
516 int NegFitPixels = 0;
517 for (
int cols = 1; cols !=
me->getNbinsX() + 1; cols++)
519 if (
me->getBinContent(cols,
rows) < 0.)
522 (*isum)->Fill(ndet,
float(NegFitPixels));
523 }
else if (sname.find(
"ALLMODS_adcCOMB_") != string::npos ||
524 (sname.find(
"ALLMODS_chargeCOMB_") != string::npos &&
525 me->getName().find(
"Track_") == string::npos)) {
526 (*isum)->getTH1F()->Add(
me->getTH1F());
527 }
else if (sname.find(
"_NErrors_") != string::npos) {
528 string path1 = fullpathname;
529 path1 = path1.replace(path1.find(
"NErrors"), 7,
"errorType");
531 bool notReset =
true;
533 for (
int jj = 1;
jj < 16;
jj++) {
534 if (
me1->getBinContent(
jj) > 0.) {
536 string path2 = path1;
537 path2 = path2.replace(path2.find(
"errorType"), 9,
"TBMMessage");
540 if (
me2->getBinContent(6) > 0. ||
me2->getBinContent(7) > 0.)
547 (*isum)->
Fill(ndet,
me1->getEntries());
548 }
else if ((sname.find(
"_charge_") != string::npos && sname.find(
"Track_") == string::npos &&
549 me->getName().find(
"Track_") == string::npos) ||
550 (sname.find(
"_charge_") != string::npos && sname.find(
"_OnTrack_") != string::npos &&
551 me->getName().find(
"_OnTrack_") != string::npos) ||
552 (sname.find(
"_charge_") != string::npos && sname.find(
"_OffTrack_") != string::npos &&
553 me->getName().find(
"_OffTrack_") != string::npos) ||
554 (sname.find(
"_nclusters_") != string::npos && sname.find(
"Track_") == string::npos &&
555 me->getName().find(
"Track_") == string::npos) ||
556 (sname.find(
"_nclusters_") != string::npos && sname.find(
"_OnTrack_") != string::npos &&
557 me->getName().find(
"_OnTrack_") != string::npos) ||
558 (sname.find(
"_nclusters_") != string::npos && sname.find(
"_OffTrack_") != string::npos &&
559 me->getName().find(
"_OffTrack_") != string::npos) ||
560 (sname.find(
"_size") != string::npos && sname.find(
"Track_") == string::npos &&
561 me->getName().find(
"Track_") == string::npos) ||
562 (sname.find(
"_size") != string::npos && sname.find(
"_OnTrack_") != string::npos &&
563 me->getName().find(
"_OnTrack_") != string::npos) ||
564 (sname.find(
"_size") != string::npos && sname.find(
"_OffTrack_") != string::npos &&
565 me->getName().find(
"_OffTrack_") != string::npos)) {
566 (*isum)->Fill(ndet,
me->getMean());
567 }
else if (sname.find(
"_charge_") == string::npos && sname.find(
"_nclusters_") == string::npos &&
568 sname.find(
"_size") == string::npos) {
569 (*isum)->Fill(ndet,
me->getMean());
574 (*isum)->setAxisTitle(isbarrel ?
"Ladders" :
"Blades", 1);
575 }
else if (sname.find(
"ALLMODS_adcCOMB_") != string::npos) {
576 (*isum)->setAxisTitle(
"Digi charge [ADC]", 1);
577 }
else if (sname.find(
"ALLMODS_chargeCOMB_") != string::npos) {
578 (*isum)->setAxisTitle(
"Cluster charge [kilo electrons]", 1);
580 (*isum)->setAxisTitle(
"Modules", 1);
583 if (sname.find(
"_RMS_") != string::npos) {
584 title =
"RMS of " + sname.substr(7, (sname.find(
'_', 7) - 7)) +
" per module";
585 }
else if (sname.find(
"_FracOfPerfectPix_") != string::npos) {
586 title =
"FracOfPerfectPix " + sname.substr(7, (sname.find(
'_', 7) - 7)) +
" per module";
587 }
else if (sname.find(
"_NCalibErrors_") != string::npos) {
588 title =
"Number of CalibErrors " + sname.substr(7, (sname.find(
'_', 7) - 7)) +
" per module";
589 }
else if (sname.find(
"_NNegativeFits_") != string::npos) {
590 title =
"Number of pixels with neg. fit result " + sname.substr(7, (sname.find(
'_', 7) - 7)) +
592 }
else if (sname.find(
"FREQ_") != string::npos) {
593 title =
"NEvents with digis per module";
594 }
else if (sname.find(
"ALLMODS_adcCOMB_") != string::npos) {
596 }
else if (sname.find(
"ALLMODS_chargeCOMB_") != string::npos) {
598 }
else if (sname.find(
"_NErrors_") != string::npos) {
599 if (
prefix ==
"SUMOFF" && isbarrel)
600 title =
"Total number of errors per Ladder";
601 else if (
prefix ==
"SUMOFF" && !isbarrel)
602 title =
"Total number of errors per Blade";
604 title =
"Total number of errors per Module";
608 "Mean " + sname.substr(7, (sname.find(
'_', 7) - 7)) + (isbarrel ?
" per Ladder" :
" per Blade");
610 title =
"Mean " + sname.substr(7, (sname.find(
'_', 7) - 7)) +
" per Module";
612 (*isum)->setAxisTitle(
title, 2);
629 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
633 if ((iBooker.
pwd()).
find(
"Endcap") != string::npos ||
634 (iBooker.
pwd()).
find(
"AdditionalPixelErrors") != string::npos) {
640 if ((*it).find(
"Endcap") != string::npos || (*it).find(
"AdditionalPixelErrors") != string::npos)
647 string grandbarrel_structure_name;
648 vector<string> grandbarrel_me_names;
650 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand " 651 "Barrel Summary configuration parameters!! ";
658 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
659 if ((iBooker.
pwd()).
find(
"Barrel") != string::npos ||
660 (iBooker.
pwd()).
find(
"AdditionalPixelErrors") != string::npos) {
666 if ((*it).find(
"Barrel") != string::npos || (*it).find(
"AdditionalPixelErrors") != string::npos)
673 string grandendcap_structure_name;
674 vector<string> grandendcap_me_names;
676 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand " 677 "Endcap Summary configuration parameters!! ";
690 vector<string> &me_names) {
693 string currDir = iBooker.
pwd();
700 if (currDir.find(
dir_name) != string::npos) {
701 vector<MonitorElement *> sum_mes;
702 for (vector<string>::const_iterator
iv = me_names.begin();
iv != me_names.end();
iv++) {
703 bool isBooked =
false;
705 for (vector<string>::const_iterator im =
contents.begin(); im !=
contents.end(); im++)
706 if ((*im).find(*
iv) != string::npos)
709 if ((*
iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
710 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" || (*iv) ==
"ROCId" ||
711 (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" || (*iv) ==
"TBMMessage" ||
712 (*iv) ==
"Type36Hitmap" || (*iv) ==
"FedChLErr" || (*iv) ==
"FedChNErr" || (*iv) ==
"FedETypeNErr")
715 if ((*
iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
716 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" || (*iv) ==
"ROCId" ||
717 (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" || (*iv) ==
"TBMMessage" ||
718 (*iv) ==
"Type36Hitmap") {
719 string tag =
prefix +
"_" + (*iv) +
"_FEDErrors";
721 sum_mes.push_back(
temp);
722 }
else if ((*
iv) ==
"FedChLErr" || (*
iv) ==
"FedChNErr" || (*
iv) ==
"FedETypeNErr") {
725 if ((*
iv) ==
"FedChLErr") {
727 temp = iBooker.
book2D(
"FedChLErr",
"Type of last error", 40, -0.5, 39.5, 37, 0., 37.);
729 string fullpathname = iBooker.
pwd() +
"/" + (*iv);
730 temp = iGetter.
get(fullpathname);
735 if ((*
iv) ==
"FedChNErr") {
737 temp = iBooker.
book2D(
"FedChNErr",
"Total number of errors", 40, -0.5, 39.5, 37, 0., 37.);
739 string fullpathname = iBooker.
pwd() +
"/" + (*iv);
740 temp = iGetter.
get(fullpathname);
745 if ((*
iv) ==
"FedETypeNErr") {
747 temp = iBooker.
book2D(
"FedETypeNErr",
"Number of each error type", 40, -0.5, 39.5, 21, 0., 21.);
748 temp->setBinLabel(1,
"ROC of 25", 2);
749 temp->setBinLabel(2,
"Gap word", 2);
750 temp->setBinLabel(3,
"Dummy word", 2);
751 temp->setBinLabel(4,
"FIFO full", 2);
752 temp->setBinLabel(5,
"Timeout", 2);
753 temp->setBinLabel(6,
"Stack full", 2);
754 temp->setBinLabel(7,
"Pre-cal issued", 2);
755 temp->setBinLabel(8,
"Trigger clear or sync", 2);
756 temp->setBinLabel(9,
"No token bit", 2);
757 temp->setBinLabel(10,
"Overflow", 2);
758 temp->setBinLabel(11,
"FSM error", 2);
759 temp->setBinLabel(12,
"Invalid #ROCs", 2);
760 temp->setBinLabel(13,
"Event number", 2);
761 temp->setBinLabel(14,
"Slink header", 2);
762 temp->setBinLabel(15,
"Slink trailer", 2);
763 temp->setBinLabel(16,
"Event size", 2);
764 temp->setBinLabel(17,
"Invalid channel#", 2);
765 temp->setBinLabel(18,
"ROC value", 2);
766 temp->setBinLabel(19,
"Dcol or pixel value", 2);
767 temp->setBinLabel(20,
"Readout order", 2);
768 temp->setBinLabel(21,
"CRC error", 2);
770 string fullpathname = iBooker.
pwd() +
"/" + (*iv);
771 temp = iGetter.
get(fullpathname);
776 sum_mes.push_back(
temp);
779 if (sum_mes.empty()) {
780 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" 786 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
787 if ((*it).find(
"FED_") == string::npos)
791 string fedid = (*it).substr((*it).find(
"_") + 1);
792 std::istringstream isst;
798 for (vector<MonitorElement *>::const_iterator
isum = sum_mes.begin();
isum != sum_mes.end();
isum++) {
799 for (vector<string>::const_iterator im =
contents.begin(); im !=
contents.end(); im++) {
800 if (((*im).find(
"FedChNErr") != std::string::npos &&
801 (*isum)->getName().find(
"FedChNErr") != std::string::npos) ||
802 ((*im).find(
"FedChLErr") != std::string::npos &&
803 (*isum)->getName().find(
"FedChLErr") != std::string::npos) ||
804 ((*im).find(
"FedETypeNErr") != std::string::npos &&
805 (*isum)->getName().find(
"FedETypeNErr") != std::string::npos)) {
806 string fullpathname = iBooker.
pwd() +
"/" + (*im);
809 for (
int i = 0;
i != 37;
i++) {
810 if ((*im).find(
"FedETypeNErr") != std::string::npos &&
i < 21)
811 (*isum)->
Fill(ndet - 1,
i,
me->getBinContent(
i + 1));
813 (*isum)->Fill(ndet - 1,
i,
me->getBinContent(
i + 1));
817 string sname = ((*isum)->getName());
819 tname = sname.substr(7, (sname.find(
'_', 7) - 6));
821 string fullpathname = iBooker.
pwd() +
"/" + (*im);
825 if (
me->getMean() > 0.) {
826 if (sname.find(
"_NErrors_") != string::npos) {
827 string path1 = fullpathname;
828 path1 = path1.replace(path1.find(
"NErrors"), 7,
"errorType");
830 bool notReset =
true;
832 for (
int jj = 1;
jj < 16;
jj++) {
833 if (
me1->getBinContent(
jj) > 0.) {
835 string path2 = path1;
836 path2 = path2.replace(path2.find(
"errorType"), 9,
"TBMMessage");
839 if (
me2->getBinContent(6) > 0. ||
me2->getBinContent(7) > 0.)
846 (*isum)->
setBinContent(ndet, (*isum)->getBinContent(ndet) +
me1->getEntries());
848 (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) +
me->getEntries());
850 (*isum)->setAxisTitle(
"FED #", 1);
852 title = sname.substr(7, (sname.find(
'_', 7) - 7)) +
" per FED";
853 (*isum)->setAxisTitle(
title, 2);
864 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
865 if ((*it).find(
"Endcap") != string::npos || (*it).find(
"Barrel") != string::npos)
881 vector<string> &me_names,
885 vector<MonitorElement *> gsum_mes;
886 string currDir = iBooker.
pwd();
887 string path_name = iBooker.
pwd();
888 string dir_name = path_name.substr(path_name.find_last_of(
'/') + 1);
890 (
dir_name.find(
"AdditionalPixelErrors") == 0) || (
dir_name.find(
"Endcap") == 0) ||
901 bool first_subdir =
true;
902 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
927 for (vector<string>::const_iterator im =
contents.begin(); im !=
contents.end(); im++) {
928 for (vector<string>::const_iterator
iv = me_names.begin();
iv != me_names.end();
iv++) {
929 string var =
"_" + (*iv) +
"_";
930 if ((*im).find(
var) != string::npos) {
931 if ((
var ==
"_charge_" ||
var ==
"_nclusters_" ||
var ==
"_size_" ||
var ==
"_sizeX_" ||
var ==
"_sizeY_") &&
932 (*im).find(
"Track_") != string::npos)
934 string full_path = (*it) +
"/" + (*im);
939 if ((*
iv) ==
"errorType" || (*
iv) ==
"NErrors" || (*
iv) ==
"fullType" || (*
iv) ==
"chanNmbr" ||
940 (*
iv) ==
"TBMType" || (*
iv) ==
"EvtNbr" || (*
iv) ==
"evtSize" || (*
iv) ==
"linkId" ||
941 (*
iv) ==
"ROCId" || (*
iv) ==
"DCOLId" || (*
iv) ==
"PXId" || (*
iv) ==
"ROCNmbr" ||
942 (*
iv) ==
"TBMMessage" || (*
iv) ==
"Type36Hitmap")
944 else if ((*
iv) ==
"ndigis" || (*
iv) ==
"adc" || (*
iv) ==
"ndigisFREQ" || (*
iv) ==
"adcCOMB")
946 else if ((*
iv) ==
"nclusters" || (*
iv) ==
"x" || (*
iv) ==
"y" || (*
iv) ==
"charge" ||
947 (*
iv) ==
"chargeCOMB" || (*
iv) ==
"size" || (*
iv) ==
"sizeX" || (*
iv) ==
"sizeY" ||
948 (*
iv) ==
"minrow" || (*
iv) ==
"maxrow" || (*
iv) ==
"mincol" || (*
iv) ==
"maxcol")
950 if (currDir.find(
"Track") != string::npos)
952 else if ((*
iv) ==
"residualX_mean" || (*iv) ==
"residualY_mean" || (*iv) ==
"residualX_RMS" ||
953 (*iv) ==
"residualY_RMS")
955 else if ((*
iv) ==
"ClustX" || (*iv) ==
"ClustY" || (*iv) ==
"nRecHits" || (*iv) ==
"ErrorX" ||
958 else if ((*
iv) ==
"Gain1d_mean" || (*iv) ==
"GainChi2NDF1d_mean" || (*iv) ==
"GainChi2Prob1d_mean" ||
959 (*iv) ==
"Pedestal1d_mean" || (*iv) ==
"ScurveChi2ProbSummary_mean" ||
960 (*iv) ==
"ScurveFitResultSummary_mean" || (*iv) ==
"ScurveSigmasSummary_mean" ||
961 (*iv) ==
"ScurveThresholdSummary_mean" || (*iv) ==
"Gain1d_RMS" || (*iv) ==
"GainChi2NDF1d_RMS" ||
962 (*iv) ==
"GainChi2Prob1d_RMS" || (*iv) ==
"Pedestal1d_RMS" || (*iv) ==
"GainNPoints1d_mean" ||
963 (*iv) ==
"GainNPoints1d_RMS" || (*iv) ==
"GainHighPoint1d_mean" ||
964 (*iv) ==
"GainHighPoint1d_RMS" || (*iv) ==
"GainLowPoint1d_mean" ||
965 (*iv) ==
"GainLowPoint1d_RMS" || (*iv) ==
"GainEndPoint1d_mean" || (*iv) ==
"GainEndPoint1d_RMS" ||
966 (*iv) ==
"GainFitResult2d_mean" || (*iv) ==
"GainFitResult2d_RMS" ||
967 (*iv) ==
"GainDynamicRange2d_mean" || (*iv) ==
"GainDynamicRange2d_RMS" ||
968 (*iv) ==
"GainSaturate2d_mean" || (*iv) ==
"GainSaturate2d_RMS" ||
969 (*iv) ==
"ScurveChi2ProbSummary_RMS" || (*iv) ==
"ScurveFitResultSummary_RMS" ||
970 (*iv) ==
"ScurveSigmasSummary_RMS" || (*iv) ==
"ScurveThresholdSummary_RMS" ||
971 (*iv) ==
"pixelAliveSummary_mean" || (*iv) ==
"pixelAliveSummary_FracOfPerfectPix" ||
972 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
977 nbin =
me->getTH1F()->GetNbinsX();
979 if ((*
iv) ==
"adcCOMB" || (*
iv) ==
"chargeCOMB")
980 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
983 else if ((*
iv) ==
"adcCOMB")
987 else if (
prefix ==
"SUMOFF" &&
dir_name.find(
"Shell") != string::npos)
989 else if (
dir_name.find(
"Shell") != string::npos)
996 nbin =
me->getTH1F()->GetNbinsX();
998 if ((*
iv) ==
"adcCOMB" || (*
iv) ==
"chargeCOMB")
999 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1002 else if ((*
iv) ==
"adcCOMB")
1006 else if (
prefix ==
"SUMOFF" &&
dir_name.find(
"Shell") != string::npos)
1008 else if (
dir_name.find(
"Shell") != string::npos)
1011 nbin = nbin * nDirs;
1016 for (vector<MonitorElement *>::const_iterator igm = gsum_mes.begin(); igm != gsum_mes.end(); igm++) {
1017 if ((*igm)->getName().find(
var) != string::npos) {
1019 (*igm)->setAxisTitle(
"Ladders", 1);
1020 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1021 (*igm)->setAxisTitle(
"Digi charge [ADC]", 1);
1022 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1023 (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]", 1);
1025 (*igm)->setAxisTitle(
"Modules", 1);
1030 if ((*igm)->getName().find(
"NErrors_") != string::npos &&
prefix ==
"SUMOFF")
1031 title =
"Total number of errors per Ladder";
1032 else if ((*igm)->getName().find(
"NErrors_") != string::npos &&
prefix ==
"SUMRAW")
1033 title =
"Total number of errors per Module";
1034 else if (
prefix ==
"SUMOFF")
1035 title =
"mean " + (*iv) +
" per Ladder";
1036 else if ((*igm)->getName().find(
"FREQ_") != string::npos &&
prefix !=
"SUMOFF")
1037 title =
"NEvents with digis per Module";
1038 else if ((*igm)->getName().find(
"FREQ_") != string::npos &&
prefix ==
"SUMOFF")
1039 title =
"NEvents with digis per Ladder/Blade";
1040 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1042 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1043 title =
"NClusters";
1045 title =
"mean " + (*iv) +
" per Module";
1046 (*igm)->setAxisTitle(
title, 2);
1050 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1052 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1054 }
else if ((*igm)->getName().find(
"Ladder") != string::npos) {
1057 }
else if ((*igm)->getName().find(
"Layer") != string::npos) {
1058 nbin_i = (cnt - 1) * 4;
1060 }
else if ((*igm)->getName().find(
"Shell") != string::npos) {
1061 if (
prefix !=
"SUMOFF") {
1065 }
else if (iDir == 1) {
1068 }
else if (iDir == 2) {
1076 }
else if (iDir == 1) {
1079 }
else if (iDir == 2) {
1084 }
else if ((*igm)->getName().find(
"Barrel") != string::npos) {
1085 if (
prefix !=
"SUMOFF") {
1089 }
else if (iDir == 1) {
1092 }
else if (iDir == 2) {
1095 }
else if (iDir == 3) {
1103 }
else if (iDir == 1) {
1106 }
else if (iDir == 2) {
1109 }
else if (iDir == 3) {
1116 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1118 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1120 }
else if ((*igm)->getName().find(
"Ladder") != string::npos) {
1123 }
else if ((*igm)->getName().find(
"Layer") != string::npos) {
1124 nbin_i = (cnt - 1) * 4;
1126 }
else if ((*igm)->getName().find(
"Shell") != string::npos) {
1127 if (
prefix !=
"SUMOFF") {
1132 else if (iDir == 1) {
1136 else if (iDir == 2) {
1140 else if (iDir == 3) {
1149 else if (iDir == 1) {
1153 else if (iDir == 2) {
1157 else if (iDir == 3) {
1162 }
else if ((*igm)->getName().find(
"Barrel") != string::npos) {
1163 if (
prefix !=
"SUMOFF") {
1168 else if (iDir == 1) {
1172 else if (iDir == 2) {
1175 }
else if (iDir == 3) {
1178 }
else if (iDir == 4) {
1187 else if (iDir == 1) {
1191 else if (iDir == 2) {
1194 }
else if (iDir == 3) {
1197 }
else if (iDir == 4) {
1205 if ((*igm)->getName().find(
"ndigisFREQ") == string::npos) {
1206 if (((*igm)->getName().find(
"adcCOMB") != string::npos &&
1207 me->getName().find(
"adcCOMB") != string::npos) ||
1208 ((*igm)->getName().find(
"chargeCOMB") != string::npos &&
1209 me->getName().find(
"chargeCOMB") != string::npos)) {
1210 (*igm)->getTH1F()->Add(
me->getTH1F());
1211 }
else if (((*igm)->getName().find(
"charge_") != string::npos &&
1212 (*igm)->getName().find(
"Track_") == string::npos &&
1213 me->getName().find(
"charge_") != string::npos &&
1214 me->getName().find(
"Track_") == string::npos) ||
1215 ((*igm)->getName().find(
"nclusters_") != string::npos &&
1216 (*igm)->getName().find(
"Track_") == string::npos &&
1217 me->getName().find(
"nclusters_") != string::npos &&
1218 me->getName().find(
"Track_") == string::npos) ||
1219 ((*igm)->getName().find(
"size_") != string::npos &&
1220 (*igm)->getName().find(
"Track_") == string::npos &&
1221 me->getName().find(
"size_") != string::npos &&
1222 me->getName().find(
"Track_") == string::npos) ||
1223 ((*igm)->getName().find(
"charge_OffTrack_") != string::npos &&
1224 me->getName().find(
"charge_OffTrack_") != string::npos) ||
1225 ((*igm)->getName().find(
"nclusters_OffTrack_") != string::npos &&
1226 me->getName().find(
"nclusters_OffTrack_") != string::npos) ||
1227 ((*igm)->getName().find(
"size_OffTrack_") != string::npos &&
1228 me->getName().find(
"size_OffTrack_") != string::npos) ||
1229 ((*igm)->getName().find(
"charge_OnTrack_") != string::npos &&
1230 me->getName().find(
"charge_OnTrack_") != string::npos) ||
1231 ((*igm)->getName().find(
"nclusters_OnTrack_") != string::npos &&
1232 me->getName().find(
"nclusters_OnTrack_") != string::npos) ||
1233 ((*igm)->getName().find(
"size_OnTrack_") != string::npos &&
1234 me->getName().find(
"size_OnTrack_") != string::npos) ||
1235 ((*igm)->getName().find(
"charge_") == string::npos &&
1236 (*igm)->getName().find(
"nclusters_") == string::npos &&
1237 (*igm)->getName().find(
"size_") == string::npos)) {
1238 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1239 if (
me->getBinContent(
k) > 0)
1240 (*igm)->setBinContent(
k + nbin_i,
me->getBinContent(
k));
1242 }
else if (
me->getName().find(
"ndigisFREQ") != string::npos) {
1243 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1244 if (
me->getBinContent(
k) > 0)
1245 (*igm)->setBinContent(
k + nbin_i,
me->getBinContent(
k));
1253 first_subdir =
false;
1263 vector<string> &me_names,
1267 vector<MonitorElement *> gsum_mes;
1268 string currDir = iBooker.
pwd();
1269 string path_name = iBooker.
pwd();
1270 string dir_name = path_name.substr(path_name.find_last_of(
'/') + 1);
1272 (
dir_name.find(
"AdditionalPixelErrors") == 0) || (
dir_name.find(
"Barrel") == 0) ||
1278 int nbin_subdir = 0;
1280 bool first_subdir =
true;
1281 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
1305 for (vector<string>::const_iterator im =
contents.begin(); im !=
contents.end(); im++) {
1306 for (vector<string>::const_iterator
iv = me_names.begin();
iv != me_names.end();
iv++) {
1307 string var =
"_" + (*iv) +
"_";
1308 if ((*im).find(
var) != string::npos) {
1309 if ((
var ==
"_charge_" ||
var ==
"_nclusters_" ||
var ==
"_size_" ||
var ==
"_sizeX_" ||
var ==
"_sizeY_") &&
1310 (*im).find(
"Track_") != string::npos)
1312 string full_path = (*it) +
"/" + (*im);
1317 if ((*
iv) ==
"errorType" || (*
iv) ==
"NErrors" || (*
iv) ==
"fullType" || (*
iv) ==
"chanNmbr" ||
1318 (*
iv) ==
"TBMType" || (*
iv) ==
"EvtNbr" || (*
iv) ==
"evtSize" || (*
iv) ==
"linkId" ||
1319 (*
iv) ==
"ROCId" || (*
iv) ==
"DCOLId" || (*
iv) ==
"PXId" || (*
iv) ==
"ROCNmbr" ||
1320 (*
iv) ==
"TBMMessage" || (*
iv) ==
"Type36Hitmap")
1322 else if ((*
iv) ==
"ndigis" || (*
iv) ==
"adc" || (*
iv) ==
"ndigisFREQ" || (*
iv) ==
"adcCOMB")
1324 else if ((*
iv) ==
"nclusters" || (*
iv) ==
"x" || (*
iv) ==
"y" || (*
iv) ==
"charge" ||
1325 (*
iv) ==
"chargeCOMB" || (*
iv) ==
"size" || (*
iv) ==
"sizeX" || (*
iv) ==
"sizeY" ||
1326 (*
iv) ==
"minrow" || (*
iv) ==
"maxrow" || (*
iv) ==
"mincol" || (*
iv) ==
"maxcol")
1328 if (currDir.find(
"Track") != string::npos)
1330 else if ((*
iv) ==
"residualX_mean" || (*iv) ==
"residualY_mean" || (*iv) ==
"residualX_RMS" ||
1331 (*iv) ==
"residualY_RMS")
1333 else if ((*
iv) ==
"ClustX" || (*iv) ==
"ClustY" || (*iv) ==
"nRecHits" || (*iv) ==
"ErrorX" ||
1336 else if ((*
iv) ==
"Gain1d_mean" || (*iv) ==
"GainChi2NDF1d_mean" || (*iv) ==
"GainChi2Prob1d_mean" ||
1337 (*iv) ==
"Pedestal1d_mean" || (*iv) ==
"ScurveChi2ProbSummary_mean" ||
1338 (*iv) ==
"ScurveFitResultSummary_mean" || (*iv) ==
"ScurveSigmasSummary_mean" ||
1339 (*iv) ==
"ScurveThresholdSummary_mean" || (*iv) ==
"Gain1d_RMS" || (*iv) ==
"GainChi2NDF1d_RMS" ||
1340 (*iv) ==
"GainChi2Prob1d_RMS" || (*iv) ==
"Pedestal1d_RMS" || (*iv) ==
"GainNPoints1d_mean" ||
1341 (*iv) ==
"GainNPoints1d_RMS" || (*iv) ==
"GainHighPoint1d_mean" ||
1342 (*iv) ==
"GainHighPoint1d_RMS" || (*iv) ==
"GainLowPoint1d_mean" ||
1343 (*iv) ==
"GainLowPoint1d_RMS" || (*iv) ==
"GainEndPoint1d_mean" || (*iv) ==
"GainEndPoint1d_RMS" ||
1344 (*iv) ==
"GainFitResult2d_mean" || (*iv) ==
"GainFitResult2d_RMS" ||
1345 (*iv) ==
"GainDynamicRange2d_mean" || (*iv) ==
"GainDynamicRange2d_RMS" ||
1346 (*iv) ==
"GainSaturate2d_mean" || (*iv) ==
"GainSaturate2d_RMS" ||
1347 (*iv) ==
"ScurveChi2ProbSummary_RMS" || (*iv) ==
"ScurveFitResultSummary_RMS" ||
1348 (*iv) ==
"ScurveSigmasSummary_RMS" || (*iv) ==
"ScurveThresholdSummary_RMS" ||
1349 (*iv) ==
"pixelAliveSummary_mean" || (*iv) ==
"pixelAliveSummary_FracOfPerfectPix" ||
1350 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
1355 nbin =
me->getTH1F()->GetNbinsX();
1357 if ((*
iv) ==
"adcCOMB" || (*
iv) ==
"chargeCOMB")
1358 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1363 else if (
prefix ==
"SUMOFF" &&
dir_name.find(
"HalfCylinder") != string::npos)
1365 else if (
dir_name.find(
"HalfCylinder") != string::npos)
1367 else if (
prefix ==
"SUMOFF" &&
dir_name.find(
"Disk") != string::npos)
1369 else if (
dir_name.find(
"Disk") != string::npos)
1371 else if (
dir_name.find(
"Blade") != string::npos)
1375 nbin =
me->getTH1F()->GetNbinsX();
1377 if ((*
iv) ==
"adcCOMB" || (*
iv) ==
"chargeCOMB")
1378 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1383 else if (
prefix ==
"SUMOFF" &&
dir_name.find(
"HalfCylinder") != string::npos)
1385 else if (
dir_name.find(
"HalfCylinder") != string::npos)
1387 else if (
prefix ==
"SUMOFF" &&
dir_name.find(
"Disk") != string::npos)
1389 else if (
dir_name.find(
"Disk") != string::npos)
1391 else if (
dir_name.find(
"Blade") != string::npos)
1396 for (vector<MonitorElement *>::const_iterator igm = gsum_mes.begin(); igm != gsum_mes.end(); igm++) {
1397 if ((*igm)->getName().find(
var) != string::npos) {
1399 (*igm)->setAxisTitle(
"Blades", 1);
1400 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1401 (*igm)->setAxisTitle(
"Digi charge [ADC]", 1);
1402 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1403 (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]", 1);
1405 (*igm)->setAxisTitle(
"Modules", 1);
1407 if ((*igm)->getName().find(
"NErrors_") != string::npos &&
prefix ==
"SUMOFF")
1408 title =
"Total number of errors per Blade";
1409 else if ((*igm)->getName().find(
"NErrors_") != string::npos &&
prefix ==
"SUMRAW")
1410 title =
"Total number of errors per Module";
1411 else if (
prefix ==
"SUMOFF")
1412 title =
"mean " + (*iv) +
" per Blade";
1413 else if ((*igm)->getName().find(
"FREQ_") != string::npos)
1414 title =
"NEvents with digis per Module";
1415 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1417 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1418 title =
"NClusters";
1420 title =
"mean " + (*iv) +
" per Module";
1421 (*igm)->setAxisTitle(
title, 2);
1424 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1426 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1428 }
else if ((*igm)->getName().find(
"Panel_") != string::npos) {
1430 }
else if ((*igm)->getName().find(
"Blade") != string::npos) {
1431 if ((*im).find(
"_1") != string::npos)
1433 if ((*im).find(
"_2") != string::npos) {
1437 }
else if ((*igm)->getName().find(
"Disk") != string::npos) {
1438 nbin_i = ((cnt - 1) % 12) * 7;
1440 }
else if ((*igm)->getName().find(
"HalfCylinder") != string::npos) {
1441 if (
prefix !=
"SUMOFF") {
1443 if ((*im).find(
"_2") != string::npos)
1447 if ((*im).find(
"_2") != string::npos)
1450 }
else if ((*igm)->getName().find(
"Endcap") != string::npos) {
1451 if (
prefix !=
"SUMOFF") {
1453 if ((*im).find(
"_mO") != string::npos)
1455 if ((*im).find(
"_pI") != string::npos)
1457 if ((*im).find(
"_pO") != string::npos)
1461 if ((*im).find(
"_mO") != string::npos)
1463 if ((*im).find(
"_pI") != string::npos)
1465 if ((*im).find(
"_pO") != string::npos)
1470 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1472 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1474 }
else if ((*igm)->getName().find(
"Panel_") != string::npos) {
1476 }
else if ((*igm)->getName().find(
"Blade") != string::npos) {
1477 if ((*im).find(
"_1") != string::npos)
1479 if ((*im).find(
"_2") != string::npos) {
1483 }
else if ((*igm)->getName().find(
"Disk") != string::npos) {
1484 nbin_i = ((cnt - 1) % 28) * 2;
1486 }
else if ((*igm)->getName().find(
"HalfCylinder") != string::npos) {
1487 if (
prefix !=
"SUMOFF") {
1489 if ((*im).find(
"_2") != string::npos)
1491 if ((*im).find(
"_3") != string::npos)
1495 if ((*im).find(
"_2") != string::npos)
1497 if ((*im).find(
"_3") != string::npos)
1500 }
else if ((*igm)->getName().find(
"Endcap") != string::npos) {
1501 if (
prefix !=
"SUMOFF") {
1503 if ((*im).find(
"_mO") != string::npos)
1505 if ((*im).find(
"_pI") != string::npos)
1507 if ((*im).find(
"_pO") != string::npos)
1511 if ((*im).find(
"_mO") != string::npos)
1513 if ((*im).find(
"_pI") != string::npos)
1515 if ((*im).find(
"_pO") != string::npos)
1521 if ((*igm)->getName().find(
"ndigisFREQ") == string::npos) {
1522 if (((*igm)->getName().find(
"adcCOMB") != string::npos &&
1523 me->getName().find(
"adcCOMB") != string::npos) ||
1524 ((*igm)->getName().find(
"chargeCOMB") != string::npos &&
1525 me->getName().find(
"chargeCOMB") != string::npos)) {
1526 (*igm)->getTH1F()->Add(
me->getTH1F());
1527 }
else if (((*igm)->getName().find(
"charge_") != string::npos &&
1528 (*igm)->getName().find(
"Track_") == string::npos &&
1529 me->getName().find(
"charge_") != string::npos &&
1530 me->getName().find(
"Track_") == string::npos) ||
1531 ((*igm)->getName().find(
"nclusters_") != string::npos &&
1532 (*igm)->getName().find(
"Track_") == string::npos &&
1533 me->getName().find(
"nclusters_") != string::npos &&
1534 me->getName().find(
"Track_") == string::npos) ||
1535 ((*igm)->getName().find(
"size_") != string::npos &&
1536 (*igm)->getName().find(
"Track_") == string::npos &&
1537 me->getName().find(
"size_") != string::npos &&
1538 me->getName().find(
"Track_") == string::npos) ||
1539 ((*igm)->getName().find(
"charge_OffTrack_") != string::npos &&
1540 me->getName().find(
"charge_OffTrack_") != string::npos) ||
1541 ((*igm)->getName().find(
"nclusters_OffTrack_") != string::npos &&
1542 me->getName().find(
"nclusters_OffTrack_") != string::npos) ||
1543 ((*igm)->getName().find(
"size_OffTrack_") != string::npos &&
1544 me->getName().find(
"size_OffTrack_") != string::npos) ||
1545 ((*igm)->getName().find(
"charge_OnTrack_") != string::npos &&
1546 me->getName().find(
"charge_OnTrack_") != string::npos) ||
1547 ((*igm)->getName().find(
"nclusters_OnTrack_") != string::npos &&
1548 me->getName().find(
"nclusters_OnTrack_") != string::npos) ||
1549 ((*igm)->getName().find(
"size_OnTrack_") != string::npos &&
1550 me->getName().find(
"size_OnTrack_") != string::npos) ||
1551 ((*igm)->getName().find(
"charge_") == string::npos &&
1552 (*igm)->getName().find(
"nclusters_") == string::npos &&
1553 (*igm)->getName().find(
"size_") == string::npos)) {
1554 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1555 if (
me->getBinContent(
k) > 0)
1556 (*igm)->setBinContent(
k + nbin_i,
me->getBinContent(
k));
1558 }
else if (
me->getName().find(
"ndigisFREQ") != string::npos) {
1559 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1560 if (
me->getBinContent(
k) > 0)
1561 (*igm)->setBinContent(
k + nbin_i,
me->getBinContent(
k));
1570 first_subdir =
false;
1582 if ((iBooker.
pwd()).
find(
"Pixel") == string::npos)
1586 for (vector<string>::const_iterator it =
contents.begin(); it !=
contents.end(); it++) {
1588 if ((*it).find(me_name) == 0) {
1589 string fullpathname = iBooker.
pwd() +
"/" + me_name;
1601 if (me_name.find(
"ALLMODS_adcCOMB_") != string::npos)
1602 temp_me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 128, 0, 256);
1603 else if (me_name.find(
"ALLMODS_chargeCOMB_") != string::npos)
1604 temp_me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 100, 0, 200);
1606 temp_me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), nbin, 1., nbin + 1.);
1608 mes.push_back(temp_me);
1624 if ((iBooker.
pwd()).
find(
"Pixel") == string::npos)
1628 for (vector<string>::const_iterator it =
contents.begin(); it !=
contents.end(); it++) {
1629 if ((*it).find(me_name) == 0) {
1630 string fullpathname = iBooker.
pwd() +
"/" + (*it);
1631 me = iGetter.
get(fullpathname);
1640 if (me_name.find(
"SUMOFF") == string::npos) {
1641 if (me_name.find(
"Blade_") != string::npos)
1642 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 7, 1., 8.);
1644 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 4, 1., 5.);
1645 }
else if (me_name.find(
"Layer_1") != string::npos) {
1646 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 10, 1., 11.);
1647 }
else if (me_name.find(
"Layer_2") != string::npos) {
1648 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 16, 1., 17.);
1649 }
else if (me_name.find(
"Layer_3") != string::npos) {
1650 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 22, 1., 23.);
1651 }
else if (me_name.find(
"Disk_") != string::npos) {
1652 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 12, 1., 13.);
1656 if (me_name.find(
"SUMOFF") == string::npos) {
1657 if (me_name.find(
"Blade_") != string::npos)
1658 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 2, 1., 3.);
1660 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 1, 1., 2.);
1661 }
else if (me_name.find(
"Layer_1") != string::npos) {
1662 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 6, 1., 7.);
1663 }
else if (me_name.find(
"Layer_2") != string::npos) {
1664 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 14, 1., 15.);
1665 }
else if (me_name.find(
"Layer_3") != string::npos) {
1666 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 22, 1., 23.);
1667 }
else if (me_name.find(
"Layer_4") != string::npos) {
1668 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 32, 1., 33.);
1669 }
else if (me_name.find(
"Disk_") != string::npos) {
1670 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 28, 1., 29.);
1683 if ((iBooker.
pwd()).
find(
"Pixel") == string::npos)
1687 for (vector<string>::const_iterator it =
contents.begin(); it !=
contents.end(); it++) {
1688 if ((*it).find(me_name) == 0) {
1689 string fullpathname = iBooker.
pwd() +
"/" + (*it);
1691 me = iGetter.
get(fullpathname);
1700 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 40, -0.5, 39.5);
1714 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
1715 if (isbarrel && (*it).find(
"Barrel") == string::npos)
1717 if (!isbarrel && (*it).find(
"Endcap") == string::npos)
1720 if ((*it).find(
"Module_") != string::npos)
1722 if ((*it).find(
"Panel_") != string::npos)
1724 if ((*it).find(
"Ladder_") != string::npos)
1726 if ((*it).find(
"Blade_") != string::npos)
1728 if ((*it).find(
"Layer_") != string::npos)
1730 if ((*it).find(
"Disk_") != string::npos)
1737 OccupancyMap = iBooker.
book2D((isbarrel ?
"barrelOccupancyMap" :
"endcapOccupancyMap"),
1738 "Barrel Digi Occupancy Map (4 pix per bin)",
1739 isbarrel ? 208 : 130,
1741 isbarrel ? 416. : 260.,
1747 OccupancyMap = iBooker.
book2D((isbarrel ?
"barrelOccupancyMap" :
"endcapOccupancyMap"),
1748 "Barrel Digi Occupancy Map (1 pix per bin)",
1749 isbarrel ? 416 : 260,
1751 isbarrel ? 416. : 260.,
1805 string currDir = iBooker.
pwd();
1806 string dname = currDir.substr(currDir.find_last_of(
'/') + 1);
1808 if (
dname.find(
"Layer_") != string::npos ||
dname.find(
"Disk_") != string::npos) {
1809 vector<string> meVec = iGetter.
getMEs();
1810 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1811 string full_path = currDir +
"/" + (*it);
1812 if (full_path.find(
"hitmap_siPixelDigis") != string::npos) {
1816 string path = full_path;
1817 while (
path.find_last_of(
'/') != 5)
1823 OccupancyMap = iGetter.
get(
path +
"/" + (isbarrel ?
"barrel" :
"endcap") +
"OccupancyMap");
1826 for (
int i = 1;
i !=
me->getNbinsX() + 1;
i++)
1827 for (
int j = 1;
j !=
me->getNbinsY() + 1;
j++) {
1838 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
1841 if (*it !=
"Pixel" &&
1842 ((isbarrel && (*it).find(
"Barrel") == string::npos) || (!isbarrel && (*it).find(
"Endcap") == string::npos)))
1864 float totalDigisBPIX = 0.;
1865 float totalDigisFPIX = 0.;
1866 for (
int i = 1;
i != 41;
i++) {
1872 float averageBPIXOcc = totalDigisBPIX / 32.;
1873 float averageFPIXOcc = totalDigisFPIX / 8.;
1874 for (
int i = 1;
i != 41;
i++) {
1893 float totalDigisBPIX = 0.;
1894 float totalDigisFPIX = 0.;
1895 for (
int i = 1;
i != 41;
i++) {
1897 totalDigisBPIX += avgfedDigiOccvsLumi->
getBinContent(lumisec,
i);
1899 totalDigisFPIX += avgfedDigiOccvsLumi->
getBinContent(lumisec,
i);
1901 float averageBPIXOcc = totalDigisBPIX / 32.;
1902 float averageFPIXOcc = totalDigisFPIX / 8.;
1903 for (
int i = 1;
i != 41;
i++) {
1906 lumisec,
i, averageBPIXOcc != 0. ? avgfedDigiOccvsLumi->
getBinContent(lumisec,
i) / averageBPIXOcc : 0.);
1909 lumisec,
i, averageFPIXOcc != 0. ? avgfedDigiOccvsLumi->
getBinContent(lumisec,
i) / averageFPIXOcc : 0.);
1925 "HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder", 9, -4.5, 4.5, 21, -10.5, 10.5);
1927 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder", 9, -4.5, 4.5, 33, -16.5, 16.5);
1929 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder", 9, -4.5, 4.5, 45, -22.5, 22.5);
1932 "HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder", 9, -4.5, 4.5, 21, -10.5, 10.5);
1934 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder", 9, -4.5, 4.5, 33, -16.5, 16.5);
1936 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder", 9, -4.5, 4.5, 45, -22.5, 22.5);
1942 iBooker.
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;z-side;Ladder", 2, -1., 1., 12, -6., 6.);
1944 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;z-side;Ladder", 2, -1., 1., 28, -14., 14.);
1946 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;z-side;Ladder", 2, -1., 1., 44, -22., 22.);
1948 "HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;z-side;Ladder", 2, -1., 1., 64, -32., 32.);
1951 iBooker.
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder", 8, -4., 4., 12, -6., 6.);
1953 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder", 8, -4., 4., 28, -14., 14.);
1955 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder", 8, -4., 4., 44, -22., 22.);
1957 "HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;Module;Ladder", 8, -4., 4., 64, -32., 32.);
1966 "HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
1968 "HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
1970 "HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
1972 "HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
1975 "HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules", 24, -12., 12., 7, 1., 8.);
1977 "HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules", 24, -12., 12., 7, 1., 8.);
1979 "HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules", 24, -12., 12., 7, 1., 8.);
1981 "HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules", 24, -12., 12., 7, 1., 8.);
1986 iBooker.
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;", 28, -17., 11., 1, 0., 1.);
1988 iBooker.
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;", 28, -17., 11., 1, 0., 1.);
1990 iBooker.
book2D(
"HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;", 28, -17., 11., 1, 0., 1.);
1992 iBooker.
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;", 28, -17., 11., 1, 0., 1.);
1994 iBooker.
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;", 28, -17., 11., 1, 0., 1.);
1996 iBooker.
book2D(
"HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;", 28, -17., 11., 1, 0., 1.);
1999 "HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2001 "HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2003 "HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2005 "HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2007 "HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2009 "HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2013 iBooker.
cd(
"Pixel/");
2014 string bins[] = {
"Layer1",
"Layer2",
"Layer3",
"Disk1+",
"Disk2+",
"Disk1-",
"Disk2-"};
2018 for (
int i = 1;
i < 8;
i++) {
2043 string lad = dname_.substr(dname_.find(
"Ladder_") + 7, 2);
2044 if (dname_.find(lad) != string::npos) {
2045 biny_ = atoi(lad.c_str());
2054 string blad = dname_.substr(dname_.find(
"Blade_") + 6, 2);
2055 if (dname_.find(blad) != string::npos) {
2056 binx_ = atoi(blad.c_str());
2068 string currDir = iBooker.
pwd();
2069 string dname = currDir.substr(currDir.find_last_of(
'/') + 1);
2073 if (isbarrel &&
dname.find(
"Ladder_") != string::npos) {
2075 vector<string> meVec = iGetter.
getMEs();
2076 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2077 string full_path = currDir +
"/" + (*it);
2079 if (full_path.find(
"missingMod_") != string::npos) {
2085 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2093 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2097 for (
int i = 1;
i < nMod + 1;
i++) {
2098 float hitEfficiency = -1.0;
2099 float missingHits = 0;
2100 float validHits = 0;
2102 if (currDir.find(
"Shell_m") != string::npos)
2105 missingHits =
missing->getBinContent(
i);
2106 validHits =
valid->getBinContent(
i);
2107 if (validHits + missingHits > 0.)
2108 hitEfficiency = validHits / (validHits + missingHits);
2110 if (currDir.find(
"Layer_1") != string::npos) {
2114 (
float)hitEfficiency);
2115 }
else if (currDir.find(
"Layer_2") != string::npos) {
2119 (
float)hitEfficiency);
2120 }
else if (currDir.find(
"Layer_3") != string::npos) {
2124 (
float)hitEfficiency);
2131 vector<string> meVec = iGetter.
getMEs();
2132 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2133 string full_path = currDir +
"/" + (*it);
2134 if (full_path.find(
"missing_") != string::npos) {
2138 float missingHits =
me->getEntries();
2139 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2140 me = iGetter.
get(new_path);
2143 float validHits =
me->getEntries();
2144 float hitEfficiency = -1.;
2145 if (validHits + missingHits > 0.)
2146 hitEfficiency = validHits / (validHits + missingHits);
2150 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2153 if (currDir.find(
"Shell_m") != string::npos) {
2158 if (currDir.find(
"Layer_1") != string::npos) {
2162 }
else if (currDir.find(
"Layer_2") != string::npos) {
2166 }
else if (currDir.find(
"Layer_3") != string::npos) {
2170 }
else if (currDir.find(
"Layer_4") != string::npos) {
2178 }
else if (!isbarrel &&
dname.find(
"Blade_") != string::npos && !
isUpgrade) {
2179 vector<string> meVec = iGetter.
getMEs();
2180 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2181 string full_path = currDir +
"/" + (*it);
2182 if (full_path.find(
"missing_") != string::npos) {
2187 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2195 if (currDir.find(
"HalfCylinder_mI") != string::npos || currDir.find(
"HalfCylinder_pI") != string::npos) {
2200 const int nPanel = 2;
2201 for (
int i = 1;
i < nPanel + 1;
i++) {
2202 float hitEfficiency = -1.;
2203 float missingHits = 0;
2204 float validHits = 0;
2206 missingHits =
missing->getBinContent(
i);
2207 validHits =
valid->getBinContent(
i);
2208 if (validHits + missingHits > 0.)
2209 hitEfficiency = validHits / (validHits + missingHits);
2210 if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2214 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2218 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2222 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2230 }
else if (!isbarrel &&
dname.find(
"Blade_") != string::npos &&
isUpgrade) {
2231 vector<string> meVec = iGetter.
getMEs();
2232 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2233 string full_path = currDir +
"/" + (*it);
2234 if (full_path.find(
"missing_") != string::npos) {
2238 float missingHits =
me->getEntries();
2239 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2240 me = iGetter.
get(new_path);
2243 float validHits =
me->getEntries();
2244 float hitEfficiency = -1.;
2245 if (validHits + missingHits > 0.)
2246 hitEfficiency = validHits / (validHits + missingHits);
2250 if (currDir.find(
"HalfCylinder_mI") != string::npos || currDir.find(
"HalfCylinder_pI") != string::npos) {
2271 else if (binx == 10)
2273 else if (binx == 11)
2275 else if (binx == 12)
2277 else if (binx == 13)
2279 else if (binx == 14)
2281 else if (binx == 15)
2283 else if (binx == 16)
2285 else if (binx == 17)
2288 if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2292 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2296 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2300 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2304 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2308 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2319 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
2322 if (*it !=
"Pixel" &&
2323 ((isbarrel && (*it).find(
"Barrel") == string::npos) || (!isbarrel && (*it).find(
"Endcap") == string::npos)))
2331 if (
dname.find(
"Module_") != string::npos) {
2332 vector<string> meVec = iGetter.
getMEs();
2333 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2334 string full_path = currDir +
"/" + (*it);
2335 if (full_path.find(
"missing_") != string::npos) {
2339 float missingHits =
me->getEntries();
2340 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2341 me = iGetter.
get(new_path);
2344 float validHits =
me->getEntries();
2345 float hitEfficiency = -1.;
2346 if (validHits + missingHits > 0.)
2347 hitEfficiency = validHits / (validHits + missingHits);
2351 if (currDir.find(
"Shell_m") != string::npos) {
2352 if (currDir.find(
"Module_4") != string::npos) {
2354 }
else if (currDir.find(
"Module_3") != string::npos) {
2357 if (currDir.find(
"Module_2") != string::npos) {
2359 }
else if (currDir.find(
"Module_1") != string::npos) {
2362 }
else if (currDir.find(
"Shell_p") != string::npos) {
2363 if (currDir.find(
"Module_1") != string::npos) {
2365 }
else if (currDir.find(
"Module_2") != string::npos) {
2368 if (currDir.find(
"Module_3") != string::npos) {
2370 }
else if (currDir.find(
"Module_4") != string::npos) {
2375 if (currDir.find(
"01") != string::npos) {
2377 }
else if (currDir.find(
"02") != string::npos) {
2379 }
else if (currDir.find(
"03") != string::npos) {
2381 }
else if (currDir.find(
"04") != string::npos) {
2383 }
else if (currDir.find(
"05") != string::npos) {
2385 }
else if (currDir.find(
"06") != string::npos) {
2387 }
else if (currDir.find(
"07") != string::npos) {
2389 }
else if (currDir.find(
"08") != string::npos) {
2391 }
else if (currDir.find(
"09") != string::npos) {
2393 }
else if (currDir.find(
"10") != string::npos) {
2395 }
else if (currDir.find(
"11") != string::npos) {
2397 }
else if (currDir.find(
"12") != string::npos) {
2399 }
else if (currDir.find(
"13") != string::npos) {
2401 }
else if (currDir.find(
"14") != string::npos) {
2403 }
else if (currDir.find(
"15") != string::npos) {
2405 }
else if (currDir.find(
"16") != string::npos) {
2407 }
else if (currDir.find(
"17") != string::npos) {
2409 }
else if (currDir.find(
"18") != string::npos) {
2411 }
else if (currDir.find(
"19") != string::npos) {
2413 }
else if (currDir.find(
"20") != string::npos) {
2415 }
else if (currDir.find(
"21") != string::npos) {
2417 }
else if (currDir.find(
"22") != string::npos) {
2420 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2421 if (currDir.find(
"Layer_1") != string::npos) {
2423 }
else if (currDir.find(
"Layer_2") != string::npos) {
2425 }
else if (currDir.find(
"Layer_3") != string::npos) {
2430 if (currDir.find(
"01") != string::npos) {
2432 }
else if (currDir.find(
"02") != string::npos) {
2434 }
else if (currDir.find(
"03") != string::npos) {
2436 }
else if (currDir.find(
"04") != string::npos) {
2438 }
else if (currDir.find(
"05") != string::npos) {
2440 }
else if (currDir.find(
"06") != string::npos) {
2442 }
else if (currDir.find(
"07") != string::npos) {
2444 }
else if (currDir.find(
"08") != string::npos) {
2446 }
else if (currDir.find(
"09") != string::npos) {
2448 }
else if (currDir.find(
"10") != string::npos) {
2450 }
else if (currDir.find(
"11") != string::npos) {
2452 }
else if (currDir.find(
"12") != string::npos) {
2454 }
else if (currDir.find(
"13") != string::npos) {
2456 }
else if (currDir.find(
"14") != string::npos) {
2458 }
else if (currDir.find(
"15") != string::npos) {
2460 }
else if (currDir.find(
"16") != string::npos) {
2462 }
else if (currDir.find(
"17") != string::npos) {
2464 }
else if (currDir.find(
"18") != string::npos) {
2466 }
else if (currDir.find(
"19") != string::npos) {
2468 }
else if (currDir.find(
"20") != string::npos) {
2470 }
else if (currDir.find(
"21") != string::npos) {
2472 }
else if (currDir.find(
"22") != string::npos) {
2474 }
else if (currDir.find(
"23") != string::npos) {
2476 }
else if (currDir.find(
"24") != string::npos) {
2478 }
else if (currDir.find(
"25") != string::npos) {
2480 }
else if (currDir.find(
"25") != string::npos) {
2482 }
else if (currDir.find(
"26") != string::npos) {
2484 }
else if (currDir.find(
"27") != string::npos) {
2486 }
else if (currDir.find(
"28") != string::npos) {
2488 }
else if (currDir.find(
"29") != string::npos) {
2490 }
else if (currDir.find(
"30") != string::npos) {
2492 }
else if (currDir.find(
"31") != string::npos) {
2494 }
else if (currDir.find(
"32") != string::npos) {
2497 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2498 if (currDir.find(
"Layer_1") != string::npos) {
2500 }
else if (currDir.find(
"Layer_2") != string::npos) {
2502 }
else if (currDir.find(
"Layer_3") != string::npos) {
2504 }
else if (currDir.find(
"Layer_4") != string::npos) {
2511 if (currDir.find(
"01") != string::npos) {
2513 }
else if (currDir.find(
"02") != string::npos) {
2515 }
else if (currDir.find(
"03") != string::npos) {
2517 }
else if (currDir.find(
"04") != string::npos) {
2519 }
else if (currDir.find(
"05") != string::npos) {
2521 }
else if (currDir.find(
"06") != string::npos) {
2523 }
else if (currDir.find(
"07") != string::npos) {
2525 }
else if (currDir.find(
"08") != string::npos) {
2527 }
else if (currDir.find(
"09") != string::npos) {
2529 }
else if (currDir.find(
"10") != string::npos) {
2531 }
else if (currDir.find(
"11") != string::npos) {
2533 }
else if (currDir.find(
"12") != string::npos) {
2536 if (currDir.find(
"HalfCylinder_mO") != string::npos || currDir.find(
"HalfCylinder_pO") != string::npos) {
2539 if (currDir.find(
"Panel_1/Module_1") != string::npos) {
2541 }
else if (currDir.find(
"Panel_2/Module_1") != string::npos) {
2543 }
else if (currDir.find(
"Panel_1/Module_2") != string::npos) {
2545 }
else if (currDir.find(
"Panel_2/Module_2") != string::npos) {
2547 }
else if (currDir.find(
"Panel_1/Module_3") != string::npos) {
2549 }
else if (currDir.find(
"Panel_2/Module_3") != string::npos) {
2551 }
else if (currDir.find(
"Panel_1/Module_4") != string::npos) {
2555 if (currDir.find(
"01") != string::npos) {
2557 }
else if (currDir.find(
"02") != string::npos) {
2559 }
else if (currDir.find(
"03") != string::npos) {
2561 }
else if (currDir.find(
"04") != string::npos) {
2563 }
else if (currDir.find(
"05") != string::npos) {
2565 }
else if (currDir.find(
"06") != string::npos) {
2567 }
else if (currDir.find(
"07") != string::npos) {
2569 }
else if (currDir.find(
"08") != string::npos) {
2571 }
else if (currDir.find(
"09") != string::npos) {
2573 }
else if (currDir.find(
"10") != string::npos) {
2575 }
else if (currDir.find(
"11") != string::npos) {
2577 }
else if (currDir.find(
"12") != string::npos) {
2579 }
else if (currDir.find(
"13") != string::npos) {
2581 }
else if (currDir.find(
"14") != string::npos) {
2583 }
else if (currDir.find(
"15") != string::npos) {
2585 }
else if (currDir.find(
"16") != string::npos) {
2587 }
else if (currDir.find(
"17") != string::npos) {
2590 if (currDir.find(
"HalfCylinder_mO") != string::npos || currDir.find(
"HalfCylinder_pO") != string::npos) {
2593 if (currDir.find(
"Panel_1/Module_1") != string::npos) {
2595 }
else if (currDir.find(
"Panel_2/Module_1") != string::npos) {
2601 if (currDir.find(
"Layer_1") != string::npos) {
2605 }
else if (currDir.find(
"Layer_2") != string::npos) {
2609 }
else if (currDir.find(
"Layer_3") != string::npos) {
2613 }
else if (
isUpgrade && (currDir.find(
"Layer_4") != string::npos)) {
2617 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2621 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2625 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2629 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2633 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2637 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2647 for (vector<string>::const_iterator it =
subdirs.begin(); it !=
subdirs.end(); it++) {
2650 if (*it !=
"Pixel" &&
2651 ((isbarrel && (*it).find(
"Barrel") == string::npos) || (!isbarrel && (*it).find(
"Endcap") == string::npos)))
2672 string hitEfficiencyPostfix[] = {
"L1",
"L2",
"L3",
"Dp1",
"Dp2",
"Dm1",
"Dm2"};
2673 std::vector<std::vector<float>> ignoreXBins = {
2674 {-4, 2}, {4, 4, -1, -3, 3, -4, -3, -2, -1, -4, -3, -2, -1, 1, -4}, {1, -4, 1}, {}, {}, {}, {}};
2675 std::vector<std::vector<float>> ignoreYBins = {
2676 {-9, -3}, {1, 16, 1, -13, -13, -5, -5, -5, -5, -6, -6, -6, -6, -8, -8}, {3, 14, 6}, {}, {}, {}, {}};
2678 for (
int i = 0;
i < 7;
i++) {
2679 string subdetName =
"Endcap/";
2681 subdetName =
"Barrel/";
2683 sprintf(meName,
"Pixel/%sHitEfficiency_%s", subdetName.c_str(), hitEfficiencyPostfix[
i].c_str());
2685 float totalEff = 0.;
2687 TH1 *hitEffMap = tempHitEffMap->
getTH1();
2688 for (
int xBin = 1;
xBin < tempHitEffMap->getNbinsX() + 1;
xBin++) {
2689 if (fabs(hitEffMap->GetXaxis()->GetBinCenter(
xBin)) < 1.)
2691 for (
int yBin = 1;
yBin < tempHitEffMap->getNbinsY() + 1;
yBin++) {
2692 if (fabs(hitEffMap->GetYaxis()->GetBinCenter(
yBin)) < 0.5)
2695 for (
unsigned int j = 0;
j < ignoreXBins[
i].size();
j++) {
2696 if (hitEffMap->GetXaxis()->GetBinCenter(
xBin) == ignoreXBins[
i][
j] &&
2697 hitEffMap->GetYaxis()->GetBinCenter(
yBin) == ignoreYBins[
i][
j]) {
2704 if (!(tempHitEffMap->getBinContent(
xBin,
yBin) < 0.))
2705 totalEff += tempHitEffMap->getBinContent(
xBin,
yBin);
2709 float overalEff = 0.;
2712 overalEff = totalEff /
float(totalBins);
void normaliseAvDigiOccVsLumi(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int lumisec)
void getGrandSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int nbin, std::string &me_name, std::vector< MonitorElement *> &mes)
MonitorElement * HitEfficiency_Dp3
virtual void setCurrentFolder(std::string const &fullpath)
void createEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade)
virtual std::vector< std::string > getMEs() const
virtual std::string pwd()
MonitorElement * HitEfficiency_L4
void bookOccupancyPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes, bool isbarrel)
MonitorElement * DEV_size_Barrel
MonitorElement * HitEfficiency_L3
SiPixelConfigParser * configParser_
MonitorElement * DEV_nclusters_Barrel
void fillGrandEndcapSummaryHistos(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
bool getMENamesForEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int getBlade(const std::string &dname)
void normaliseAvDigiOcc(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
bool getCalibType(int &u_freq)
void fillEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel, bool isUpgrade)
virtual TH2F * getTH2F() const
MonitorElement * OccupancyMap
bool getMENamesForGrandEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
SiPixelConfigWriter * configWriter_
bool getFrequencyForGrandBarrelSummary(int &u_freq)
bool getFrequencyForEndcapSummary(int &u_freq)
bool getMENamesForFEDErrorSummary(std::string &structure_name, std::vector< std::string > &me_names)
void bookDeviations(DQMStore::IBooker &iBooker, bool isUpgrade)
void createSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade)
MonitorElement * DEV_adc_Endcap
bool getMENamesForGrandBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
bool getFrequencyForBarrelSummary(int &u_freq)
void fillFEDErrorSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names)
bool getFrequencyForGrandEndcapSummary(int &u_freq)
MonitorElement * DEV_charge_Endcap
bool getMENamesForBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
int getLadder(const std::string &dname)
MonitorElement * getSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name, bool isUpgrade)
void fillOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel)
MonitorElement * getFEDSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name)
Log< level::Info, false > LogInfo
SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag)
MonitorElement * DEV_charge_Barrel
MonitorElement * HitEfficiency_Dm3
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
bool getMessageLimitForQTests(int &u_freq)
MonitorElement * HitEfficiency_L1
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * DEV_nclusters_Endcap
MonitorElement * HitEfficiency_Dp1
virtual MonitorElement * get(std::string const &fullpath) const
bool getSourceType(int &u_freq)
virtual TH1 * getTH1() const
MonitorElement * DEV_size_Endcap
MonitorElement * HitEfficiencySummary
std::string tname(const std::string &tableName, const std::string &schemaVersion)
void fillEfficiencySummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void createOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
MonitorElement * HitEfficiency_Dp2
void getDocument(std::string filename)
bool getFrequencyForTrackerMap(int &u_freq)
void fillGrandBarrelSummaryHistos(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
void fillSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * DEV_ndigis_Endcap
void GetBladeSubdirs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &blade_subdirs)
MonitorElement * HitEfficiency_Dm1
MonitorElement * DEV_ndigis_Barrel
void bookEfficiency(DQMStore::IBooker &iBooker, bool isUpgrade)
MonitorElement * DEV_adc_Barrel
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const