37 offlineXMLfile_(offlineXMLfile),
38 Tier0Flag_(Tier0Flag) {
40 " Creating SiPixelActionExecutor " <<
"\n" ;
53 " Deleting SiPixelActionExecutor " <<
"\n" ;
64 if(
offlineXMLfile_) localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
65 else localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
78 int& sum_grandbarrel_freq,
79 int& sum_grandendcap_freq,
85 if(
offlineXMLfile_) localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
86 else localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
93 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
97 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Barrel Summary configuration parameters!! " <<
"\n" ;
101 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " <<
"\n" ;
105 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Barrel Summary configuration parameters!! " <<
"\n" ;
109 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Endcap Summary configuration parameters!! " <<
"\n" ;
113 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read QTest Message Limit" <<
"\n" ;
117 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Source Type" <<
"\n" ;
121 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Calib Type" <<
"\n" ;
131 if(
offlineXMLfile_) localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
132 else localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
139 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
143 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Summary configuration parameters!! " <<
"\n" ;
158 tkmap_creator.
create(bei);
173 string barrel_structure_name;
174 vector<string> barrel_me_names;
176 if(
offlineXMLfile_) localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
177 else localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
184 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Barrel Summary configuration parameters!! ";
191 fillSummary(bei, barrel_structure_name, barrel_me_names,
true);
194 string endcap_structure_name;
195 vector<string> endcap_me_names;
197 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " <<
"\n" ;
205 fillSummary(bei, endcap_structure_name, endcap_me_names,
false);
211 string federror_structure_name;
212 vector<string> federror_me_names;
214 cout <<
"SiPixelActionExecutor::createSummary: Failed to read FED Error Summary configuration parameters!! ";
235 DEV_adc_Barrel = bei->
book1D(
"DEV_adc_Barrel",
"Deviation from reference;Module;<adc_ref>-<adc>",768,0.,768.);
236 DEV_ndigis_Barrel = bei->
book1D(
"DEV_ndigis_Barrel",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>",768,0.,768.);
237 DEV_charge_Barrel = bei->
book1D(
"DEV_charge_Barrel",
"Deviation from reference;Module;<charge_ref>-<charge>",768,0.,768.);
238 DEV_nclusters_Barrel = bei->
book1D(
"DEV_nclusters_Barrel",
"Deviation from reference;Module;<nclusters_ref>-<nclusters>",768,0.,768.);
239 DEV_size_Barrel = bei->
book1D(
"DEV_size_Barrel",
"Deviation from reference;Module;<size_ref>-<size>",768,0.,768.);
242 DEV_adc_Endcap = bei->
book1D(
"DEV_adc_Endcap",
"Deviation from reference;Module;<adc_ref>-<adc>",672,0.,672.);
243 DEV_ndigis_Endcap = bei->
book1D(
"DEV_ndigis_Endcap",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>",672,0.,672.);
244 DEV_charge_Endcap = bei->
book1D(
"DEV_charge_Endcap",
"Deviation from reference;Module;<charge_ref>-<charge>",672,0.,672.);
245 DEV_nclusters_Endcap = bei->
book1D(
"DEV_nclusters_Endcap",
"Deviation from reference;Module;<nclusters_ref>-<nclusters>",672,0.,672.);
246 DEV_size_Endcap = bei->
book1D(
"DEV_size_Endcap",
"Deviation from reference;Module;<size_ref>-<size>",672,0.,672.);
256 TH1* ref1; TH1* ref2;
257 TH1* ref3; TH1* ref4;
262 me1 = bei->
get(
"Pixel/Barrel/SUMDIG_adc_Barrel");
264 dev1 = bei->
get(
"Pixel/Barrel/DEV_adc_Barrel");
265 me2 = bei->
get(
"Pixel/Barrel/SUMDIG_ndigis_Barrel");
267 dev2 = bei->
get(
"Pixel/Barrel/DEV_ndigis_Barrel");
268 me3 = bei->
get(
"Pixel/Barrel/SUMCLU_charge_Barrel");
270 dev3 = bei->
get(
"Pixel/Barrel/DEV_charge_Barrel");
271 me4 = bei->
get(
"Pixel/Barrel/SUMCLU_nclusters_Barrel");
273 dev4 = bei->
get(
"Pixel/Barrel/DEV_nclusters_Barrel");
274 me5 = bei->
get(
"Pixel/Barrel/SUMCLU_size_Barrel");
276 dev5 = bei->
get(
"Pixel/Barrel/DEV_size_Barrel");
277 for(
int i=1;
i!=n+1;
i++){
278 float ref_value;
float new_value;
280 if(me1)
if(ref1)
if(dev1){
282 ref_value = ref1->GetBinContent(
i);
286 if(me2)
if(ref2)
if(dev2){
288 ref_value = ref2->GetBinContent(
i);
292 if(me3)
if(ref3)
if(dev3){
294 ref_value = ref3->GetBinContent(
i);
298 if(me4)
if(ref4)
if(dev4){
300 ref_value = ref4->GetBinContent(
i);
304 if(me5)
if(ref5)
if(dev5){
306 ref_value = ref5->GetBinContent(
i);
315 TH1* ref11; TH1* ref12;
316 TH1* ref13; TH1* ref14;
321 me11 = bei->
get(
"Pixel/Endcap/SUMDIG_adc_Endcap");
323 dev11 = bei->
get(
"Pixel/Endcap/DEV_adc_Endcap");
324 me12 = bei->
get(
"Pixel/Endcap/SUMDIG_ndigis_Endcap");
326 dev12 = bei->
get(
"Pixel/Endcap/DEV_ndigis_Endcap");
327 me13 = bei->
get(
"Pixel/Endcap/SUMCLU_charge_Endcap");
329 dev13 = bei->
get(
"Pixel/Endcap/DEV_charge_Endcap");
330 me14 = bei->
get(
"Pixel/Endcap/SUMCLU_nclusters_Endcap");
332 dev14 = bei->
get(
"Pixel/Endcap/DEV_nclusters_Endcap");
333 me15 = bei->
get(
"Pixel/Endcap/SUMCLU_size_Endcap");
335 dev15 = bei->
get(
"Pixel/Endcap/DEV_size_Endcap");
336 for(
int i=1;
i!=nn+1;
i++){
337 float ref_value;
float new_value;
339 if(me11)
if(ref11)
if(dev11){
341 ref_value = ref11->GetBinContent(
i);
345 if(me12)
if(ref12)
if(dev12){
347 ref_value = ref12->GetBinContent(
i);
351 if(me13)
if(ref13)
if(dev13){
353 ref_value = ref13->GetBinContent(
i);
357 if(me14)
if(ref14)
if(dev14){
359 ref_value = ref14->GetBinContent(
i);
363 if(me15)
if(ref15)
if(dev15){
365 ref_value = ref15->GetBinContent(
i);
374 blade_subdirs.clear();
377 vector<string> modules;
378 for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
381 for (vector<string>::const_iterator m_it = modules.begin(); m_it != modules.end(); m_it++) {
383 blade_subdirs.push_back(*m_it);
397 string currDir = bei->
pwd();
407 if (currDir.find(dir_name) != string::npos) {
408 vector<MonitorElement*> sum_mes;
409 for (vector<string>::const_iterator iv = me_names.begin();
410 iv != me_names.end(); iv++) {
412 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
413 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
414 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
415 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
417 else if((*iv)==
"ndigis"||(*iv)==
"adc")
419 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||
420 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
421 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
423 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
424 else if((*iv)==
"residualX"||(*iv)==
"residualY")
426 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
428 else if((*iv)==
"Gain1d"||(*iv)==
"GainChi2NDF1d"||
429 (*iv)==
"GainChi2Prob1d"||(*iv)==
"Pedestal1d"||
430 (*iv)==
"GainNPoints1d"||(*iv)==
"GainHighPoint1d"||
431 (*iv)==
"GainLowPoint1d"||(*iv)==
"GainEndPoint1d"||
432 (*iv)==
"GainFitResult2d"||(*iv)==
"GainDynamicRange2d"||
433 (*iv)==
"GainSaturate2d"||
434 (*iv)==
"ScurveChi2ProbSummary"||(*iv)==
"ScurveFitResultSummary"||
435 (*iv)==
"ScurveSigmasSummary"||(*iv)==
"ScurveThresholdSummary"||
436 (*iv)==
"pixelAliveSummary" || (*iv) ==
"SiPixelErrorsCalibDigis")
440 if((*iv).find(
"residual")!=string::npos){
441 tag = prefix +
"_" + (*iv) +
"_mean_"
442 + currDir.substr(currDir.find(dir_name));
444 sum_mes.push_back(temp);
445 tag = prefix +
"_" + (*iv) +
"_RMS_"
446 + currDir.substr(currDir.find(dir_name));
448 sum_mes.push_back(temp);
449 }
else if(prefix ==
"SUMCAL"){
450 if((*iv)==
"Gain1d" || (*iv)==
"GainChi2NDF1d" || (*iv)==
"GainChi2Prob1d" ||
451 (*iv)==
"GainNPoints1d" || (*iv)==
"GainHighPoint1d" ||
452 (*iv)==
"GainLowPoint1d" || (*iv)==
"GainEndPoint1d" ||
453 (*iv)==
"GainDynamicRange2d" || (*iv)==
"GainSaturate2d" ||
454 (*iv)==
"Pedestal1d" ||
455 (*iv)==
"ScurveChi2ProbSummary" || (*iv)==
"ScurveFitResultSummary" ||
456 (*iv)==
"ScurveSigmasSummary" || (*iv)==
"ScurveThresholdSummary"){
457 tag = prefix +
"_" + (*iv) +
"_mean_"
458 + currDir.substr(currDir.find(dir_name));
460 sum_mes.push_back(temp);
461 tag = prefix +
"_" + (*iv) +
"_RMS_"
462 + currDir.substr(currDir.find(dir_name));
464 sum_mes.push_back(temp);
465 }
else if((*iv) ==
"SiPixelErrorsCalibDigis"){
466 tag = prefix +
"_" + (*iv) +
"_NCalibErrors_"
467 + currDir.substr(currDir.find(dir_name));
469 sum_mes.push_back(temp);
470 }
else if((*iv)==
"GainFitResult2d"){
471 tag = prefix +
"_" + (*iv) +
"_NNegativeFits_"
472 + currDir.substr(currDir.find(dir_name));
474 sum_mes.push_back(temp);
475 }
else if((*iv)==
"pixelAliveSummary"){
476 tag = prefix +
"_" + (*iv) +
"_FracOfPerfectPix_"
477 + currDir.substr(currDir.find(dir_name));
479 sum_mes.push_back(temp);
480 tag = prefix +
"_" + (*iv) +
"_mean_"
481 + currDir.substr(currDir.find(dir_name));
483 sum_mes.push_back(temp);
486 tag = prefix +
"_" + (*iv) +
"_" + currDir.substr(currDir.find(dir_name));
488 sum_mes.push_back(temp);
490 tag = prefix +
"_" + (*iv) +
"FREQ_"
491 + currDir.substr(currDir.find(dir_name));
493 sum_mes.push_back(temp);
495 if(prefix==
"SUMDIG" && (*iv)==
"adc"){
496 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(dir_name));
497 temp = bei->
book1D(tag.c_str(), tag.c_str(),128, 0., 256.);
498 sum_mes.push_back(temp);
500 if(prefix==
"SUMCLU" && (*iv)==
"charge"){
501 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(dir_name));
502 temp = bei->
book1D(tag.c_str(), tag.c_str(),100, 0., 200.);
503 sum_mes.push_back(temp);
507 if (sum_mes.size() == 0) {
508 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" <<
"\n" ;
516 for (vector<string>::const_iterator it = subdirs.begin();
517 it != subdirs.end(); it++) {
518 if (prefix!=
"SUMOFF" && (*it).find(
"Module_") == string::npos)
continue;
519 if (prefix==
"SUMOFF" && (*it).find(isbarrel?
"Layer_":
"Disk_") == string::npos)
continue;
523 vector<string> contents = bei->
getMEs();
525 for (vector<MonitorElement*>::const_iterator
isum = sum_mes.begin();
527 for (vector<string>::const_iterator im = contents.begin();
528 im != contents.end(); im++) {
529 string sname = ((*isum)->getName());
531 tname = sname.substr(7,(sname.find(
"_",7)-6));
532 if(sname.find(
"ALLMODS_adcCOMB_")!=string::npos) tname =
"adc_";
533 if(sname.find(
"ALLMODS_chargeCOMB_")!=string::npos) tname =
"charge_";
534 if(sname.find(
"_charge_")!=string::npos && sname.find(
"Track_")==string::npos) tname =
"charge_";
535 if(sname.find(
"_nclusters_")!=string::npos && sname.find(
"Track_")==string::npos) tname =
"nclusters_";
536 if(sname.find(
"_size_")!=string::npos && sname.find(
"Track_")==string::npos) tname =
"size_";
537 if(sname.find(
"_charge_OffTrack_")!=string::npos) tname =
"charge_OffTrack_";
538 if(sname.find(
"_nclusters_OffTrack_")!=string::npos) tname =
"nclusters_OffTrack_";
539 if(sname.find(
"_size_OffTrack_")!=string::npos) tname =
"size_OffTrack_";
540 if(sname.find(
"_sizeX_OffTrack_")!=string::npos) tname =
"sizeX_OffTrack_";
541 if(sname.find(
"_sizeY_OffTrack_")!=string::npos) tname =
"sizeY_OffTrack_";
542 if(sname.find(
"_charge_OnTrack_")!=string::npos) tname =
"charge_OnTrack_";
543 if(sname.find(
"_nclusters_OnTrack_")!=string::npos) tname =
"nclusters_OnTrack_";
544 if(sname.find(
"_size_OnTrack_")!=string::npos) tname =
"size_OnTrack_";
545 if(sname.find(
"_sizeX_OnTrack_")!=string::npos) tname =
"sizeX_OnTrack_";
546 if(sname.find(
"_sizeY_OnTrack_")!=string::npos) tname =
"sizeY_OnTrack_";
548 if(tname.find(
"FREQ")!=string::npos) tname =
"ndigis_";
549 if (((*im)).find(tname) == 0) {
550 string fullpathname = bei->
pwd() +
"/" + (*im);
555 if(sname.find(
"_charge")!=string::npos && sname.find(
"Track_")==string::npos && me->
getName().find(
"Track_")!=string::npos)
continue;
556 if(sname.find(
"_nclusters_")!=string::npos && sname.find(
"Track_")==string::npos && me->
getName().find(
"Track_")!=string::npos)
continue;
557 if(sname.find(
"_size")!=string::npos && sname.find(
"Track_")==string::npos && me->
getName().find(
"Track_")!=string::npos)
continue;
560 if (sname.find(
"_RMS_")!=string::npos &&
561 sname.find(
"GainDynamicRange2d")==string::npos &&
562 sname.find(
"GainSaturate2d")==string::npos){
564 }
else if (sname.find(
"GainDynamicRange2d")!=string::npos ||
565 sname.find(
"GainSaturate2d")!=string::npos){
566 float SumOfEntries=0.;
float SumOfSquaredEntries=0.;
int SumOfPixels=0;
573 float MeanInZ = SumOfEntries / float(SumOfPixels);
574 float RMSInZ =
sqrt(SumOfSquaredEntries/
float(SumOfPixels));
575 if(sname.find(
"_mean_")!=string::npos) (*isum)->Fill(ndet, MeanInZ);
576 if(sname.find(
"_RMS_")!=string::npos) (*isum)->Fill(ndet, RMSInZ);
577 }
else if (sname.find(
"_FracOfPerfectPix_")!=string::npos){
580 float nall = (me->
getTH1F())->Integral(1,11);
582 (*isum)->Fill(ndet, nlast/nall);
583 }
else if (sname.find(
"_NCalibErrors_")!=string::npos ||
584 sname.find(
"FREQ_")!=string::npos){
586 (*isum)->Fill(ndet, nall);
587 }
else if (sname.find(
"GainFitResult2d")!=string::npos){
592 (*isum)->Fill(ndet,
float(NegFitPixels));
593 }
else if (sname.find(
"ALLMODS_adcCOMB_")!=string::npos ||
594 (sname.find(
"ALLMODS_chargeCOMB_")!=string::npos && me->
getName().find(
"Track_")==string::npos)){
595 (*isum)->getTH1F()->Add(me->
getTH1F());
596 }
else if (sname.find(
"_NErrors_")!=string::npos){
597 string path1 = fullpathname;
598 path1 = path1.replace(path1.find(
"NErrors"),7,
"errorType");
602 for(
int jj=1; jj<16; jj++){
605 string path2 = path1;
606 path2 = path2.replace(path2.find(
"errorType"),9,
"TBMMessage");
614 }
else if ((sname.find(
"_charge_")!=string::npos && sname.find(
"Track_")==string::npos &&
615 me->
getName().find(
"Track_")==string::npos) ||
616 (sname.find(
"_charge_")!=string::npos && sname.find(
"_OnTrack_")!=string::npos &&
617 me->
getName().find(
"_OnTrack_")!=string::npos) ||
618 (sname.find(
"_charge_")!=string::npos && sname.find(
"_OffTrack_")!=string::npos &&
619 me->
getName().find(
"_OffTrack_")!=string::npos) ||
620 (sname.find(
"_nclusters_")!=string::npos && sname.find(
"Track_")==string::npos &&
621 me->
getName().find(
"Track_")==string::npos) ||
622 (sname.find(
"_nclusters_")!=string::npos && sname.find(
"_OnTrack_")!=string::npos &&
623 me->
getName().find(
"_OnTrack_")!=string::npos) ||
624 (sname.find(
"_nclusters_")!=string::npos && sname.find(
"_OffTrack_")!=string::npos &&
625 me->
getName().find(
"_OffTrack_")!=string::npos) ||
626 (sname.find(
"_size")!=string::npos && sname.find(
"Track_")==string::npos &&
627 me->
getName().find(
"Track_")==string::npos) ||
628 (sname.find(
"_size")!=string::npos && sname.find(
"_OnTrack_")!=string::npos &&
629 me->
getName().find(
"_OnTrack_")!=string::npos) ||
630 (sname.find(
"_size")!=string::npos && sname.find(
"_OffTrack_")!=string::npos &&
631 me->
getName().find(
"_OffTrack_")!=string::npos)){
632 (*isum)->Fill(ndet, me->
getMean());
633 }
else if(sname.find(
"_charge_")==string::npos && sname.find(
"_nclusters_")==string::npos && sname.find(
"_size")==string::npos){
634 (*isum)->Fill(ndet, me->
getMean());
639 if(prefix==
"SUMOFF"){
640 (*isum)->setAxisTitle(isbarrel?
"Ladders":
"Blades",1);
641 }
else if(sname.find(
"ALLMODS_adcCOMB_")!=string::npos){
642 (*isum)->setAxisTitle(
"Digi charge [ADC]",1);
643 }
else if(sname.find(
"ALLMODS_chargeCOMB_")!=string::npos){
644 (*isum)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
646 (*isum)->setAxisTitle(
"Modules",1);
649 if (sname.find(
"_RMS_")!=string::npos){
650 title =
"RMS of " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
651 }
else if (sname.find(
"_FracOfPerfectPix_")!=string::npos){
652 title =
"FracOfPerfectPix " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
653 }
else if(sname.find(
"_NCalibErrors_")!=string::npos){
654 title =
"Number of CalibErrors " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
655 }
else if(sname.find(
"_NNegativeFits_")!=string::npos){
656 title =
"Number of pixels with neg. fit result " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
657 }
else if (sname.find(
"FREQ_")!=string::npos){
658 title =
"NEvents with digis per module";
659 }
else if (sname.find(
"ALLMODS_adcCOMB_")!=string::npos){
661 }
else if (sname.find(
"ALLMODS_chargeCOMB_")!=string::npos){
663 }
else if (sname.find(
"_NErrors_")!=string::npos){
664 if(prefix==
"SUMOFF" && isbarrel) title =
"Total number of errors per Ladder";
665 else if(prefix==
"SUMOFF" && !isbarrel) title =
"Total number of errors per Blade";
666 else title =
"Total number of errors per Module";
668 if(prefix==
"SUMOFF") title =
"Mean " + sname.substr(7,(sname.find(
"_",7)-7)) + (isbarrel?
" per Ladder":
" per Blade");
669 else title =
"Mean " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per Module";
671 (*isum)->setAxisTitle(title,2);
678 if(dir_name.find(
"Blade") == 0) bei->
goUp();
686 for (vector<string>::const_iterator it = subdirs.begin();
687 it != subdirs.end(); it++) {
689 if((bei->
pwd()).
find(
"Endcap")!=string::npos ||
690 (bei->
pwd()).
find(
"AdditionalPixelErrors")!=string::npos) bei->
goUp();
692 if((*it).find(
"Endcap")!=string::npos ||
693 (*it).find(
"AdditionalPixelErrors")!=string::npos)
continue;
697 string grandbarrel_structure_name;
698 vector<string> grandbarrel_me_names;
700 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand Barrel Summary configuration parameters!! ";
709 for (vector<string>::const_iterator it = subdirs.begin();
710 it != subdirs.end(); it++) {
712 if((bei->
pwd()).
find(
"Barrel")!=string::npos ||
713 (bei->
pwd()).
find(
"AdditionalPixelErrors")!=string::npos) bei->
goUp();
715 if ((*it).find(
"Barrel")!=string::npos ||
716 (*it).find(
"AdditionalPixelErrors")!=string::npos)
continue;
720 string grandendcap_structure_name;
721 vector<string> grandendcap_me_names;
723 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand Endcap Summary configuration parameters!! ";
741 vector<string>& me_names) {
743 string currDir = bei->
pwd();
748 if (currDir.find(dir_name) != string::npos) {
749 vector<MonitorElement*> sum_mes;
750 for (vector<string>::const_iterator iv = me_names.begin();
751 iv != me_names.end(); iv++) {
753 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
754 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
755 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
756 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap"||
757 (*iv)==
"FedChLErrArray"||(*iv)==
"FedChNErrArray"||(*iv)==
"FedETypeNErrArray")
760 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
761 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
762 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
763 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap"){
764 string tag = prefix +
"_" + (*iv) +
"_FEDErrors";
766 sum_mes.push_back(temp);
767 }
else if((*iv)==
"FedChLErrArray"||(*iv)==
"FedChNErrArray"||(*iv)==
"FedETypeNErrArray"){
768 string tag = prefix +
"_" + (*iv);
770 if((*iv)==
"FedChLErrArray") temp = bei->
book2D(
"FedChLErrArray",
"Type of last error",40,-0.5,39.5,37,0.,37.);
771 if((*iv)==
"FedChNErrArray") temp = bei->
book2D(
"FedChNErrArray",
"Total number of errors",40,-0.5,39.5,37,0.,37.);
772 if((*iv)==
"FedETypeNErrArray"){
773 temp = bei->
book2D(
"FedETypeNErrArray",
"Number of each error type",40,-0.5,39.5,21,0.,21.);
796 sum_mes.push_back(temp);
799 if (sum_mes.size() == 0) {
800 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" <<
"\n" ;
805 for (vector<string>::const_iterator it = subdirs.begin();
806 it != subdirs.end(); it++) {
807 if ( (*it).find(
"FED_") == string::npos)
continue;
809 string fedid = (*it).substr((*it).find(
"_")+1);
810 std::istringstream isst;
813 vector<string> contents = bei->
getMEs();
815 for (vector<MonitorElement*>::const_iterator
isum = sum_mes.begin();
817 for (vector<string>::const_iterator im = contents.begin();
818 im != contents.end(); im++) {
819 if(((*im).find(
"FedChNErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedChNErrArray")!=std::string::npos) ||
820 ((*im).find(
"FedChLErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedChLErrArray")!=std::string::npos) ||
821 ((*im).find(
"FedETypeNErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedETypeNErrArray")!=std::string::npos)){
822 string fullpathname = bei->
pwd() +
"/" + (*im);
825 for(
int i=0;
i!=37;
i++){
826 int n = (*im).find(
"_"); n++;
827 string channel_str = (*im).substr(n);
828 std::istringstream jsst;
829 jsst.str(channel_str);
833 if((*im).find(
"FedETypeNErrArray_")!=std::string::npos &&
i<21) (*isum)->Fill(ndet-1,
i,me->
getIntValue());
839 string sname = ((*isum)->getName());
841 tname = sname.substr(7,(sname.find(
"_",7)-6));
842 if (((*im)).
find(tname) == 0) {
843 string fullpathname = bei->
pwd() +
"/" + (*im);
848 if (sname.find(
"_NErrors_")!=string::npos){
849 string path1 = fullpathname;
850 path1 = path1.replace(path1.find(
"NErrors"),7,
"errorType");
854 for(
int jj=1; jj<16; jj++){
857 string path2 = path1;
858 path2 = path2.replace(path2.find(
"errorType"),9,
"TBMMessage");
866 }
else (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->
getEntries());
868 (*isum)->setAxisTitle(
"FED #",1);
870 title = sname.substr(7,(sname.find(
"_",7)-7)) +
" per FED";
871 (*isum)->setAxisTitle(title,2);
881 for (vector<string>::const_iterator it = subdirs.begin();
882 it != subdirs.end(); it++) {
883 if((*it).find(
"Endcap")!=string::npos ||
884 (*it).find(
"Barrel")!=string::npos)
continue;
896 vector<string>& me_names) {
898 vector<MonitorElement*> gsum_mes;
899 string currDir = bei->
pwd();
900 string path_name = bei->
pwd();
901 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
903 if ((dir_name.find(
"DQMData") == 0) ||
904 (dir_name.find(
"Pixel") == 0) ||
905 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
906 (dir_name.find(
"Endcap") == 0) ||
907 (dir_name.find(
"HalfCylinder") == 0) ||
908 (dir_name.find(
"Disk") == 0) ||
909 (dir_name.find(
"Blade") == 0) ||
910 (dir_name.find(
"Panel") == 0) )
return;
912 int nDirs = subdirs.size();
918 bool first_subdir =
true;
919 for (vector<string>::const_iterator it = subdirs.begin();
920 it != subdirs.end(); it++) {
924 vector<string> contents = bei->
getMEs();
938 for (vector<string>::const_iterator im = contents.begin();
939 im != contents.end(); im++) {
941 for (vector<string>::const_iterator iv = me_names.begin();
942 iv != me_names.end(); iv++) {
943 string var =
"_" + (*iv) +
"_";
945 if ((*im).find(var) != string::npos) {
946 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
947 (*im).find(
"Track_")!=string::npos)
continue;
949 string full_path = (*it) +
"/" +(*im);
953 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
954 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
955 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
956 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
958 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
959 (*iv)==
"ndigisFREQ" || (*iv)==
"adcCOMB")
961 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
962 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
963 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
965 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
966 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
967 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
969 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
971 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
972 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
973 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
974 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
975 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
976 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
977 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
978 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
979 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
980 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
981 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
982 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
983 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
984 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
985 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
986 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix" ||
987 (*iv)==
"SiPixelErrorsCalibDigis_NCalibErrors" )
999 nbin = me->
getTH1F()->GetNbinsX();
1000 string me_name = prefix +
"_" + (*iv) +
"_" + dir_name;
1001 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" + dir_name;
1002 else if(prefix==
"SUMOFF" && dir_name==
"Barrel") nbin=192;
1003 else if((*iv)==
"adcCOMB") nbin=256;
1004 else if(dir_name==
"Barrel") nbin=768;
1005 else if(prefix==
"SUMOFF" && dir_name.find(
"Shell")!=string::npos) nbin=48;
1006 else if(dir_name.find(
"Shell")!=string::npos) nbin=192;
1007 else nbin=nbin*nDirs;
1025 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1026 igm != gsum_mes.end(); igm++) {
1028 if ((*igm)->getName().find(var) != string::npos) {
1030 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Ladders",1);
1031 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1032 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1033 else (*igm)->setAxisTitle(
"Modules",1);
1038 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Ladder";
1039 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1040 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Ladder";
1041 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix!=
"SUMOFF") title =
"NEvents with digis per Module";
1042 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix==
"SUMOFF") title =
"NEvents with digis per Ladder/Blade";
1043 else if((*igm)->getName().find(
"adcCOMB_") != string::npos) title =
"NDigis";
1044 else if((*igm)->getName().find(
"chargeCOMB_") != string::npos) title =
"NClusters";
1045 else 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){
1055 nbin_i=0; nbin_subdir=4;
1056 }
else if((*igm)->getName().find(
"Layer") != string::npos){
1057 nbin_i=(cnt-1)*4; nbin_subdir=4;
1058 }
else if((*igm)->getName().find(
"Shell") != string::npos){
1059 if(prefix!=
"SUMOFF"){
1060 if(iDir==0){ nbin_i=0; nbin_subdir=40; }
1061 else if(iDir==1){ nbin_i=40; nbin_subdir=64; }
1062 else if(iDir==2){ nbin_i=104; nbin_subdir=88; }
1064 if(iDir==0){ nbin_i=0; nbin_subdir=10; }
1065 else if(iDir==1){ nbin_i=10; nbin_subdir=16; }
1066 else if(iDir==2){ nbin_i=26; nbin_subdir=22; }
1068 }
else if((*igm)->getName().find(
"Barrel") != string::npos){
1069 if(prefix!=
"SUMOFF"){
1070 if(iDir==0){ nbin_i=0; nbin_subdir=192; }
1071 else if(iDir==1){ nbin_i=192; nbin_subdir=192; }
1072 else if(iDir==2){ nbin_i=384; nbin_subdir=192; }
1073 else if(iDir==3){ nbin_i=576; nbin_subdir=192; }
1075 if(iDir==0){ nbin_i=0; nbin_subdir=48; }
1076 else if(iDir==1){ nbin_i=48; nbin_subdir=48; }
1077 else if(iDir==2){ nbin_i=96; nbin_subdir=48; }
1078 else if(iDir==3){ nbin_i=144; nbin_subdir=48; }
1083 if((*igm)->getName().find(
"ndigisFREQ")==string::npos)
1085 if(((*igm)->getName().find(
"adcCOMB")!=string::npos && me->
getName().find(
"adcCOMB")!=string::npos)
1086 || ((*igm)->getName().find(
"chargeCOMB")!=string::npos && me->
getName().find(
"chargeCOMB")!=string::npos))
1088 (*igm)->getTH1F()->Add(me->
getTH1F());
1089 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1090 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1091 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1092 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1093 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1094 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1095 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1096 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1097 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1098 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1099 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1100 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1101 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1102 (*igm)->getName().find(
"size_")==string::npos)){
1106 else if(me->
getName().find(
"ndigisFREQ")!=string::npos)
1116 first_subdir =
false;
1123 vector<string>& me_names) {
1125 vector<MonitorElement*> gsum_mes;
1126 string currDir = bei->
pwd();
1127 string path_name = bei->
pwd();
1128 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
1129 if ((dir_name.find(
"DQMData") == 0) ||
1130 (dir_name.find(
"Pixel") == 0) ||
1131 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
1132 (dir_name.find(
"Barrel") == 0) ||
1133 (dir_name.find(
"Shell") == 0) ||
1134 (dir_name.find(
"Layer") == 0) ||
1135 (dir_name.find(
"Ladder") == 0) )
return;
1140 int nbin_subdir = 0;
1142 bool first_subdir =
true;
1143 for (vector<string>::const_iterator it = subdirs.begin();
1144 it != subdirs.end(); it++) {
1147 vector<string> contents = bei->
getMEs();
1159 for (vector<string>::const_iterator im = contents.begin();
1160 im != contents.end(); im++) {
1161 for (vector<string>::const_iterator iv = me_names.begin();
1162 iv != me_names.end(); iv++) {
1163 string var =
"_" + (*iv) +
"_";
1164 if ((*im).find(var) != string::npos) {
1165 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
1166 (*im).find(
"Track_")!=string::npos)
continue;
1167 string full_path = (*it) +
"/" +(*im);
1171 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
1172 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
1173 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
1174 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
1176 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
1177 (*iv)==
"ndigisFREQ"||(*iv)==
"adcCOMB")
1179 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
1180 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
1181 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
1183 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
1184 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
1185 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
1187 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
1189 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
1190 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
1191 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
1192 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
1193 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
1194 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
1195 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
1196 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
1197 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
1198 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
1199 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
1200 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
1201 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
1202 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
1203 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
1204 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix"||
1205 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
1216 nbin = me->
getTH1F()->GetNbinsX();
1217 string me_name = prefix +
"_" + (*iv) +
"_" + dir_name;
1218 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" + dir_name;
1219 else if(prefix==
"SUMOFF" && dir_name==
"Endcap") nbin=96;
1220 else if(dir_name==
"Endcap") nbin=672;
1221 else if(prefix==
"SUMOFF" && dir_name.find(
"HalfCylinder")!=string::npos) nbin=24;
1222 else if(dir_name.find(
"HalfCylinder")!=string::npos) nbin=168;
1223 else if(prefix==
"SUMOFF" && dir_name.find(
"Disk")!=string::npos) nbin=12;
1224 else if(dir_name.find(
"Disk")!=string::npos) nbin=84;
1225 else if(dir_name.find(
"Blade")!=string::npos) nbin=7;
1245 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1246 igm != gsum_mes.end(); igm++) {
1247 if ((*igm)->getName().find(var) != string::npos) {
1248 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Blades",1);
1249 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1250 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1251 else (*igm)->setAxisTitle(
"Modules",1);
1253 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Blade";
1254 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1255 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Blade";
1256 else if((*igm)->getName().find(
"FREQ_") != string::npos) title =
"NEvents with digis per Module";
1257 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) title =
"NDigis";
1258 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) title =
"NClusters";
1259 else title =
"mean " + (*iv) +
" per Module";
1260 (*igm)->setAxisTitle(title,2);
1262 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1264 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1266 }
else if((*igm)->getName().find(
"Panel_") != string::npos){
1272 }
else if((*igm)->getName().find(
"Blade") != string::npos){
1273 if((*im).find(
"_1") != string::npos) nbin_subdir=4;
1274 if((*im).find(
"_2") != string::npos) {nbin_i=4; nbin_subdir=3;}
1275 }
else if((*igm)->getName().find(
"Disk") != string::npos){
1276 nbin_i=((cnt-1)%12)*7; nbin_subdir=7;
1277 }
else if((*igm)->getName().find(
"HalfCylinder") != string::npos){
1278 if(prefix!=
"SUMOFF"){
1280 if((*im).find(
"_2") != string::npos) nbin_i=84;
1283 if((*im).find(
"_2") != string::npos) nbin_i=12;
1285 }
else if((*igm)->getName().find(
"Endcap") != string::npos){
1286 if(prefix!=
"SUMOFF"){
1288 if((*im).find(
"_mO") != string::npos) nbin_i=168;
1289 if((*im).find(
"_pI") != string::npos) nbin_i=336;
1290 if((*im).find(
"_pO") != string::npos) nbin_i=504;
1293 if((*im).find(
"_mO") != string::npos) nbin_i=24;
1294 if((*im).find(
"_pI") != string::npos) nbin_i=48;
1295 if((*im).find(
"_pO") != string::npos) nbin_i=72;
1300 if((*igm)->getName().find(
"ndigisFREQ")==string::npos){
1301 if(((*igm)->getName().find(
"adcCOMB")!=string::npos && me->
getName().find(
"adcCOMB")!=string::npos) || ((*igm)->getName().find(
"chargeCOMB")!=string::npos && me->
getName().find(
"chargeCOMB")!=string::npos)){
1302 (*igm)->getTH1F()->Add(me->
getTH1F());
1303 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1304 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1305 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1306 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1307 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1308 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1309 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1310 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1311 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1312 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1313 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1314 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1315 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1316 (*igm)->getName().find(
"size_")==string::npos)){
1319 }
else if(me->
getName().find(
"ndigisFREQ")!=string::npos){
1331 first_subdir =
false;
1341 vector<MonitorElement*> & mes) {
1343 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return;
1344 vector<string> contents = bei->
getMEs();
1346 for (vector<string>::const_iterator it = contents.begin();
1347 it != contents.end(); it++) {
1349 if ((*it).find(me_name) == 0) {
1350 string fullpathname = bei->
pwd() +
"/" + me_name;
1367 if(me_name.find(
"ALLMODS_adcCOMB_")!=string::npos) temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),128,0,256);
1368 else if(me_name.find(
"ALLMODS_chargeCOMB_")!=string::npos) temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),100,0,200);
1369 else temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1370 if (temp_me) mes.push_back(temp_me);
1384 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return me;
1385 vector<string> contents = bei->
getMEs();
1387 for (vector<string>::const_iterator it = contents.begin();
1388 it != contents.end(); it++) {
1389 if ((*it).find(me_name) == 0) {
1390 string fullpathname = bei->
pwd() +
"/" + (*it);
1391 me = bei->
get(fullpathname);
1409 if(me_name.find(
"SUMOFF")==string::npos){
1410 if(me_name.find(
"Blade_")!=string::npos)me = bei->
book1D(me_name.c_str(), me_name.c_str(),7,1.,8.);
1411 else me = bei->
book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1414 }
else if(me_name.find(
"Layer_1")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),10,1.,11.);
1415 }
else if(me_name.find(
"Layer_2")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),16,1.,17.);
1416 }
else if(me_name.find(
"Layer_3")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1417 }
else if(me_name.find(
"Disk_")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),12,1.,13.);
1433 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return me;
1434 vector<string> contents = bei->
getMEs();
1436 for (vector<string>::const_iterator it = contents.begin();
1437 it != contents.end(); it++) {
1438 if ((*it).find(me_name) == 0) {
1439 string fullpathname = bei->
pwd() +
"/" + (*it);
1441 me = bei->
get(fullpathname);
1451 me = bei->
book1D(me_name.c_str(), me_name.c_str(),40,-0.5,39.5);
1462 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1464 if(isbarrel && (*it).find(
"Barrel")==string::npos)
continue;
1465 if(!isbarrel && (*it).find(
"Endcap")==string::npos)
continue;
1467 if((*it).find(
"Module_")!=string::npos)
continue;
1468 if((*it).find(
"Panel_")!=string::npos)
continue;
1469 if((*it).find(
"Ladder_")!=string::npos)
continue;
1470 if((*it).find(
"Blade_")!=string::npos)
continue;
1471 if((*it).find(
"Layer_")!=string::npos)
continue;
1472 if((*it).find(
"Disk_")!=string::npos)
continue;
1477 OccupancyMap = bei->
book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
1480 OccupancyMap = bei->
book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
1525 string currDir = bei->
pwd();
1526 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
1529 if(dname.find(
"Layer_")!=string::npos || dname.find(
"Disk_")!=string::npos){
1530 vector<string> meVec = bei->
getMEs();
1531 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1532 string full_path = currDir +
"/" + (*it);
1533 if(full_path.find(
"hitmap_siPixelDigis")!=string::npos){
1537 string path = full_path;
1538 while (path.find_last_of(
"/") != 5)
1540 path = path.substr(0,path.find_last_of(
"/"));
1542 OccupancyMap = bei->
get(path +
"/" + (isbarrel?
"barrel":
"endcap") +
"OccupancyMap");
1560 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1563 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
1582 std::string partB[] = {
"Layer_1",
"Layer_2",
"Layer_3"};
1583 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[0],
"TRKMAP_" + name +
"_" + partB[0], 20, 1., 21., 8, 1., 9.);
1584 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[1],
"TRKMAP_" + name +
"_" + partB[1], 32, 1., 33., 8, 1., 9.);
1585 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[2],
"TRKMAP_" + name +
"_" + partB[2], 44, 1., 45., 8, 1., 9.);
1588 std::string partE[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1589 for(Int_t
p = 0 ;
p <
NCyl ;
p++)
1590 bei->
book2D(
"TRKMAP_" + name +
"_" + partE[
p],
"TRKMAP_" + name +
"_" + partE[p], 24, 1., 25., 7, 1., 8.);
1601 Double_t minB =
mapMin(mapB,
true);
1602 Double_t maxB =
mapMax(mapB,
true);
1608 Double_t minE =
mapMin(mapE,
false);
1609 Double_t maxE =
mapMax(mapE,
false);
1611 Double_t
min = minE<=minB?minE:minB;
1612 Double_t
max = maxE>=maxB?maxE:maxB;
1640 for (vector<string>::const_iterator it = dirLev1.begin(); it != dirLev1.end(); it++)
1646 for (vector<string>::const_iterator it2 = dirLev2.begin(); it2 != dirLev2.end(); it2++)
1652 for (vector<string>::const_iterator it3 = dirLev3.begin(); it3 != dirLev3.end(); it3++)
1663 for (vector<string>::const_iterator it4 = dirLev4.begin(); it4 != dirLev4.end(); it4++)
1672 for (vector<string>::const_iterator it5 = dirLev5.begin(); it5 != dirLev5.end(); it5++)
1697 vector<string> contents = bei->
getMEs();
1698 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
1700 if((*im).find(type +
"_") == string::npos){
1705 std::string fullpathname = bei->
pwd() +
"/" + (*im);
1711 Int_t
nbins = histo->GetNbinsX();
1715 map[
i][
j][
k][
l] = histo->GetBinContent(l + 1);
1719 map[
i][
j][
k][
l] = histo->GetEntries();
1723 map[
i][
j][
k][
l] = histo->GetMean();
1730 sum += histo->GetBinContent(
m + 1);
1739 sum += histo->GetBinContent(
m + 1) * histo->GetBinLowEdge(
m + 1);
1755 std::string
part[] = {
"Layer_1",
"Layer_2",
"Layer_3"};
1756 std::string
path = bei->
pwd();
1759 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1764 cout <<
"Problem: " << fullpath << endl;
1768 for(Int_t
b = 0 ;
b < (10 + 6 *
p);
b++)
1770 me[
p]->getTH2F()->SetBinContent(
b + 1,
i + 1,
map[0][
p][
b][
i]);
1771 me[
p]->getTH2F()->SetBinContent(
b + 1, i + 1 + NModuleB,
map[1][
p][
b][i]);
1772 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1,
map[2][
p][
b][i]);
1773 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1 + NModuleB,
map[3][
p][
b][i]);
1775 me[
p]->getTH2F()->SetMinimum(min);
1776 me[
p]->getTH2F()->SetMaximum(max);
1785 std::string
part[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1786 std::string
path = bei->
pwd();
1787 for (Int_t
i = 0;
i <
NCyl;
i++)
1789 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1794 me[
i]->getTH2F()->SetMinimum(min);
1795 me[
i]->getTH2F()->SetMaximum(max);
1798 cout <<
"Problem: " << fullpath << endl;
1801 for(Int_t
c = 0 ;
c <
NCyl ;
c += 2)
1802 for(Int_t d = 0 ; d <
NDisk ; d++)
1804 me[
c + d]->getTH2F()->SetBinContent(
b + 1, 1,
map[
c][d][
b][0]);
1805 me[
c + d]->getTH2F()->SetBinContent(b + 1, 2,
map[
c][d][b][4]);
1806 me[
c + d]->getTH2F()->SetBinContent(b + 1, 3,
map[
c][d][b][1]);
1807 me[
c + d]->getTH2F()->SetBinContent(b + 1, 4,
map[
c][d][b][5]);
1808 me[
c + d]->getTH2F()->SetBinContent(b + 1, 5,
map[
c][d][b][2]);
1809 me[
c + d]->getTH2F()->SetBinContent(b + 1, 6,
map[
c][d][b][6]);
1810 me[
c + d]->getTH2F()->SetBinContent(b + 1, 7,
map[
c][d][b][3]);
1812 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 1,
map[
c + 1][d][b][0]);
1813 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 2,
map[
c + 1][d][b][4]);
1814 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 3,
map[
c + 1][d][b][1]);
1815 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 4,
map[
c + 1][d][b][5]);
1816 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 5,
map[
c + 1][d][b][2]);
1817 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 6,
map[
c + 1][d][b][6]);
1818 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 7,
map[
c + 1][d][b][3]);
1827 Double_t
min =
map[0][0][0][0];
1830 for(Int_t d = 0 ; d < (isBarrel?3:2) ; d++)
1831 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12) ;
b++)
1832 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++){
1833 if(
map[
p][d][
b][
i] < min)
1844 Double_t
max =
map[0][0][0][0];
1847 for(Int_t d = 0 ; d < (isBarrel?3:2); d++)
1848 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12);
b++)
1849 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++)
1850 if(
map[
p][d][
b][
i] > max)
1869 if(
offlineXMLfile_) localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_qualitytest.xml");
1870 else localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
1878 cout <<
" Problem setting up quality tests "<<endl;
1890 int messageCounter=0;
1891 string currDir = bei->
pwd();
1892 vector<string> contentVec;
1897 for (vector<string>::iterator it = contentVec.begin();
1898 it != contentVec.end(); it++) {
1899 vector<string> contents;
1901 if (nval == 0)
continue;
1902 for (vector<string>::const_iterator im = contents.begin();
1903 im != contents.end(); im++) {
1910 for(vector<QReport *>::const_iterator wi = warnings.begin();
1911 wi != warnings.end(); ++wi) {
1918 edm::LogWarning(
"SiPixelActionExecutor::checkQTestResults") <<
" *** Warning for " << me->
getName() <<
","
1919 << (*wi)->getMessage() <<
" " << me->
getMean()
1924 warnings=vector<QReport*>();
1927 for(vector<QReport *>::const_iterator ei = errors.begin();
1928 ei != errors.end(); ++ei) {
1930 float empty_mean = me->
getMean();
1931 float empty_rms = me->
getRMS();
1932 if((empty_mean != 0 && empty_rms != 0) || (
calib_type_ == 0)){
1940 << (*ei)->getMessage() <<
" " << me->
getMean()
1946 errors=vector<QReport*>();
1950 nval=int(); contents=vector<string>();
1952 LogDebug(
"SiPixelActionExecutor::checkQTestResults") <<
"messageCounter: "<<messageCounter<<
" , message_limit: "<<
message_limit_<<endl;
1955 contentVec=vector<string>(); currDir=string(); messageCounter=int();
1965 string currDir = bei->
pwd();
1966 if (currDir.find(
"Layer") != string::npos) {
1967 string name =
"Default";
1973 for (vector<string>::const_iterator it = subdirs.begin();
1974 it != subdirs.end(); it++) {
1985 static int icount = 0;
1986 string currDir = bei->
pwd();
1987 if (currDir.find(
"Ladder_") != string::npos) {
1989 vector<string> contents = bei->
getMEs();
1991 for (vector<string>::const_iterator im = contents.begin();
1992 im != contents.end(); im++) {
1993 if ((*im).find(
"Clusters") != string::npos) {
1995 if (icount != 0 && icount%6 == 0) {
1998 ostringstream full_path;
1999 full_path <<
"test/" << currDir <<
"/" << *im ;
2000 string element =
"monitorable";
2001 string element_name = full_path.str();
2007 for (vector<string>::const_iterator it = subdirs.begin();
2008 it != subdirs.end(); it++) {
2022 for (vector<string>::iterator it =
tkMapMENames.begin();
2024 names.push_back(*it) ;
2026 return names.size();
2044 string currDir = bei->
pwd();
2045 string dir_name =
"Ladder_";
2047 int fedId=-1;
int linkId=-1;
2048 if (currDir.find(dir_name) != string::npos) {
2050 for (vector<string>::const_iterator it = subdirs.begin();
2051 it != subdirs.end(); it++) {
2052 if ( (*it).find(
"Module_") == string::npos)
continue;
2059 vector<string> contents = bei->
getMEs();
2060 bool first_me =
false;
2062 for (vector<string>::const_iterator im = contents.begin();
2063 im != contents.end(); im++) {
2065 string mEName = (*im);
2066 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2067 std::istringstream isst;
2068 isst.str(detIdString);
2069 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2076 for(
int fedid=0; fedid<=40; ++fedid){
2078 uint32_t newDetId = detId;
2079 if(converter.hasDetUnit(newDetId)){
2084 if(fedId==-1)
continue;
2088 formatter.toCabling(cabling,detector);
2089 linkId = cabling.
link;
2093 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2097 for (vector<string>::const_iterator it = subdirs.begin();
2098 it != subdirs.end(); it++) {
2099 if((*it).find(
"Endcap")!=string::npos)
continue;
2109 string currDir = bei->
pwd();
2110 string dir_name =
"Panel_";
2112 int fedId=-1;
int linkId=-1;
2113 if (currDir.find(dir_name) != string::npos) {
2115 for (vector<string>::const_iterator it = subdirs.begin();
2116 it != subdirs.end(); it++) {
2117 if ( (*it).find(
"Module_") == string::npos)
continue;
2124 vector<string> contents = bei->
getMEs();
2125 bool first_me =
false;
2127 for (vector<string>::const_iterator im = contents.begin();
2128 im != contents.end(); im++) {
2130 string mEName = (*im);
2131 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2132 std::istringstream isst;
2133 isst.str(detIdString);
2134 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2141 for(
int fedid=0; fedid<=40; ++fedid){
2143 uint32_t newDetId = detId;
2144 if(converter.hasDetUnit(newDetId)){
2149 if(fedId==-1)
continue;
2153 formatter.toCabling(cabling,detector);
2154 linkId = cabling.
link;
2158 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2162 for (vector<string>::const_iterator it = subdirs.begin();
2163 it != subdirs.end(); it++) {
2164 if((bei->
pwd()).
find(
"Barrel")!=string::npos) bei->
goUp();
2166 if((*it).find(
"Barrel")!=string::npos)
continue;
2190 me = bei->
get(
"Pixel/Barrel/SUMDIG_adc_Barrel");
2192 std::cout<<
"SUMDIG_adc_Barrel: "<<std::endl;
2195 me = bei->
get(
"Pixel/Barrel/SUMDIG_ndigis_Barrel");
2197 std::cout<<
"SUMDIG_ndigis_Barrel: "<<std::endl;
2200 me = bei->
get(
"Pixel/Barrel/SUMCLU_charge_Barrel");
2202 std::cout<<
"SUMCLU_charge_Barrel: "<<std::endl;
2205 me = bei->
get(
"Pixel/Barrel/SUMCLU_nclusters_Barrel");
2207 std::cout<<
"SUMCLU_nclusters_Barrel: "<<std::endl;
2210 me = bei->
get(
"Pixel/Barrel/SUMCLU_size_Barrel");
2212 std::cout<<
"SUMCLU_size_Barrel: "<<std::endl;
2220 me = bei->
get(
"Pixel/Endcap/SUMDIG_adc_Endcap");
2222 std::cout<<
"SUMDIG_adc_Endcap: "<<std::endl;
2225 me = bei->
get(
"Pixel/Endcap/SUMDIG_ndigis_Endcap");
2227 std::cout<<
"SUMDIG_ndigis_Endcap: "<<std::endl;
2230 me = bei->
get(
"Pixel/Endcap/SUMCLU_charge_Endcap");
2232 std::cout<<
"SUMCLU_charge_Endcap: "<<std::endl;
2235 me = bei->
get(
"Pixel/Endcap/SUMCLU_nclusters_Endcap");
2237 std::cout<<
"SUMCLU_nclusters_Endcap: "<<std::endl;
2240 me = bei->
get(
"Pixel/Endcap/SUMCLU_size_Endcap");
2242 std::cout<<
"SUMCLU_size_Endcap: "<<std::endl;
2254 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;z-side;Ladder",2,-1.,1.,20,-10.,10.);
2255 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;z-side;Ladder",2,-1.,1.,32,-16.,16.);
2256 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;z-side;Ladder",2,-1.,1.,44,-22.,22.);
2258 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,20,-10.,10.);
2259 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,32,-16.,16.);
2260 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2266 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;",24,-12.,12.,1,0.,1.);
2267 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;",24,-12.,12.,1,0.,1.);
2268 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;",24,-12.,12.,1,0.,1.);
2269 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;",24,-12.,12.,1,0.,1.);
2271 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules",24,-12.,12.,7,1.,8.);
2272 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules",24,-12.,12.,7,1.,8.);
2273 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules",24,-12.,12.,7,1.,8.);
2274 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules",24,-12.,12.,7,1.,8.);
2294 string currDir = bei->
pwd();
2295 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
2299 if(isbarrel && dname.find(
"Ladder_")!=string::npos){
2300 vector<string> meVec = bei->
getMEs();
2301 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2302 string full_path = currDir +
"/" + (*it);
2303 if(full_path.find(
"missing_")!=string::npos){
2308 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2309 me = bei->
get(new_path);
2313 float hitEfficiency = -1.;
2314 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2316 int binx = 0;
int biny = 0;
2317 if(currDir.find(
"Shell_m")!=string::npos){ binx = 1;}
else{ binx = 2;}
2318 if(dname.find(
"01")!=string::npos){ biny = 1;}
else if(dname.find(
"02")!=string::npos){ biny = 2;}
2319 else if(dname.find(
"03")!=string::npos){ biny = 3;}
else if(dname.find(
"04")!=string::npos){ biny = 4;}
2320 else if(dname.find(
"05")!=string::npos){ biny = 5;}
else if(dname.find(
"06")!=string::npos){ biny = 6;}
2321 else if(dname.find(
"07")!=string::npos){ biny = 7;}
else if(dname.find(
"08")!=string::npos){ biny = 8;}
2322 else if(dname.find(
"09")!=string::npos){ biny = 9;}
else if(dname.find(
"10")!=string::npos){ biny = 10;}
2323 else if(dname.find(
"11")!=string::npos){ biny = 11;}
else if(dname.find(
"12")!=string::npos){ biny = 12;}
2324 else if(dname.find(
"13")!=string::npos){ biny = 13;}
else if(dname.find(
"14")!=string::npos){ biny = 14;}
2325 else if(dname.find(
"15")!=string::npos){ biny = 15;}
else if(dname.find(
"16")!=string::npos){ biny = 16;}
2326 else if(dname.find(
"17")!=string::npos){ biny = 17;}
else if(dname.find(
"18")!=string::npos){ biny = 18;}
2327 else if(dname.find(
"19")!=string::npos){ biny = 19;}
else if(dname.find(
"20")!=string::npos){ biny = 20;}
2328 else if(dname.find(
"21")!=string::npos){ biny = 21;}
else if(dname.find(
"22")!=string::npos){ biny = 22;}
2329 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2330 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2331 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2332 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2334 if(currDir.find(
"Layer_1")!=string::npos){
2338 }
else if(currDir.find(
"Layer_2")!=string::npos){
2341 }
else if(currDir.find(
"Layer_3")!=string::npos){
2347 }
else if(!isbarrel && dname.find(
"Blade_")!=string::npos){
2348 vector<string> meVec = bei->
getMEs();
2349 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2350 string full_path = currDir +
"/" + (*it);
2351 if(full_path.find(
"missing_")!=string::npos){
2355 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2356 me = bei->
get(new_path);
2359 float hitEfficiency = -1.;
2360 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2361 int binx = 0;
int biny = 1;
2362 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2363 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2364 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2365 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2366 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2367 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2368 if(currDir.find(
"HalfCylinder_mI")!=string::npos || currDir.find(
"HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2370 if(binx==1) binx = 12;
2371 else if(binx==2) binx = 11;
2372 else if(binx==3) binx = 10;
2373 else if(binx==4) binx = 9;
2374 else if(binx==5) binx = 8;
2375 else if(binx==6) binx = 7;
2376 else if(binx==7) binx = 6;
2377 else if(binx==8) binx = 5;
2378 else if(binx==9) binx = 4;
2379 else if(binx==10) binx = 3;
2380 else if(binx==11) binx = 2;
2381 else if(binx==12) binx = 1;
2383 if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2386 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2389 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2392 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2402 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2405 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
2412 if(dname.find(
"Module_")!=string::npos){
2413 vector<string> meVec = bei->
getMEs();
2414 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2415 string full_path = currDir +
"/" + (*it);
2416 if(full_path.find(
"missing_")!=string::npos){
2420 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2421 me = bei->
get(new_path);
2424 float hitEfficiency = -1.;
2425 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2426 int binx = 0;
int biny = 0;
2428 if(currDir.find(
"Shell_m")!=string::npos){
2429 if(currDir.find(
"Module_4")!=string::npos){ binx = 1;}
else if(currDir.find(
"Module_3")!=string::npos){ binx = 2;}
2430 if(currDir.find(
"Module_2")!=string::npos){ binx = 3;}
else if(currDir.find(
"Module_1")!=string::npos){ binx = 4;}
2431 }
else if(currDir.find(
"Shell_p")!=string::npos){
2432 if(currDir.find(
"Module_1")!=string::npos){ binx = 5;}
else if(currDir.find(
"Module_2")!=string::npos){ binx = 6;}
2433 if(currDir.find(
"Module_3")!=string::npos){ binx = 7;}
else if(currDir.find(
"Module_4")!=string::npos){ binx = 8;}
2435 if(currDir.find(
"01")!=string::npos){ biny = 1;}
else if(currDir.find(
"02")!=string::npos){ biny = 2;}
2436 else if(currDir.find(
"03")!=string::npos){ biny = 3;}
else if(currDir.find(
"04")!=string::npos){ biny = 4;}
2437 else if(currDir.find(
"05")!=string::npos){ biny = 5;}
else if(currDir.find(
"06")!=string::npos){ biny = 6;}
2438 else if(currDir.find(
"07")!=string::npos){ biny = 7;}
else if(currDir.find(
"08")!=string::npos){ biny = 8;}
2439 else if(currDir.find(
"09")!=string::npos){ biny = 9;}
else if(currDir.find(
"10")!=string::npos){ biny = 10;}
2440 else if(currDir.find(
"11")!=string::npos){ biny = 11;}
else if(currDir.find(
"12")!=string::npos){ biny = 12;}
2441 else if(currDir.find(
"13")!=string::npos){ biny = 13;}
else if(currDir.find(
"14")!=string::npos){ biny = 14;}
2442 else if(currDir.find(
"15")!=string::npos){ biny = 15;}
else if(currDir.find(
"16")!=string::npos){ biny = 16;}
2443 else if(currDir.find(
"17")!=string::npos){ biny = 17;}
else if(currDir.find(
"18")!=string::npos){ biny = 18;}
2444 else if(currDir.find(
"19")!=string::npos){ biny = 19;}
else if(currDir.find(
"20")!=string::npos){ biny = 20;}
2445 else if(currDir.find(
"21")!=string::npos){ biny = 21;}
else if(currDir.find(
"22")!=string::npos){ biny = 22;}
2446 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2447 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2448 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2449 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2452 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2453 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2454 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2455 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2456 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2457 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2458 if(currDir.find(
"HalfCylinder_mO")!=string::npos || currDir.find(
"HalfCylinder_pO")!=string::npos){ binx = binx + 12;}
2459 if(currDir.find(
"Panel_1/Module_1")!=string::npos){ biny = 1;}
else if(currDir.find(
"Panel_2/Module_1")!=string::npos){ biny = 2;}
2460 else if(currDir.find(
"Panel_1/Module_2")!=string::npos){ biny = 3;}
else if(currDir.find(
"Panel_2/Module_2")!=string::npos){ biny = 4;}
2461 else if(currDir.find(
"Panel_1/Module_3")!=string::npos){ biny = 5;}
else if(currDir.find(
"Panel_2/Module_3")!=string::npos){ biny = 6;}
2462 else if(currDir.find(
"Panel_1/Module_4")!=string::npos){ biny = 7;}
2465 if(currDir.find(
"Layer_1")!=string::npos){
2468 }
else if(currDir.find(
"Layer_2")!=string::npos){
2471 }
else if(currDir.find(
"Layer_3")!=string::npos){
2474 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2477 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2480 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2483 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2492 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2495 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
void dumpRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
const std::string & getName(void) const
get name of ME
void setBinContent(int binx, double content)
set content of bin (1-D)
void createEfficiency(DQMStore *bei)
bool init()
Write XML file.
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
std::vector< std::string > getSubdirs(void) const
TH1 * getRefTH1(void) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void fillOccupancy(DQMStore *bei, bool isbarrel)
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
void cd(void)
go to top directory (ie. root)
void createTkMap(DQMStore *bei, std::string mEName, std::string theTKType)
static int getMEList(std::string name, std::vector< std::string > &values)
void createColumn(std::string &element, std::string &name)
MonitorElement * DEV_size_Barrel
MonitorElement * HitEfficiency_L3
void createMaps(DQMStore *bei, std::string type, std::string name, funcType ff)
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 bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
SiPixelConfigParser * configParser_
void runQTests(void)
run all quality tests
MonitorElement * DEV_nclusters_Barrel
void fillEfficiency(DQMStore *bei, bool isbarrel)
bool getMENamesForEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
MonitorElement * HitEfficiency_Dm2
double getEntries(void) const
get # of entries
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)
void attachTests(DQMStore *bei, bool verboseQT=true)
Attaches the quality tests to the MonitorElement.
void dumpBarrelModIds(DQMStore *bei, edm::EventSetup const &eSetup)
void bookTrackerMaps(DQMStore *bei, std::string name)
bool getCalibType(int &u_freq)
void fillLayout(DQMStore *bei)
int getNbinsY(void) const
get # of bins in Y-axis
void setupQTests(DQMStore *bei)
std::vector< QReport * > getQErrors(void) const
get errors from last set of quality tests
MonitorElement * OccupancyMap
bool getMENamesForGrandEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
void bookDeviations(DQMStore *bei)
MonitorElement * getSummaryME(DQMStore *bei, std::string me_name)
SiPixelConfigWriter * configWriter_
void prephistosE(MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max)
bool getFrequencyForGrandBarrelSummary(int &u_freq)
std::vector< std::string > tkMapMENames
bool hasWarning(void) const
true if at least of one of the quality tests returned a warning
void createOccupancy(DQMStore *bei)
bool getFrequencyForEndcapSummary(int &u_freq)
bool getMENamesForFEDErrorSummary(std::string &structure_name, std::vector< std::string > &me_names)
const T & max(const T &a, const T &b)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
void create(DQMStore *bei)
(Documentation under construction).
MonitorElement * DEV_adc_Endcap
void fillDeviations(DQMStore *bei)
bool getMENamesForGrandBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
bool getFrequencyForBarrelSummary(int &u_freq)
bool getFrequencyForGrandEndcapSummary(int &u_freq)
void fillSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel)
void createLayout(DQMStore *bei)
MonitorElement * DEV_charge_Endcap
Double_t mapMin(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
bool getMENamesForBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::vector< MonitorElement * > getContents(const std::string &path) const
int getTkMapMENames(std::vector< std::string > &names)
void dumpEndcapModIds(DQMStore *bei, edm::EventSetup const &eSetup)
int createMap(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, bool isBarrel)
SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag)
MonitorElement * DEV_charge_Barrel
void bookEfficiency(DQMStore *bei)
void dumpEndcapRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void getData(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, Int_t i, Int_t j, Int_t k, Int_t l)
void GetBladeSubdirs(DQMStore *bei, std::vector< std::string > &blade_subdirs)
bool getMessageLimitForQTests(int &u_freq)
MonitorElement * HitEfficiency_L1
int64_t getIntValue(void) const
T const * product() const
TH1F * getTH1F(void) const
MonitorElement * DEV_nclusters_Endcap
MonitorElement * HitEfficiency_Dp1
Double_t mapMax(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
bool getSourceType(int &u_freq)
void fillGrandEndcapSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names)
MonitorElement * DEV_size_Endcap
void fillGrandBarrelSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names)
double getBinContent(int binx) const
get content of bin (1-D)
bool configureTests(const std::string &configFile, DQMStore *bei, bool UseDB=false)
Parses Config File and configures the quality tests.
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
int getNbinsX(void) const
get # of bins in X-axis
void goUp(void)
equivalent to "cd .."
void createLayout(std::string &name)
void prephistosB(MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max)
MonitorElement * getFEDSummaryME(DQMStore *bei, std::string me_name)
MonitorElement * HitEfficiency_Dp2
bool getFrequencyForTrackerMap(int &u_freq)
std::string fullPath() const
void getGrandSummaryME(DQMStore *bei, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
TH2F * getTH2F(void) const
MonitorElement * DEV_ndigis_Endcap
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * HitEfficiency_Dm1
void checkQTestResults(DQMStore *bei)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
static const HistoName names[]
MonitorElement * DEV_ndigis_Barrel
void setCurrentFolder(const std::string &fullpath)
MonitorElement * DEV_adc_Barrel
void createSummary(DQMStore *bei)
void dumpModIds(DQMStore *bei, edm::EventSetup const &eSetup)
void fillFEDErrorSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
const std::string & pwd(void) const