29 : offlineXMLfile_(offlineXMLfile), Tier0Flag_(Tier0Flag) {
30 edm::LogInfo(
"SiPixelActionExecutor") <<
" Creating SiPixelActionExecutor " 42 edm::LogInfo(
"SiPixelActionExecutor") <<
" Deleting SiPixelActionExecutor " 56 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
58 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
71 int &sum_grandbarrel_freq,
72 int &sum_grandendcap_freq,
80 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
82 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
89 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read " 90 "TrackerMap configuration parameters!! ";
94 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Barrel Summary configuration parameters!! " 99 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " 104 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Barrel Summary configuration parameters!! " 109 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Endcap Summary configuration parameters!! " 114 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read QTest Message Limit" 119 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Source Type" 124 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Calib Type" 138 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
140 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
147 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read " 148 "TrackerMap configuration parameters!! ";
152 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Summary configuration parameters!! " 166 string barrel_structure_name;
167 vector<string> barrel_me_names;
170 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
172 localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
179 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Barrel " 180 "Summary configuration parameters!! ";
187 fillSummary(iBooker, iGetter, barrel_structure_name, barrel_me_names,
true,
191 string endcap_structure_name;
192 vector<string> endcap_me_names;
194 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " 204 fillSummary(iBooker, iGetter, endcap_structure_name, endcap_me_names,
false,
210 string federror_structure_name;
211 vector<string> federror_me_names;
213 cout <<
"SiPixelActionExecutor::createSummary: Failed to read FED Error " 214 "Summary configuration parameters!! ";
242 "DEV_adc_Barrel",
"Deviation from reference;Module;<adc_ref>-<adc>", nBPixModules, 0., nBPixModules);
244 "DEV_ndigis_Barrel",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>", nBPixModules, 0., nBPixModules);
246 "DEV_charge_Barrel",
"Deviation from reference;Module;<charge_ref>-<charge>", nBPixModules, 0., nBPixModules);
248 "Deviation from reference;Module;<nclusters_ref>-<nclusters>",
253 "DEV_size_Barrel",
"Deviation from reference;Module;<size_ref>-<size>", nBPixModules, 0., nBPixModules);
256 DEV_adc_Endcap = iBooker.
book1D(
"DEV_adc_Endcap",
"Deviation from reference;Module;<adc_ref>-<adc>", 672, 0., 672.);
258 iBooker.
book1D(
"DEV_ndigis_Endcap",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>", 672, 0., 672.);
260 iBooker.
book1D(
"DEV_charge_Endcap",
"Deviation from reference;Module;<charge_ref>-<charge>", 672, 0., 672.);
262 "DEV_nclusters_Endcap",
"Deviation from reference;Module;<nclusters_ref>-<nclusters>", 672, 0., 672.);
264 iBooker.
book1D(
"DEV_size_Endcap",
"Deviation from reference;Module;<size_ref>-<size>", 672, 0., 672.);
285 me1 = iGetter.
get(
"Pixel/Barrel/SUMDIG_adc_Barrel");
287 dev1 = iGetter.
get(
"Pixel/Barrel/DEV_adc_Barrel");
288 me2 = iGetter.
get(
"Pixel/Barrel/SUMDIG_ndigis_Barrel");
290 dev2 = iGetter.
get(
"Pixel/Barrel/DEV_ndigis_Barrel");
291 me3 = iGetter.
get(
"Pixel/Barrel/SUMCLU_charge_Barrel");
293 dev3 = iGetter.
get(
"Pixel/Barrel/DEV_charge_Barrel");
294 me4 = iGetter.
get(
"Pixel/Barrel/SUMCLU_nclusters_Barrel");
296 dev4 = iGetter.
get(
"Pixel/Barrel/DEV_nclusters_Barrel");
297 me5 = iGetter.
get(
"Pixel/Barrel/SUMCLU_size_Barrel");
299 dev5 = iGetter.
get(
"Pixel/Barrel/DEV_size_Barrel");
300 for (
int i = 1;
i != n + 1;
i++) {
308 ref_value = ref1->GetBinContent(
i);
316 ref_value = ref2->GetBinContent(
i);
324 ref_value = ref3->GetBinContent(
i);
332 ref_value = ref4->GetBinContent(
i);
340 ref_value = ref5->GetBinContent(
i);
361 me11 = iGetter.
get(
"Pixel/Endcap/SUMDIG_adc_Endcap");
363 dev11 = iGetter.
get(
"Pixel/Endcap/DEV_adc_Endcap");
364 me12 = iGetter.
get(
"Pixel/Endcap/SUMDIG_ndigis_Endcap");
366 dev12 = iGetter.
get(
"Pixel/Endcap/DEV_ndigis_Endcap");
367 me13 = iGetter.
get(
"Pixel/Endcap/SUMCLU_charge_Endcap");
369 dev13 = iGetter.
get(
"Pixel/Endcap/DEV_charge_Endcap");
370 me14 = iGetter.
get(
"Pixel/Endcap/SUMCLU_nclusters_Endcap");
372 dev14 = iGetter.
get(
"Pixel/Endcap/DEV_nclusters_Endcap");
373 me15 = iGetter.
get(
"Pixel/Endcap/SUMCLU_size_Endcap");
375 dev15 = iGetter.
get(
"Pixel/Endcap/DEV_size_Endcap");
376 for (
int i = 1;
i != nn + 1;
i++) {
384 ref_value = ref11->GetBinContent(
i);
392 ref_value = ref12->GetBinContent(
i);
400 ref_value = ref13->GetBinContent(
i);
408 ref_value = ref14->GetBinContent(
i);
416 ref_value = ref15->GetBinContent(
i);
426 vector<string> &blade_subdirs) {
427 blade_subdirs.clear();
430 for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
434 for (vector<string>::const_iterator m_it = modules.begin(); m_it != modules.end(); m_it++) {
435 blade_subdirs.push_back(*m_it);
445 vector<string> &me_names,
449 string currDir = iBooker.
pwd();
465 if (currDir.find(dir_name) != string::npos) {
466 vector<MonitorElement *> sum_mes;
467 for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
469 if ((*iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
470 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" || (*iv) ==
"ROCId" ||
471 (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" || (*iv) ==
"TBMMessage" ||
472 (*iv) ==
"Type36Hitmap")
474 else if ((*iv) ==
"ndigis" || (*iv) ==
"adc")
476 else if ((*iv) ==
"nclusters" || (*iv) ==
"x" || (*iv) ==
"y" || (*iv) ==
"charge" || (*iv) ==
"size" ||
477 (*iv) ==
"sizeX" || (*iv) ==
"sizeY" || (*iv) ==
"minrow" || (*iv) ==
"maxrow" || (*iv) ==
"mincol" ||
480 if (currDir.find(
"Track") != string::npos)
482 else if ((*iv) ==
"residualX" || (*iv) ==
"residualY")
484 else if ((*iv) ==
"ClustX" || (*iv) ==
"ClustY" || (*iv) ==
"nRecHits" || (*iv) ==
"ErrorX" ||
487 else if ((*iv) ==
"Gain1d" || (*iv) ==
"GainChi2NDF1d" || (*iv) ==
"GainChi2Prob1d" || (*iv) ==
"Pedestal1d" ||
488 (*iv) ==
"GainNPoints1d" || (*iv) ==
"GainHighPoint1d" || (*iv) ==
"GainLowPoint1d" ||
489 (*iv) ==
"GainEndPoint1d" || (*iv) ==
"GainFitResult2d" || (*iv) ==
"GainDynamicRange2d" ||
490 (*iv) ==
"GainSaturate2d" || (*iv) ==
"ScurveChi2ProbSummary" || (*iv) ==
"ScurveFitResultSummary" ||
491 (*iv) ==
"ScurveSigmasSummary" || (*iv) ==
"ScurveThresholdSummary" || (*iv) ==
"pixelAliveSummary" ||
492 (*iv) ==
"SiPixelErrorsCalibDigis")
497 if ((*iv).find(
"residual") != string::npos) {
498 tag = prefix +
"_" + (*iv) +
"_mean_" + currDir.substr(currDir.find(dir_name));
500 sum_mes.push_back(temp);
501 tag = prefix +
"_" + (*iv) +
"_RMS_" + currDir.substr(currDir.find(dir_name));
503 sum_mes.push_back(temp);
504 }
else if (prefix ==
"SUMCAL") {
505 if ((*iv) ==
"Gain1d" || (*iv) ==
"GainChi2NDF1d" || (*iv) ==
"GainChi2Prob1d" || (*iv) ==
"GainNPoints1d" ||
506 (*iv) ==
"GainHighPoint1d" || (*iv) ==
"GainLowPoint1d" || (*iv) ==
"GainEndPoint1d" ||
507 (*iv) ==
"GainDynamicRange2d" || (*iv) ==
"GainSaturate2d" || (*iv) ==
"Pedestal1d" ||
508 (*iv) ==
"ScurveChi2ProbSummary" || (*iv) ==
"ScurveFitResultSummary" || (*iv) ==
"ScurveSigmasSummary" ||
509 (*iv) ==
"ScurveThresholdSummary") {
510 tag = prefix +
"_" + (*iv) +
"_mean_" + currDir.substr(currDir.find(dir_name));
512 sum_mes.push_back(temp);
513 tag = prefix +
"_" + (*iv) +
"_RMS_" + currDir.substr(currDir.find(dir_name));
515 sum_mes.push_back(temp);
516 }
else if ((*iv) ==
"SiPixelErrorsCalibDigis") {
517 tag = prefix +
"_" + (*iv) +
"_NCalibErrors_" + currDir.substr(currDir.find(dir_name));
519 sum_mes.push_back(temp);
520 }
else if ((*iv) ==
"GainFitResult2d") {
521 tag = prefix +
"_" + (*iv) +
"_NNegativeFits_" + currDir.substr(currDir.find(dir_name));
523 sum_mes.push_back(temp);
524 }
else if ((*iv) ==
"pixelAliveSummary") {
525 tag = prefix +
"_" + (*iv) +
"_FracOfPerfectPix_" + currDir.substr(currDir.find(dir_name));
527 sum_mes.push_back(temp);
528 tag = prefix +
"_" + (*iv) +
"_mean_" + currDir.substr(currDir.find(dir_name));
530 sum_mes.push_back(temp);
533 tag = prefix +
"_" + (*iv) +
"_" + currDir.substr(currDir.find(dir_name));
535 sum_mes.push_back(temp);
536 if ((*iv) ==
"ndigis") {
537 tag = prefix +
"_" + (*iv) +
"FREQ_" + currDir.substr(currDir.find(dir_name));
539 sum_mes.push_back(temp);
541 if (prefix ==
"SUMDIG" && (*iv) ==
"adc") {
542 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(dir_name));
544 string fullpathname = iBooker.
pwd() +
"/" +
tag;
545 temp = iGetter.
get(fullpathname);
549 temp = iBooker.
book1D(tag.c_str(), tag.c_str(), 128, 0., 256.);
551 sum_mes.push_back(temp);
553 if (prefix ==
"SUMCLU" && (*iv) ==
"charge") {
554 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(dir_name));
556 string fullpathname = iBooker.
pwd() +
"/" +
tag;
557 temp = iGetter.
get(fullpathname);
561 temp = iBooker.
book1D(tag.c_str(), tag.c_str(), 100, 0.,
564 sum_mes.push_back(temp);
568 if (sum_mes.empty()) {
569 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" 573 vector<string> subdirs = iGetter.
getSubdirs();
575 if (dir_name.find(
"Blade_") == 0)
579 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
580 if (prefix !=
"SUMOFF" && (*it).find(
"Module_") == string::npos)
582 if (prefix ==
"SUMOFF" && (*it).find(isbarrel ?
"Layer_" :
"Disk_") == string::npos)
590 for (vector<MonitorElement *>::const_iterator
isum = sum_mes.begin();
isum != sum_mes.end();
isum++) {
591 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
592 string sname = ((*isum)->getName());
594 tname = sname.substr(7, (sname.find(
"_", 7) - 6));
595 if (sname.find(
"ALLMODS_adcCOMB_") != string::npos)
597 if (sname.find(
"ALLMODS_chargeCOMB_") != string::npos)
599 if (sname.find(
"_charge_") != string::npos && sname.find(
"Track_") == string::npos)
601 if (sname.find(
"_nclusters_") != string::npos && sname.find(
"Track_") == string::npos)
602 tname =
"nclusters_";
603 if (sname.find(
"_size_") != string::npos && sname.find(
"Track_") == string::npos)
605 if (sname.find(
"_charge_OffTrack_") != string::npos)
606 tname =
"charge_OffTrack_";
607 if (sname.find(
"_nclusters_OffTrack_") != string::npos)
608 tname =
"nclusters_OffTrack_";
609 if (sname.find(
"_size_OffTrack_") != string::npos)
610 tname =
"size_OffTrack_";
611 if (sname.find(
"_sizeX_OffTrack_") != string::npos)
612 tname =
"sizeX_OffTrack_";
613 if (sname.find(
"_sizeY_OffTrack_") != string::npos)
614 tname =
"sizeY_OffTrack_";
615 if (sname.find(
"_charge_OnTrack_") != string::npos)
616 tname =
"charge_OnTrack_";
617 if (sname.find(
"_nclusters_OnTrack_") != string::npos)
618 tname =
"nclusters_OnTrack_";
619 if (sname.find(
"_size_OnTrack_") != string::npos)
620 tname =
"size_OnTrack_";
621 if (sname.find(
"_sizeX_OnTrack_") != string::npos)
622 tname =
"sizeX_OnTrack_";
623 if (sname.find(
"_sizeY_OnTrack_") != string::npos)
624 tname =
"sizeY_OnTrack_";
625 if (tname.find(
"FREQ") != string::npos)
627 if (((*im)).find(tname) == 0) {
628 string fullpathname = iBooker.
pwd() +
"/" + (*im);
632 if (sname.find(
"_charge") != string::npos && sname.find(
"Track_") == string::npos &&
633 me->
getName().find(
"Track_") != string::npos)
635 if (sname.find(
"_nclusters_") != string::npos && sname.find(
"Track_") == string::npos &&
636 me->
getName().find(
"Track_") != string::npos)
638 if (sname.find(
"_size") != string::npos && sname.find(
"Track_") == string::npos &&
639 me->
getName().find(
"Track_") != string::npos)
642 if (sname.find(
"_RMS_") != string::npos && sname.find(
"GainDynamicRange2d") == string::npos &&
643 sname.find(
"GainSaturate2d") == string::npos) {
645 }
else if (sname.find(
"GainDynamicRange2d") != string::npos ||
646 sname.find(
"GainSaturate2d") != string::npos) {
647 float SumOfEntries = 0.;
648 float SumOfSquaredEntries = 0.;
650 for (
int cols = 1; cols != me->
getNbinsX() + 1; cols++)
657 float MeanInZ = SumOfEntries /
float(SumOfPixels);
658 float RMSInZ =
sqrt(SumOfSquaredEntries /
float(SumOfPixels));
659 if (sname.find(
"_mean_") != string::npos)
660 (*isum)->Fill(ndet, MeanInZ);
661 if (sname.find(
"_RMS_") != string::npos)
662 (*isum)->Fill(ndet, RMSInZ);
663 }
else if (sname.find(
"_FracOfPerfectPix_") != string::npos) {
665 float nall = (me->
getTH1F())->Integral(1, 11);
666 (*isum)->Fill(ndet, nlast / nall);
667 }
else if (sname.find(
"_NCalibErrors_") != string::npos || sname.find(
"FREQ_") != string::npos) {
669 (*isum)->Fill(ndet, nall);
670 }
else if (sname.find(
"GainFitResult2d") != string::npos) {
671 int NegFitPixels = 0;
672 for (
int cols = 1; cols != me->
getNbinsX() + 1; cols++)
677 (*isum)->Fill(ndet,
float(NegFitPixels));
678 }
else if (sname.find(
"ALLMODS_adcCOMB_") != string::npos ||
679 (sname.find(
"ALLMODS_chargeCOMB_") != string::npos &&
680 me->
getName().find(
"Track_") == string::npos)) {
681 (*isum)->getTH1F()->Add(me->
getTH1F());
682 }
else if (sname.find(
"_NErrors_") != string::npos) {
683 string path1 = fullpathname;
684 path1 = path1.replace(path1.find(
"NErrors"), 7,
"errorType");
686 bool notReset =
true;
688 for (
int jj = 1;
jj < 16;
jj++) {
691 string path2 = path1;
692 path2 = path2.replace(path2.find(
"errorType"), 9,
"TBMMessage");
703 }
else if ((sname.find(
"_charge_") != string::npos && sname.find(
"Track_") == string::npos &&
704 me->
getName().find(
"Track_") == string::npos) ||
705 (sname.find(
"_charge_") != string::npos && sname.find(
"_OnTrack_") != string::npos &&
706 me->
getName().find(
"_OnTrack_") != string::npos) ||
707 (sname.find(
"_charge_") != string::npos && sname.find(
"_OffTrack_") != string::npos &&
708 me->
getName().find(
"_OffTrack_") != string::npos) ||
709 (sname.find(
"_nclusters_") != string::npos && sname.find(
"Track_") == string::npos &&
710 me->
getName().find(
"Track_") == string::npos) ||
711 (sname.find(
"_nclusters_") != string::npos && sname.find(
"_OnTrack_") != string::npos &&
712 me->
getName().find(
"_OnTrack_") != string::npos) ||
713 (sname.find(
"_nclusters_") != string::npos && sname.find(
"_OffTrack_") != string::npos &&
714 me->
getName().find(
"_OffTrack_") != string::npos) ||
715 (sname.find(
"_size") != string::npos && sname.find(
"Track_") == string::npos &&
716 me->
getName().find(
"Track_") == string::npos) ||
717 (sname.find(
"_size") != string::npos && sname.find(
"_OnTrack_") != string::npos &&
718 me->
getName().find(
"_OnTrack_") != string::npos) ||
719 (sname.find(
"_size") != string::npos && sname.find(
"_OffTrack_") != string::npos &&
720 me->
getName().find(
"_OffTrack_") != string::npos)) {
721 (*isum)->Fill(ndet, me->
getMean());
722 }
else if (sname.find(
"_charge_") == string::npos && sname.find(
"_nclusters_") == string::npos &&
723 sname.find(
"_size") == string::npos) {
724 (*isum)->Fill(ndet, me->
getMean());
728 if (prefix ==
"SUMOFF") {
729 (*isum)->setAxisTitle(isbarrel ?
"Ladders" :
"Blades", 1);
730 }
else if (sname.find(
"ALLMODS_adcCOMB_") != string::npos) {
731 (*isum)->setAxisTitle(
"Digi charge [ADC]", 1);
732 }
else if (sname.find(
"ALLMODS_chargeCOMB_") != string::npos) {
733 (*isum)->setAxisTitle(
"Cluster charge [kilo electrons]", 1);
735 (*isum)->setAxisTitle(
"Modules", 1);
738 if (sname.find(
"_RMS_") != string::npos) {
739 title =
"RMS of " + sname.substr(7, (sname.find(
"_", 7) - 7)) +
" per module";
740 }
else if (sname.find(
"_FracOfPerfectPix_") != string::npos) {
741 title =
"FracOfPerfectPix " + sname.substr(7, (sname.find(
"_", 7) - 7)) +
" per module";
742 }
else if (sname.find(
"_NCalibErrors_") != string::npos) {
743 title =
"Number of CalibErrors " + sname.substr(7, (sname.find(
"_", 7) - 7)) +
" per module";
744 }
else if (sname.find(
"_NNegativeFits_") != string::npos) {
745 title =
"Number of pixels with neg. fit result " + sname.substr(7, (sname.find(
"_", 7) - 7)) +
747 }
else if (sname.find(
"FREQ_") != string::npos) {
748 title =
"NEvents with digis per module";
749 }
else if (sname.find(
"ALLMODS_adcCOMB_") != string::npos) {
751 }
else if (sname.find(
"ALLMODS_chargeCOMB_") != string::npos) {
753 }
else if (sname.find(
"_NErrors_") != string::npos) {
754 if (prefix ==
"SUMOFF" && isbarrel)
755 title =
"Total number of errors per Ladder";
756 else if (prefix ==
"SUMOFF" && !isbarrel)
757 title =
"Total number of errors per Blade";
759 title =
"Total number of errors per Module";
761 if (prefix ==
"SUMOFF")
763 "Mean " + sname.substr(7, (sname.find(
"_", 7) - 7)) + (isbarrel ?
" per Ladder" :
" per Blade");
765 title =
"Mean " + sname.substr(7, (sname.find(
"_", 7) - 7)) +
" per Module";
767 (*isum)->setAxisTitle(title, 2);
775 if (dir_name.find(
"Blade") == 0) {
781 vector<string> subdirs = iGetter.
getSubdirs();
784 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
788 if ((iBooker.
pwd()).
find(
"Endcap") != string::npos ||
789 (iBooker.
pwd()).
find(
"AdditionalPixelErrors") != string::npos) {
795 if ((*it).find(
"Endcap") != string::npos || (*it).find(
"AdditionalPixelErrors") != string::npos)
797 fillSummary(iBooker, iGetter, dir_name, me_names,
true,
802 string grandbarrel_structure_name;
803 vector<string> grandbarrel_me_names;
805 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand " 806 "Barrel Summary configuration parameters!! ";
813 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
814 if ((iBooker.
pwd()).
find(
"Barrel") != string::npos ||
815 (iBooker.
pwd()).
find(
"AdditionalPixelErrors") != string::npos) {
821 if ((*it).find(
"Barrel") != string::npos || (*it).find(
"AdditionalPixelErrors") != string::npos)
823 fillSummary(iBooker, iGetter, dir_name, me_names,
false,
828 string grandendcap_structure_name;
829 vector<string> grandendcap_me_names;
831 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand " 832 "Endcap Summary configuration parameters!! ";
845 vector<string> &me_names) {
848 string currDir = iBooker.
pwd();
855 if (currDir.find(dir_name) != string::npos) {
856 vector<MonitorElement *> sum_mes;
857 for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
858 bool isBooked =
false;
860 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
861 if ((*im).find(*iv) != string::npos)
864 if ((*iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
865 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" || (*iv) ==
"ROCId" ||
866 (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" || (*iv) ==
"TBMMessage" ||
867 (*iv) ==
"Type36Hitmap" || (*iv) ==
"FedChLErr" || (*iv) ==
"FedChNErr" || (*iv) ==
"FedETypeNErr")
870 if ((*iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
871 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" || (*iv) ==
"ROCId" ||
872 (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" || (*iv) ==
"TBMMessage" ||
873 (*iv) ==
"Type36Hitmap") {
874 string tag = prefix +
"_" + (*iv) +
"_FEDErrors";
876 sum_mes.push_back(temp);
877 }
else if ((*iv) ==
"FedChLErr" || (*iv) ==
"FedChNErr" || (*iv) ==
"FedETypeNErr") {
878 string tag = prefix +
"_" + (*iv);
880 if ((*iv) ==
"FedChLErr") {
882 temp = iBooker.
book2D(
"FedChLErr",
"Type of last error", 40, -0.5, 39.5, 37, 0., 37.);
884 string fullpathname = iBooker.
pwd() +
"/" + (*iv);
885 temp = iGetter.
get(fullpathname);
890 if ((*iv) ==
"FedChNErr") {
892 temp = iBooker.
book2D(
"FedChNErr",
"Total number of errors", 40, -0.5, 39.5, 37, 0., 37.);
894 string fullpathname = iBooker.
pwd() +
"/" + (*iv);
895 temp = iGetter.
get(fullpathname);
900 if ((*iv) ==
"FedETypeNErr") {
902 temp = iBooker.
book2D(
"FedETypeNErr",
"Number of each error type", 40, -0.5, 39.5, 21, 0., 21.);
925 string fullpathname = iBooker.
pwd() +
"/" + (*iv);
926 temp = iGetter.
get(fullpathname);
931 sum_mes.push_back(temp);
934 if (sum_mes.empty()) {
935 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" 939 vector<string> subdirs = iGetter.
getSubdirs();
941 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
942 if ((*it).find(
"FED_") == string::npos)
946 string fedid = (*it).substr((*it).find(
"_") + 1);
947 std::istringstream isst;
953 for (vector<MonitorElement *>::const_iterator
isum = sum_mes.begin();
isum != sum_mes.end();
isum++) {
954 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
955 if (((*im).find(
"FedChNErr") != std::string::npos &&
956 (*isum)->getName().find(
"FedChNErr") != std::string::npos) ||
957 ((*im).find(
"FedChLErr") != std::string::npos &&
958 (*isum)->getName().find(
"FedChLErr") != std::string::npos) ||
959 ((*im).find(
"FedETypeNErr") != std::string::npos &&
960 (*isum)->getName().find(
"FedETypeNErr") != std::string::npos)) {
961 string fullpathname = iBooker.
pwd() +
"/" + (*im);
964 for (
int i = 0;
i != 37;
i++) {
965 if ((*im).find(
"FedETypeNErr") != std::string::npos &&
i < 21)
972 string sname = ((*isum)->getName());
974 tname = sname.substr(7, (sname.find(
"_", 7) - 6));
975 if (((*im)).
find(tname) == 0) {
976 string fullpathname = iBooker.
pwd() +
"/" + (*im);
981 if (sname.find(
"_NErrors_") != string::npos) {
982 string path1 = fullpathname;
983 path1 = path1.replace(path1.find(
"NErrors"), 7,
"errorType");
985 bool notReset =
true;
987 for (
int jj = 1;
jj < 16;
jj++) {
990 string path2 = path1;
991 path2 = path2.replace(path2.find(
"errorType"), 9,
"TBMMessage");
1003 (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->
getEntries());
1005 (*isum)->setAxisTitle(
"FED #", 1);
1007 title = sname.substr(7, (sname.find(
"_", 7) - 7)) +
" per FED";
1008 (*isum)->setAxisTitle(title, 2);
1018 vector<string> subdirs = iGetter.
getSubdirs();
1019 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1020 if ((*it).find(
"Endcap") != string::npos || (*it).find(
"Barrel") != string::npos)
1036 vector<string> &me_names,
1040 vector<MonitorElement *> gsum_mes;
1041 string currDir = iBooker.
pwd();
1043 string dir_name = path_name.substr(path_name.find_last_of(
"/") + 1);
1044 if ((dir_name.find(
"DQMData") == 0) || (dir_name.find(
"Pixel") == 0) ||
1045 (dir_name.find(
"AdditionalPixelErrors") == 0) || (dir_name.find(
"Endcap") == 0) ||
1046 (dir_name.find(
"HalfCylinder") == 0) || (dir_name.find(
"Disk") == 0) || (dir_name.find(
"Blade") == 0) ||
1047 (dir_name.find(
"Panel") == 0))
1049 vector<string> subdirs = iGetter.
getSubdirs();
1050 int nDirs = subdirs.size();
1054 int nbin_subdir = 0;
1056 bool first_subdir =
true;
1057 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1082 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
1083 for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
1084 string var =
"_" + (*iv) +
"_";
1085 if ((*im).find(var) != string::npos) {
1086 if ((var ==
"_charge_" || var ==
"_nclusters_" || var ==
"_size_" || var ==
"_sizeX_" || var ==
"_sizeY_") &&
1087 (*im).find(
"Track_") != string::npos)
1089 string full_path = (*it) +
"/" + (*im);
1094 if ((*iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
1095 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" ||
1096 (*iv) ==
"ROCId" || (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" ||
1097 (*iv) ==
"TBMMessage" || (*iv) ==
"Type36Hitmap")
1099 else if ((*iv) ==
"ndigis" || (*iv) ==
"adc" || (*iv) ==
"ndigisFREQ" || (*iv) ==
"adcCOMB")
1101 else if ((*iv) ==
"nclusters" || (*iv) ==
"x" || (*iv) ==
"y" || (*iv) ==
"charge" ||
1102 (*iv) ==
"chargeCOMB" || (*iv) ==
"size" || (*iv) ==
"sizeX" || (*iv) ==
"sizeY" ||
1103 (*iv) ==
"minrow" || (*iv) ==
"maxrow" || (*iv) ==
"mincol" || (*iv) ==
"maxcol")
1105 if (currDir.find(
"Track") != string::npos)
1107 else if ((*iv) ==
"residualX_mean" || (*iv) ==
"residualY_mean" || (*iv) ==
"residualX_RMS" ||
1108 (*iv) ==
"residualY_RMS")
1110 else if ((*iv) ==
"ClustX" || (*iv) ==
"ClustY" || (*iv) ==
"nRecHits" || (*iv) ==
"ErrorX" ||
1113 else if ((*iv) ==
"Gain1d_mean" || (*iv) ==
"GainChi2NDF1d_mean" || (*iv) ==
"GainChi2Prob1d_mean" ||
1114 (*iv) ==
"Pedestal1d_mean" || (*iv) ==
"ScurveChi2ProbSummary_mean" ||
1115 (*iv) ==
"ScurveFitResultSummary_mean" || (*iv) ==
"ScurveSigmasSummary_mean" ||
1116 (*iv) ==
"ScurveThresholdSummary_mean" || (*iv) ==
"Gain1d_RMS" || (*iv) ==
"GainChi2NDF1d_RMS" ||
1117 (*iv) ==
"GainChi2Prob1d_RMS" || (*iv) ==
"Pedestal1d_RMS" || (*iv) ==
"GainNPoints1d_mean" ||
1118 (*iv) ==
"GainNPoints1d_RMS" || (*iv) ==
"GainHighPoint1d_mean" ||
1119 (*iv) ==
"GainHighPoint1d_RMS" || (*iv) ==
"GainLowPoint1d_mean" ||
1120 (*iv) ==
"GainLowPoint1d_RMS" || (*iv) ==
"GainEndPoint1d_mean" || (*iv) ==
"GainEndPoint1d_RMS" ||
1121 (*iv) ==
"GainFitResult2d_mean" || (*iv) ==
"GainFitResult2d_RMS" ||
1122 (*iv) ==
"GainDynamicRange2d_mean" || (*iv) ==
"GainDynamicRange2d_RMS" ||
1123 (*iv) ==
"GainSaturate2d_mean" || (*iv) ==
"GainSaturate2d_RMS" ||
1124 (*iv) ==
"ScurveChi2ProbSummary_RMS" || (*iv) ==
"ScurveFitResultSummary_RMS" ||
1125 (*iv) ==
"ScurveSigmasSummary_RMS" || (*iv) ==
"ScurveThresholdSummary_RMS" ||
1126 (*iv) ==
"pixelAliveSummary_mean" || (*iv) ==
"pixelAliveSummary_FracOfPerfectPix" ||
1127 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
1131 if (first_subdir && !isUpgrade) {
1132 nbin = me->
getTH1F()->GetNbinsX();
1133 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1134 if ((*iv) ==
"adcCOMB" || (*iv) ==
"chargeCOMB")
1135 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1136 else if (prefix ==
"SUMOFF" && dir_name ==
"Barrel")
1138 else if ((*iv) ==
"adcCOMB")
1140 else if (dir_name ==
"Barrel")
1142 else if (prefix ==
"SUMOFF" && dir_name.find(
"Shell") != string::npos)
1144 else if (dir_name.find(
"Shell") != string::npos)
1147 nbin = nbin * nDirs;
1150 }
else if (first_subdir && isUpgrade) {
1151 nbin = me->
getTH1F()->GetNbinsX();
1152 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1153 if ((*iv) ==
"adcCOMB" || (*iv) ==
"chargeCOMB")
1154 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1155 else if (prefix ==
"SUMOFF" && dir_name ==
"Barrel")
1157 else if ((*iv) ==
"adcCOMB")
1159 else if (dir_name ==
"Barrel")
1161 else if (prefix ==
"SUMOFF" && dir_name.find(
"Shell") != string::npos)
1163 else if (dir_name.find(
"Shell") != string::npos)
1166 nbin = nbin * nDirs;
1171 for (vector<MonitorElement *>::const_iterator igm = gsum_mes.begin(); igm != gsum_mes.end(); igm++) {
1172 if ((*igm)->getName().find(var) != string::npos) {
1173 if (prefix ==
"SUMOFF")
1174 (*igm)->setAxisTitle(
"Ladders", 1);
1175 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1176 (*igm)->setAxisTitle(
"Digi charge [ADC]", 1);
1177 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1178 (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]", 1);
1180 (*igm)->setAxisTitle(
"Modules", 1);
1185 if ((*igm)->getName().find(
"NErrors_") != string::npos && prefix ==
"SUMOFF")
1186 title =
"Total number of errors per Ladder";
1187 else if ((*igm)->getName().find(
"NErrors_") != string::npos && prefix ==
"SUMRAW")
1188 title =
"Total number of errors per Module";
1189 else if (prefix ==
"SUMOFF")
1190 title =
"mean " + (*iv) +
" per Ladder";
1191 else if ((*igm)->getName().find(
"FREQ_") != string::npos && prefix !=
"SUMOFF")
1192 title =
"NEvents with digis per Module";
1193 else if ((*igm)->getName().find(
"FREQ_") != string::npos && prefix ==
"SUMOFF")
1194 title =
"NEvents with digis per Ladder/Blade";
1195 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1197 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1198 title =
"NClusters";
1200 title =
"mean " + (*iv) +
" per Module";
1201 (*igm)->setAxisTitle(title, 2);
1205 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1207 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1209 }
else if ((*igm)->getName().find(
"Ladder") != string::npos) {
1212 }
else if ((*igm)->getName().find(
"Layer") != string::npos) {
1213 nbin_i = (cnt - 1) * 4;
1215 }
else if ((*igm)->getName().find(
"Shell") != string::npos) {
1216 if (prefix !=
"SUMOFF") {
1220 }
else if (iDir == 1) {
1223 }
else if (iDir == 2) {
1231 }
else if (iDir == 1) {
1234 }
else if (iDir == 2) {
1239 }
else if ((*igm)->getName().find(
"Barrel") != string::npos) {
1240 if (prefix !=
"SUMOFF") {
1244 }
else if (iDir == 1) {
1247 }
else if (iDir == 2) {
1250 }
else if (iDir == 3) {
1258 }
else if (iDir == 1) {
1261 }
else if (iDir == 2) {
1264 }
else if (iDir == 3) {
1270 }
else if (isUpgrade) {
1271 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1273 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1275 }
else if ((*igm)->getName().find(
"Ladder") != string::npos) {
1278 }
else if ((*igm)->getName().find(
"Layer") != string::npos) {
1279 nbin_i = (cnt - 1) * 4;
1281 }
else if ((*igm)->getName().find(
"Shell") != string::npos) {
1282 if (prefix !=
"SUMOFF") {
1287 else if (iDir == 1) {
1291 else if (iDir == 2) {
1295 else if (iDir == 3) {
1304 else if (iDir == 1) {
1308 else if (iDir == 2) {
1312 else if (iDir == 3) {
1317 }
else if ((*igm)->getName().find(
"Barrel") != string::npos) {
1318 if (prefix !=
"SUMOFF") {
1323 else if (iDir == 1) {
1327 else if (iDir == 2) {
1330 }
else if (iDir == 3) {
1333 }
else if (iDir == 4) {
1342 else if (iDir == 1) {
1346 else if (iDir == 2) {
1349 }
else if (iDir == 3) {
1352 }
else if (iDir == 4) {
1360 if ((*igm)->getName().find(
"ndigisFREQ") == string::npos) {
1361 if (((*igm)->getName().find(
"adcCOMB") != string::npos &&
1362 me->
getName().find(
"adcCOMB") != string::npos) ||
1363 ((*igm)->getName().find(
"chargeCOMB") != string::npos &&
1364 me->
getName().find(
"chargeCOMB") != string::npos)) {
1365 (*igm)->getTH1F()->Add(me->
getTH1F());
1366 }
else if (((*igm)->getName().find(
"charge_") != string::npos &&
1367 (*igm)->getName().find(
"Track_") == string::npos &&
1368 me->
getName().find(
"charge_") != string::npos &&
1369 me->
getName().find(
"Track_") == string::npos) ||
1370 ((*igm)->getName().find(
"nclusters_") != string::npos &&
1371 (*igm)->getName().find(
"Track_") == string::npos &&
1372 me->
getName().find(
"nclusters_") != string::npos &&
1373 me->
getName().find(
"Track_") == string::npos) ||
1374 ((*igm)->getName().find(
"size_") != string::npos &&
1375 (*igm)->getName().find(
"Track_") == string::npos &&
1376 me->
getName().find(
"size_") != string::npos &&
1377 me->
getName().find(
"Track_") == string::npos) ||
1378 ((*igm)->getName().find(
"charge_OffTrack_") != string::npos &&
1379 me->
getName().find(
"charge_OffTrack_") != string::npos) ||
1380 ((*igm)->getName().find(
"nclusters_OffTrack_") != string::npos &&
1381 me->
getName().find(
"nclusters_OffTrack_") != string::npos) ||
1382 ((*igm)->getName().find(
"size_OffTrack_") != string::npos &&
1383 me->
getName().find(
"size_OffTrack_") != string::npos) ||
1384 ((*igm)->getName().find(
"charge_OnTrack_") != string::npos &&
1385 me->
getName().find(
"charge_OnTrack_") != string::npos) ||
1386 ((*igm)->getName().find(
"nclusters_OnTrack_") != string::npos &&
1387 me->
getName().find(
"nclusters_OnTrack_") != string::npos) ||
1388 ((*igm)->getName().find(
"size_OnTrack_") != string::npos &&
1389 me->
getName().find(
"size_OnTrack_") != string::npos) ||
1390 ((*igm)->getName().find(
"charge_") == string::npos &&
1391 (*igm)->getName().find(
"nclusters_") == string::npos &&
1392 (*igm)->getName().find(
"size_") == string::npos)) {
1393 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1397 }
else if (me->
getName().find(
"ndigisFREQ") != string::npos) {
1398 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1408 first_subdir =
false;
1418 vector<string> &me_names,
1422 vector<MonitorElement *> gsum_mes;
1423 string currDir = iBooker.
pwd();
1425 string dir_name = path_name.substr(path_name.find_last_of(
"/") + 1);
1426 if ((dir_name.find(
"DQMData") == 0) || (dir_name.find(
"Pixel") == 0) ||
1427 (dir_name.find(
"AdditionalPixelErrors") == 0) || (dir_name.find(
"Barrel") == 0) ||
1428 (dir_name.find(
"Shell") == 0) || (dir_name.find(
"Layer") == 0) || (dir_name.find(
"Ladder") == 0))
1430 vector<string> subdirs = iGetter.
getSubdirs();
1434 int nbin_subdir = 0;
1436 bool first_subdir =
true;
1437 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1461 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
1462 for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
1463 string var =
"_" + (*iv) +
"_";
1464 if ((*im).find(var) != string::npos) {
1465 if ((var ==
"_charge_" || var ==
"_nclusters_" || var ==
"_size_" || var ==
"_sizeX_" || var ==
"_sizeY_") &&
1466 (*im).find(
"Track_") != string::npos)
1468 string full_path = (*it) +
"/" + (*im);
1473 if ((*iv) ==
"errorType" || (*iv) ==
"NErrors" || (*iv) ==
"fullType" || (*iv) ==
"chanNmbr" ||
1474 (*iv) ==
"TBMType" || (*iv) ==
"EvtNbr" || (*iv) ==
"evtSize" || (*iv) ==
"linkId" ||
1475 (*iv) ==
"ROCId" || (*iv) ==
"DCOLId" || (*iv) ==
"PXId" || (*iv) ==
"ROCNmbr" ||
1476 (*iv) ==
"TBMMessage" || (*iv) ==
"Type36Hitmap")
1478 else if ((*iv) ==
"ndigis" || (*iv) ==
"adc" || (*iv) ==
"ndigisFREQ" || (*iv) ==
"adcCOMB")
1480 else if ((*iv) ==
"nclusters" || (*iv) ==
"x" || (*iv) ==
"y" || (*iv) ==
"charge" ||
1481 (*iv) ==
"chargeCOMB" || (*iv) ==
"size" || (*iv) ==
"sizeX" || (*iv) ==
"sizeY" ||
1482 (*iv) ==
"minrow" || (*iv) ==
"maxrow" || (*iv) ==
"mincol" || (*iv) ==
"maxcol")
1484 if (currDir.find(
"Track") != string::npos)
1486 else if ((*iv) ==
"residualX_mean" || (*iv) ==
"residualY_mean" || (*iv) ==
"residualX_RMS" ||
1487 (*iv) ==
"residualY_RMS")
1489 else if ((*iv) ==
"ClustX" || (*iv) ==
"ClustY" || (*iv) ==
"nRecHits" || (*iv) ==
"ErrorX" ||
1492 else if ((*iv) ==
"Gain1d_mean" || (*iv) ==
"GainChi2NDF1d_mean" || (*iv) ==
"GainChi2Prob1d_mean" ||
1493 (*iv) ==
"Pedestal1d_mean" || (*iv) ==
"ScurveChi2ProbSummary_mean" ||
1494 (*iv) ==
"ScurveFitResultSummary_mean" || (*iv) ==
"ScurveSigmasSummary_mean" ||
1495 (*iv) ==
"ScurveThresholdSummary_mean" || (*iv) ==
"Gain1d_RMS" || (*iv) ==
"GainChi2NDF1d_RMS" ||
1496 (*iv) ==
"GainChi2Prob1d_RMS" || (*iv) ==
"Pedestal1d_RMS" || (*iv) ==
"GainNPoints1d_mean" ||
1497 (*iv) ==
"GainNPoints1d_RMS" || (*iv) ==
"GainHighPoint1d_mean" ||
1498 (*iv) ==
"GainHighPoint1d_RMS" || (*iv) ==
"GainLowPoint1d_mean" ||
1499 (*iv) ==
"GainLowPoint1d_RMS" || (*iv) ==
"GainEndPoint1d_mean" || (*iv) ==
"GainEndPoint1d_RMS" ||
1500 (*iv) ==
"GainFitResult2d_mean" || (*iv) ==
"GainFitResult2d_RMS" ||
1501 (*iv) ==
"GainDynamicRange2d_mean" || (*iv) ==
"GainDynamicRange2d_RMS" ||
1502 (*iv) ==
"GainSaturate2d_mean" || (*iv) ==
"GainSaturate2d_RMS" ||
1503 (*iv) ==
"ScurveChi2ProbSummary_RMS" || (*iv) ==
"ScurveFitResultSummary_RMS" ||
1504 (*iv) ==
"ScurveSigmasSummary_RMS" || (*iv) ==
"ScurveThresholdSummary_RMS" ||
1505 (*iv) ==
"pixelAliveSummary_mean" || (*iv) ==
"pixelAliveSummary_FracOfPerfectPix" ||
1506 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
1510 if (first_subdir && !isUpgrade) {
1511 nbin = me->
getTH1F()->GetNbinsX();
1512 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1513 if ((*iv) ==
"adcCOMB" || (*iv) ==
"chargeCOMB")
1514 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1515 else if (prefix ==
"SUMOFF" && dir_name ==
"Endcap")
1517 else if (dir_name ==
"Endcap")
1519 else if (prefix ==
"SUMOFF" && dir_name.find(
"HalfCylinder") != string::npos)
1521 else if (dir_name.find(
"HalfCylinder") != string::npos)
1523 else if (prefix ==
"SUMOFF" && dir_name.find(
"Disk") != string::npos)
1525 else if (dir_name.find(
"Disk") != string::npos)
1527 else if (dir_name.find(
"Blade") != string::npos)
1530 }
else if (first_subdir && isUpgrade) {
1531 nbin = me->
getTH1F()->GetNbinsX();
1532 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1533 if ((*iv) ==
"adcCOMB" || (*iv) ==
"chargeCOMB")
1534 me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1535 else if (prefix ==
"SUMOFF" && dir_name ==
"Endcap")
1537 else if (dir_name ==
"Endcap")
1539 else if (prefix ==
"SUMOFF" && dir_name.find(
"HalfCylinder") != string::npos)
1541 else if (dir_name.find(
"HalfCylinder") != string::npos)
1543 else if (prefix ==
"SUMOFF" && dir_name.find(
"Disk") != string::npos)
1545 else if (dir_name.find(
"Disk") != string::npos)
1547 else if (dir_name.find(
"Blade") != string::npos)
1552 for (vector<MonitorElement *>::const_iterator igm = gsum_mes.begin(); igm != gsum_mes.end(); igm++) {
1553 if ((*igm)->getName().find(var) != string::npos) {
1554 if (prefix ==
"SUMOFF")
1555 (*igm)->setAxisTitle(
"Blades", 1);
1556 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1557 (*igm)->setAxisTitle(
"Digi charge [ADC]", 1);
1558 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1559 (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]", 1);
1561 (*igm)->setAxisTitle(
"Modules", 1);
1563 if ((*igm)->getName().find(
"NErrors_") != string::npos && prefix ==
"SUMOFF")
1564 title =
"Total number of errors per Blade";
1565 else if ((*igm)->getName().find(
"NErrors_") != string::npos && prefix ==
"SUMRAW")
1566 title =
"Total number of errors per Module";
1567 else if (prefix ==
"SUMOFF")
1568 title =
"mean " + (*iv) +
" per Blade";
1569 else if ((*igm)->getName().find(
"FREQ_") != string::npos)
1570 title =
"NEvents with digis per Module";
1571 else if ((*igm)->getName().find(
"adcCOMB_") != string::npos)
1573 else if ((*igm)->getName().find(
"chargeCOMB_") != string::npos)
1574 title =
"NClusters";
1576 title =
"mean " + (*iv) +
" per Module";
1577 (*igm)->setAxisTitle(title, 2);
1580 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1582 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1584 }
else if ((*igm)->getName().find(
"Panel_") != string::npos) {
1586 }
else if ((*igm)->getName().find(
"Blade") != string::npos) {
1587 if ((*im).find(
"_1") != string::npos)
1589 if ((*im).find(
"_2") != string::npos) {
1593 }
else if ((*igm)->getName().find(
"Disk") != string::npos) {
1594 nbin_i = ((cnt - 1) % 12) * 7;
1596 }
else if ((*igm)->getName().find(
"HalfCylinder") != string::npos) {
1597 if (prefix !=
"SUMOFF") {
1599 if ((*im).find(
"_2") != string::npos)
1603 if ((*im).find(
"_2") != string::npos)
1606 }
else if ((*igm)->getName().find(
"Endcap") != string::npos) {
1607 if (prefix !=
"SUMOFF") {
1609 if ((*im).find(
"_mO") != string::npos)
1611 if ((*im).find(
"_pI") != string::npos)
1613 if ((*im).find(
"_pO") != string::npos)
1617 if ((*im).find(
"_mO") != string::npos)
1619 if ((*im).find(
"_pI") != string::npos)
1621 if ((*im).find(
"_pO") != string::npos)
1625 }
else if (isUpgrade) {
1626 if ((*igm)->getName().find(
"ALLMODS_adcCOMB_") != string::npos) {
1628 }
else if ((*igm)->getName().find(
"ALLMODS_chargeCOMB_") != string::npos) {
1630 }
else if ((*igm)->getName().find(
"Panel_") != string::npos) {
1632 }
else if ((*igm)->getName().find(
"Blade") != string::npos) {
1633 if ((*im).find(
"_1") != string::npos)
1635 if ((*im).find(
"_2") != string::npos) {
1639 }
else if ((*igm)->getName().find(
"Disk") != string::npos) {
1640 nbin_i = ((cnt - 1) % 28) * 2;
1642 }
else if ((*igm)->getName().find(
"HalfCylinder") != string::npos) {
1643 if (prefix !=
"SUMOFF") {
1645 if ((*im).find(
"_2") != string::npos)
1647 if ((*im).find(
"_3") != string::npos)
1651 if ((*im).find(
"_2") != string::npos)
1653 if ((*im).find(
"_3") != string::npos)
1656 }
else if ((*igm)->getName().find(
"Endcap") != string::npos) {
1657 if (prefix !=
"SUMOFF") {
1659 if ((*im).find(
"_mO") != string::npos)
1661 if ((*im).find(
"_pI") != string::npos)
1663 if ((*im).find(
"_pO") != string::npos)
1667 if ((*im).find(
"_mO") != string::npos)
1669 if ((*im).find(
"_pI") != string::npos)
1671 if ((*im).find(
"_pO") != string::npos)
1677 if ((*igm)->getName().find(
"ndigisFREQ") == string::npos) {
1678 if (((*igm)->getName().find(
"adcCOMB") != string::npos &&
1679 me->
getName().find(
"adcCOMB") != string::npos) ||
1680 ((*igm)->getName().find(
"chargeCOMB") != string::npos &&
1681 me->
getName().find(
"chargeCOMB") != string::npos)) {
1682 (*igm)->getTH1F()->Add(me->
getTH1F());
1683 }
else if (((*igm)->getName().find(
"charge_") != string::npos &&
1684 (*igm)->getName().find(
"Track_") == string::npos &&
1685 me->
getName().find(
"charge_") != string::npos &&
1686 me->
getName().find(
"Track_") == string::npos) ||
1687 ((*igm)->getName().find(
"nclusters_") != string::npos &&
1688 (*igm)->getName().find(
"Track_") == string::npos &&
1689 me->
getName().find(
"nclusters_") != string::npos &&
1690 me->
getName().find(
"Track_") == string::npos) ||
1691 ((*igm)->getName().find(
"size_") != string::npos &&
1692 (*igm)->getName().find(
"Track_") == string::npos &&
1693 me->
getName().find(
"size_") != string::npos &&
1694 me->
getName().find(
"Track_") == string::npos) ||
1695 ((*igm)->getName().find(
"charge_OffTrack_") != string::npos &&
1696 me->
getName().find(
"charge_OffTrack_") != string::npos) ||
1697 ((*igm)->getName().find(
"nclusters_OffTrack_") != string::npos &&
1698 me->
getName().find(
"nclusters_OffTrack_") != string::npos) ||
1699 ((*igm)->getName().find(
"size_OffTrack_") != string::npos &&
1700 me->
getName().find(
"size_OffTrack_") != string::npos) ||
1701 ((*igm)->getName().find(
"charge_OnTrack_") != string::npos &&
1702 me->
getName().find(
"charge_OnTrack_") != string::npos) ||
1703 ((*igm)->getName().find(
"nclusters_OnTrack_") != string::npos &&
1704 me->
getName().find(
"nclusters_OnTrack_") != string::npos) ||
1705 ((*igm)->getName().find(
"size_OnTrack_") != string::npos &&
1706 me->
getName().find(
"size_OnTrack_") != string::npos) ||
1707 ((*igm)->getName().find(
"charge_") == string::npos &&
1708 (*igm)->getName().find(
"nclusters_") == string::npos &&
1709 (*igm)->getName().find(
"size_") == string::npos)) {
1710 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1714 }
else if (me->
getName().find(
"ndigisFREQ") != string::npos) {
1715 for (
int k = 1;
k < nbin_subdir + 1;
k++)
1727 first_subdir =
false;
1739 if ((iBooker.
pwd()).
find(
"Pixel") == string::npos)
1743 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
1745 if ((*it).find(me_name) == 0) {
1746 string fullpathname = iBooker.
pwd() +
"/" + me_name;
1758 if (me_name.find(
"ALLMODS_adcCOMB_") != string::npos)
1759 temp_me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 128, 0, 256);
1760 else if (me_name.find(
"ALLMODS_chargeCOMB_") != string::npos)
1761 temp_me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 100, 0, 200);
1763 temp_me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), nbin, 1., nbin + 1.);
1765 mes.push_back(temp_me);
1781 if ((iBooker.
pwd()).
find(
"Pixel") == string::npos)
1785 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
1786 if ((*it).find(me_name) == 0) {
1787 string fullpathname = iBooker.
pwd() +
"/" + (*it);
1788 me = iGetter.
get(fullpathname);
1797 if (me_name.find(
"SUMOFF") == string::npos) {
1798 if (me_name.find(
"Blade_") != string::npos)
1799 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 7, 1., 8.);
1801 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 4, 1., 5.);
1802 }
else if (me_name.find(
"Layer_1") != string::npos) {
1803 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 10, 1., 11.);
1804 }
else if (me_name.find(
"Layer_2") != string::npos) {
1805 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 16, 1., 17.);
1806 }
else if (me_name.find(
"Layer_3") != string::npos) {
1807 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 22, 1., 23.);
1808 }
else if (me_name.find(
"Disk_") != string::npos) {
1809 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 12, 1., 13.);
1812 else if (isUpgrade) {
1813 if (me_name.find(
"SUMOFF") == string::npos) {
1814 if (me_name.find(
"Blade_") != string::npos)
1815 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 2, 1., 3.);
1817 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 1, 1., 2.);
1818 }
else if (me_name.find(
"Layer_1") != string::npos) {
1819 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 6, 1., 7.);
1820 }
else if (me_name.find(
"Layer_2") != string::npos) {
1821 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 14, 1., 15.);
1822 }
else if (me_name.find(
"Layer_3") != string::npos) {
1823 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 22, 1., 23.);
1824 }
else if (me_name.find(
"Layer_4") != string::npos) {
1825 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 32, 1., 33.);
1826 }
else if (me_name.find(
"Disk_") != string::npos) {
1827 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 28, 1., 29.);
1840 if ((iBooker.
pwd()).
find(
"Pixel") == string::npos)
1844 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
1845 if ((*it).find(me_name) == 0) {
1846 string fullpathname = iBooker.
pwd() +
"/" + (*it);
1848 me = iGetter.
get(fullpathname);
1857 me = iBooker.
book1D(me_name.c_str(), me_name.c_str(), 40, -0.5, 39.5);
1870 vector<string> subdirs = iGetter.
getSubdirs();
1871 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1872 if (isbarrel && (*it).find(
"Barrel") == string::npos)
1874 if (!isbarrel && (*it).find(
"Endcap") == string::npos)
1877 if ((*it).find(
"Module_") != string::npos)
1879 if ((*it).find(
"Panel_") != string::npos)
1881 if ((*it).find(
"Ladder_") != string::npos)
1883 if ((*it).find(
"Blade_") != string::npos)
1885 if ((*it).find(
"Layer_") != string::npos)
1887 if ((*it).find(
"Disk_") != string::npos)
1894 OccupancyMap = iBooker.
book2D((isbarrel ?
"barrelOccupancyMap" :
"endcapOccupancyMap"),
1895 "Barrel Digi Occupancy Map (4 pix per bin)",
1896 isbarrel ? 208 : 130,
1898 isbarrel ? 416. : 260.,
1904 OccupancyMap = iBooker.
book2D((isbarrel ?
"barrelOccupancyMap" :
"endcapOccupancyMap"),
1905 "Barrel Digi Occupancy Map (1 pix per bin)",
1906 isbarrel ? 416 : 260,
1908 isbarrel ? 416. : 260.,
1962 string currDir = iBooker.
pwd();
1963 string dname = currDir.substr(currDir.find_last_of(
"/") + 1);
1965 if (dname.find(
"Layer_") != string::npos || dname.find(
"Disk_") != string::npos) {
1966 vector<string> meVec = iGetter.
getMEs();
1967 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1968 string full_path = currDir +
"/" + (*it);
1969 if (full_path.find(
"hitmap_siPixelDigis") != string::npos) {
1973 string path = full_path;
1974 while (path.find_last_of(
"/") != 5)
1976 path = path.substr(0, path.find_last_of(
"/"));
1980 OccupancyMap = iGetter.
get(path +
"/" + (isbarrel ?
"barrel" :
"endcap") +
"OccupancyMap");
1984 for (
int j = 1; j != me->
getNbinsY() + 1; j++) {
1994 vector<string> subdirs = iGetter.
getSubdirs();
1995 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1998 if (*it !=
"Pixel" &&
1999 ((isbarrel && (*it).find(
"Barrel") == string::npos) || (!isbarrel && (*it).find(
"Endcap") == string::npos)))
2021 float totalDigisBPIX = 0.;
2022 float totalDigisFPIX = 0.;
2023 for (
int i = 1;
i != 41;
i++) {
2029 float averageBPIXOcc = totalDigisBPIX / 32.;
2030 float averageFPIXOcc = totalDigisFPIX / 8.;
2031 for (
int i = 1;
i != 41;
i++) {
2050 float totalDigisBPIX = 0.;
2051 float totalDigisFPIX = 0.;
2052 for (
int i = 1;
i != 41;
i++) {
2054 totalDigisBPIX += avgfedDigiOccvsLumi->
getBinContent(lumisec,
i);
2056 totalDigisFPIX += avgfedDigiOccvsLumi->
getBinContent(lumisec,
i);
2058 float averageBPIXOcc = totalDigisBPIX / 32.;
2059 float averageFPIXOcc = totalDigisFPIX / 8.;
2060 for (
int i = 1;
i != 41;
i++) {
2079 "HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder", 9, -4.5, 4.5, 21, -10.5, 10.5);
2081 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder", 9, -4.5, 4.5, 33, -16.5, 16.5);
2083 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder", 9, -4.5, 4.5, 45, -22.5, 22.5);
2086 "HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder", 9, -4.5, 4.5, 21, -10.5, 10.5);
2088 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder", 9, -4.5, 4.5, 33, -16.5, 16.5);
2090 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder", 9, -4.5, 4.5, 45, -22.5, 22.5);
2093 else if (isUpgrade) {
2096 iBooker.
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;z-side;Ladder", 2, -1., 1., 12, -6., 6.);
2098 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;z-side;Ladder", 2, -1., 1., 28, -14., 14.);
2100 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;z-side;Ladder", 2, -1., 1., 44, -22., 22.);
2102 "HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;z-side;Ladder", 2, -1., 1., 64, -32., 32.);
2105 iBooker.
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder", 8, -4., 4., 12, -6., 6.);
2107 "HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder", 8, -4., 4., 28, -14., 14.);
2109 "HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder", 8, -4., 4., 44, -22., 22.);
2111 "HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;Module;Ladder", 8, -4., 4., 64, -32., 32.);
2120 "HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2122 "HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2124 "HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2126 "HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2129 "HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2131 "HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2133 "HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2135 "HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2137 }
else if (isUpgrade) {
2140 iBooker.
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;", 28, -17., 11., 1, 0., 1.);
2142 iBooker.
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;", 28, -17., 11., 1, 0., 1.);
2144 iBooker.
book2D(
"HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;", 28, -17., 11., 1, 0., 1.);
2146 iBooker.
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;", 28, -17., 11., 1, 0., 1.);
2148 iBooker.
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;", 28, -17., 11., 1, 0., 1.);
2150 iBooker.
book2D(
"HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;", 28, -17., 11., 1, 0., 1.);
2153 "HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2155 "HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2157 "HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2159 "HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2161 "HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2163 "HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2167 iBooker.
cd(
"Pixel/");
2168 string bins[] = {
"Layer1",
"Layer2",
"Layer3",
"Disk1+",
"Disk2+",
"Disk1-",
"Disk2-"};
2172 for (
int i = 1;
i < 8;
i++) {
2197 string lad = dname_.substr(dname_.find(
"Ladder_") + 7, 2);
2198 if (dname_.find(lad) != string::npos) {
2199 biny_ = atoi(lad.c_str());
2208 string blad = dname_.substr(dname_.find(
"Blade_") + 6, 2);
2209 if (dname_.find(blad) != string::npos) {
2210 binx_ = atoi(blad.c_str());
2222 string currDir = iBooker.
pwd();
2223 string dname = currDir.substr(currDir.find_last_of(
"/") + 1);
2227 if (isbarrel && dname.find(
"Ladder_") != string::npos) {
2229 vector<string> meVec = iGetter.
getMEs();
2230 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2231 string full_path = currDir +
"/" + (*it);
2233 if (full_path.find(
"missingMod_") != string::npos) {
2239 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2247 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2251 for (
int i = 1;
i < nMod + 1;
i++) {
2252 float hitEfficiency = -1.0;
2253 float missingHits = 0;
2254 float validHits = 0;
2256 if (currDir.find(
"Shell_m") != string::npos)
2261 if (validHits + missingHits > 0.)
2262 hitEfficiency = validHits / (validHits + missingHits);
2264 if (currDir.find(
"Layer_1") != string::npos) {
2268 (
float)hitEfficiency);
2269 }
else if (currDir.find(
"Layer_2") != string::npos) {
2273 (
float)hitEfficiency);
2274 }
else if (currDir.find(
"Layer_3") != string::npos) {
2278 (
float)hitEfficiency);
2284 else if (isUpgrade) {
2285 vector<string> meVec = iGetter.
getMEs();
2286 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2287 string full_path = currDir +
"/" + (*it);
2288 if (full_path.find(
"missing_") != string::npos) {
2293 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2294 me = iGetter.
get(new_path);
2298 float hitEfficiency = -1.;
2299 if (validHits + missingHits > 0.)
2300 hitEfficiency = validHits / (validHits + missingHits);
2304 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2307 if (currDir.find(
"Shell_m") != string::npos) {
2312 if (currDir.find(
"Layer_1") != string::npos) {
2316 }
else if (currDir.find(
"Layer_2") != string::npos) {
2320 }
else if (currDir.find(
"Layer_3") != string::npos) {
2324 }
else if (currDir.find(
"Layer_4") != string::npos) {
2332 }
else if (!isbarrel && dname.find(
"Blade_") != string::npos && !isUpgrade) {
2333 vector<string> meVec = iGetter.
getMEs();
2334 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2335 string full_path = currDir +
"/" + (*it);
2336 if (full_path.find(
"missing_") != string::npos) {
2341 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2349 if (currDir.find(
"HalfCylinder_mI") != string::npos || currDir.find(
"HalfCylinder_pI") != string::npos) {
2354 const int nPanel = 2;
2355 for (
int i = 1;
i < nPanel + 1;
i++) {
2356 float hitEfficiency = -1.;
2357 float missingHits = 0;
2358 float validHits = 0;
2362 if (validHits + missingHits > 0.)
2363 hitEfficiency = validHits / (validHits + missingHits);
2364 if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2368 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2372 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2376 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2384 }
else if (!isbarrel && dname.find(
"Blade_") != string::npos && isUpgrade) {
2385 vector<string> meVec = iGetter.
getMEs();
2386 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2387 string full_path = currDir +
"/" + (*it);
2388 if (full_path.find(
"missing_") != string::npos) {
2393 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2394 me = iGetter.
get(new_path);
2398 float hitEfficiency = -1.;
2399 if (validHits + missingHits > 0.)
2400 hitEfficiency = validHits / (validHits + missingHits);
2404 if (currDir.find(
"HalfCylinder_mI") != string::npos || currDir.find(
"HalfCylinder_pI") != string::npos) {
2425 else if (binx == 10)
2427 else if (binx == 11)
2429 else if (binx == 12)
2431 else if (binx == 13)
2433 else if (binx == 14)
2435 else if (binx == 15)
2437 else if (binx == 16)
2439 else if (binx == 17)
2442 if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2446 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2450 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2454 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2458 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2462 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2472 vector<string> subdirs = iGetter.
getSubdirs();
2473 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2476 if (*it !=
"Pixel" &&
2477 ((isbarrel && (*it).find(
"Barrel") == string::npos) || (!isbarrel && (*it).find(
"Endcap") == string::npos)))
2485 if (dname.find(
"Module_") != string::npos) {
2486 vector<string> meVec = iGetter.
getMEs();
2487 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2488 string full_path = currDir +
"/" + (*it);
2489 if (full_path.find(
"missing_") != string::npos) {
2494 string new_path = full_path.replace(full_path.find(
"missing"), 7,
"valid");
2495 me = iGetter.
get(new_path);
2499 float hitEfficiency = -1.;
2500 if (validHits + missingHits > 0.)
2501 hitEfficiency = validHits / (validHits + missingHits);
2505 if (currDir.find(
"Shell_m") != string::npos) {
2506 if (currDir.find(
"Module_4") != string::npos) {
2508 }
else if (currDir.find(
"Module_3") != string::npos) {
2511 if (currDir.find(
"Module_2") != string::npos) {
2513 }
else if (currDir.find(
"Module_1") != string::npos) {
2516 }
else if (currDir.find(
"Shell_p") != string::npos) {
2517 if (currDir.find(
"Module_1") != string::npos) {
2519 }
else if (currDir.find(
"Module_2") != string::npos) {
2522 if (currDir.find(
"Module_3") != string::npos) {
2524 }
else if (currDir.find(
"Module_4") != string::npos) {
2529 if (currDir.find(
"01") != string::npos) {
2531 }
else if (currDir.find(
"02") != string::npos) {
2533 }
else if (currDir.find(
"03") != string::npos) {
2535 }
else if (currDir.find(
"04") != string::npos) {
2537 }
else if (currDir.find(
"05") != string::npos) {
2539 }
else if (currDir.find(
"06") != string::npos) {
2541 }
else if (currDir.find(
"07") != string::npos) {
2543 }
else if (currDir.find(
"08") != string::npos) {
2545 }
else if (currDir.find(
"09") != string::npos) {
2547 }
else if (currDir.find(
"10") != string::npos) {
2549 }
else if (currDir.find(
"11") != string::npos) {
2551 }
else if (currDir.find(
"12") != string::npos) {
2553 }
else if (currDir.find(
"13") != string::npos) {
2555 }
else if (currDir.find(
"14") != string::npos) {
2557 }
else if (currDir.find(
"15") != string::npos) {
2559 }
else if (currDir.find(
"16") != string::npos) {
2561 }
else if (currDir.find(
"17") != string::npos) {
2563 }
else if (currDir.find(
"18") != string::npos) {
2565 }
else if (currDir.find(
"19") != string::npos) {
2567 }
else if (currDir.find(
"20") != string::npos) {
2569 }
else if (currDir.find(
"21") != string::npos) {
2571 }
else if (currDir.find(
"22") != string::npos) {
2574 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2575 if (currDir.find(
"Layer_1") != string::npos) {
2577 }
else if (currDir.find(
"Layer_2") != string::npos) {
2579 }
else if (currDir.find(
"Layer_3") != string::npos) {
2583 }
else if (isUpgrade) {
2584 if (currDir.find(
"01") != string::npos) {
2586 }
else if (currDir.find(
"02") != string::npos) {
2588 }
else if (currDir.find(
"03") != string::npos) {
2590 }
else if (currDir.find(
"04") != string::npos) {
2592 }
else if (currDir.find(
"05") != string::npos) {
2594 }
else if (currDir.find(
"06") != string::npos) {
2596 }
else if (currDir.find(
"07") != string::npos) {
2598 }
else if (currDir.find(
"08") != string::npos) {
2600 }
else if (currDir.find(
"09") != string::npos) {
2602 }
else if (currDir.find(
"10") != string::npos) {
2604 }
else if (currDir.find(
"11") != string::npos) {
2606 }
else if (currDir.find(
"12") != string::npos) {
2608 }
else if (currDir.find(
"13") != string::npos) {
2610 }
else if (currDir.find(
"14") != string::npos) {
2612 }
else if (currDir.find(
"15") != string::npos) {
2614 }
else if (currDir.find(
"16") != string::npos) {
2616 }
else if (currDir.find(
"17") != string::npos) {
2618 }
else if (currDir.find(
"18") != string::npos) {
2620 }
else if (currDir.find(
"19") != string::npos) {
2622 }
else if (currDir.find(
"20") != string::npos) {
2624 }
else if (currDir.find(
"21") != string::npos) {
2626 }
else if (currDir.find(
"22") != string::npos) {
2628 }
else if (currDir.find(
"23") != string::npos) {
2630 }
else if (currDir.find(
"24") != string::npos) {
2632 }
else if (currDir.find(
"25") != string::npos) {
2634 }
else if (currDir.find(
"25") != string::npos) {
2636 }
else if (currDir.find(
"26") != string::npos) {
2638 }
else if (currDir.find(
"27") != string::npos) {
2640 }
else if (currDir.find(
"28") != string::npos) {
2642 }
else if (currDir.find(
"29") != string::npos) {
2644 }
else if (currDir.find(
"30") != string::npos) {
2646 }
else if (currDir.find(
"31") != string::npos) {
2648 }
else if (currDir.find(
"32") != string::npos) {
2651 if (currDir.find(
"Shell_mO") != string::npos || currDir.find(
"Shell_pO") != string::npos) {
2652 if (currDir.find(
"Layer_1") != string::npos) {
2654 }
else if (currDir.find(
"Layer_2") != string::npos) {
2656 }
else if (currDir.find(
"Layer_3") != string::npos) {
2658 }
else if (currDir.find(
"Layer_4") != string::npos) {
2665 if (currDir.find(
"01") != string::npos) {
2667 }
else if (currDir.find(
"02") != string::npos) {
2669 }
else if (currDir.find(
"03") != string::npos) {
2671 }
else if (currDir.find(
"04") != string::npos) {
2673 }
else if (currDir.find(
"05") != string::npos) {
2675 }
else if (currDir.find(
"06") != string::npos) {
2677 }
else if (currDir.find(
"07") != string::npos) {
2679 }
else if (currDir.find(
"08") != string::npos) {
2681 }
else if (currDir.find(
"09") != string::npos) {
2683 }
else if (currDir.find(
"10") != string::npos) {
2685 }
else if (currDir.find(
"11") != string::npos) {
2687 }
else if (currDir.find(
"12") != string::npos) {
2690 if (currDir.find(
"HalfCylinder_mO") != string::npos || currDir.find(
"HalfCylinder_pO") != string::npos) {
2693 if (currDir.find(
"Panel_1/Module_1") != string::npos) {
2695 }
else if (currDir.find(
"Panel_2/Module_1") != string::npos) {
2697 }
else if (currDir.find(
"Panel_1/Module_2") != string::npos) {
2699 }
else if (currDir.find(
"Panel_2/Module_2") != string::npos) {
2701 }
else if (currDir.find(
"Panel_1/Module_3") != string::npos) {
2703 }
else if (currDir.find(
"Panel_2/Module_3") != string::npos) {
2705 }
else if (currDir.find(
"Panel_1/Module_4") != string::npos) {
2708 }
else if (isUpgrade) {
2709 if (currDir.find(
"01") != string::npos) {
2711 }
else if (currDir.find(
"02") != string::npos) {
2713 }
else if (currDir.find(
"03") != string::npos) {
2715 }
else if (currDir.find(
"04") != string::npos) {
2717 }
else if (currDir.find(
"05") != string::npos) {
2719 }
else if (currDir.find(
"06") != string::npos) {
2721 }
else if (currDir.find(
"07") != string::npos) {
2723 }
else if (currDir.find(
"08") != string::npos) {
2725 }
else if (currDir.find(
"09") != string::npos) {
2727 }
else if (currDir.find(
"10") != string::npos) {
2729 }
else if (currDir.find(
"11") != string::npos) {
2731 }
else if (currDir.find(
"12") != string::npos) {
2733 }
else if (currDir.find(
"13") != string::npos) {
2735 }
else if (currDir.find(
"14") != string::npos) {
2737 }
else if (currDir.find(
"15") != string::npos) {
2739 }
else if (currDir.find(
"16") != string::npos) {
2741 }
else if (currDir.find(
"17") != string::npos) {
2744 if (currDir.find(
"HalfCylinder_mO") != string::npos || currDir.find(
"HalfCylinder_pO") != string::npos) {
2747 if (currDir.find(
"Panel_1/Module_1") != string::npos) {
2749 }
else if (currDir.find(
"Panel_2/Module_1") != string::npos) {
2755 if (currDir.find(
"Layer_1") != string::npos) {
2759 }
else if (currDir.find(
"Layer_2") != string::npos) {
2763 }
else if (currDir.find(
"Layer_3") != string::npos) {
2767 }
else if (isUpgrade && (currDir.find(
"Layer_4") != string::npos)) {
2771 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2775 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2779 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_m") != string::npos) {
2783 }
else if (currDir.find(
"Disk_1") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2787 }
else if (currDir.find(
"Disk_2") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2791 }
else if (currDir.find(
"Disk_3") != string::npos && currDir.find(
"HalfCylinder_p") != string::npos) {
2800 vector<string> subdirs = iGetter.
getSubdirs();
2801 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2804 if (*it !=
"Pixel" &&
2805 ((isbarrel && (*it).find(
"Barrel") == string::npos) || (!isbarrel && (*it).find(
"Endcap") == string::npos)))
2826 string hitEfficiencyPostfix[] = {
"L1",
"L2",
"L3",
"Dp1",
"Dp2",
"Dm1",
"Dm2"};
2827 std::vector<std::vector<float>> ignoreXBins = {
2828 {-4, 2}, {4, 4, -1, -3, 3, -4, -3, -2, -1, -4, -3, -2, -1, 1, -4}, {1, -4, 1}, {}, {}, {}, {}};
2829 std::vector<std::vector<float>> ignoreYBins = {
2830 {-9, -3}, {1, 16, 1, -13, -13, -5, -5, -5, -5, -6, -6, -6, -6, -8, -8}, {3, 14, 6}, {}, {}, {}, {}};
2832 for (
int i = 0;
i < 7;
i++) {
2833 string subdetName =
"Endcap/";
2835 subdetName =
"Barrel/";
2837 sprintf(meName,
"Pixel/%sHitEfficiency_%s", subdetName.c_str(), hitEfficiencyPostfix[
i].c_str());
2839 float totalEff = 0.;
2841 TH1 *hitEffMap = tempHitEffMap->
getTH1();
2842 for (
int xBin = 1; xBin < tempHitEffMap->getNbinsX() + 1; xBin++) {
2843 if (fabs(hitEffMap->GetXaxis()->GetBinCenter(xBin)) < 1.)
2845 for (
int yBin = 1;
yBin < tempHitEffMap->getNbinsY() + 1;
yBin++) {
2846 if (fabs(hitEffMap->GetYaxis()->GetBinCenter(
yBin)) < 0.5)
2848 bool ignoreBin =
false;
2849 for (
unsigned int j = 0; j < ignoreXBins[
i].size(); j++) {
2850 if (hitEffMap->GetXaxis()->GetBinCenter(xBin) == ignoreXBins[
i][j] &&
2851 hitEffMap->GetYaxis()->GetBinCenter(
yBin) == ignoreYBins[
i][j]) {
2858 if (!(tempHitEffMap->getBinContent(xBin,
yBin) < 0.))
2859 totalEff += tempHitEffMap->getBinContent(xBin,
yBin);
2863 float overalEff = 0.;
2866 overalEff = totalEff /
float(totalBins);
void normaliseAvDigiOccVsLumi(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int lumisec)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * HitEfficiency_Dp3
void fillDeviations(DQMStore::IGetter &iGetter)
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
void createEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade)
static char const * tname
void getGrandSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
MonitorElement * HitEfficiency_L4
MonitorElement * getFEDSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name)
void bookOccupancyPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes, bool isbarrel)
MonitorElement * DEV_size_Barrel
MonitorElement * HitEfficiency_L3
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)
void setCurrentFolder(std::string const &fullpath)
const std::string & getName() const
get name of ME
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
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
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)
MonitorElement * OccupancyMap
bool getMENamesForGrandEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
SiPixelConfigWriter * configWriter_
bool getFrequencyForGrandBarrelSummary(int &u_freq)
void setCurrentFolder(std::string const &fullpath)
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
MonitorElement * book1D(Args &&...args)
bool getMENamesForBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
MonitorElement * getSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name, bool isUpgrade)
void Reset()
reset ME (ie. contents, errors, etc)
int getLadder(const std::string &dname)
MonitorElement * get(std::string const &path)
void fillOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel)
SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag)
MonitorElement * DEV_charge_Barrel
MonitorElement * HitEfficiency_Dm3
double getEntries() const
get # of entries
MonitorElement * book2D(Args &&...args)
bool getMessageLimitForQTests(int &u_freq)
std::string const & pwd()
MonitorElement * HitEfficiency_L1
MonitorElement * DEV_nclusters_Endcap
MonitorElement * HitEfficiency_Dp1
int getNbinsY() const
get # of bins in Y-axis
bool getSourceType(int &u_freq)
MonitorElement * DEV_size_Endcap
double getBinContent(int binx) const
get content of bin (1-D)
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * HitEfficiencySummary
std::vector< std::string > getSubdirs()
void fillEfficiencySummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void createOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
MonitorElement * HitEfficiency_Dp2
bool getFrequencyForTrackerMap(int &u_freq)
int getNbinsX() const
get # of bins in X-axis
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 * DEV_ndigis_Endcap
void GetBladeSubdirs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &blade_subdirs)
std::vector< std::string > getMEs()
MonitorElement * HitEfficiency_Dm1
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * DEV_ndigis_Barrel
void bookEfficiency(DQMStore::IBooker &iBooker, bool isUpgrade)
MonitorElement * DEV_adc_Barrel