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;
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++) {
752 bool isBooked =
false;
754 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
755 if ((*im).find(*iv) != string::npos) isBooked =
true;
757 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
758 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
759 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
760 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap"||
761 (*iv)==
"FedChLErrArray"||(*iv)==
"FedChNErrArray"||(*iv)==
"FedETypeNErrArray")
764 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
765 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
766 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
767 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap"){
768 string tag = prefix +
"_" + (*iv) +
"_FEDErrors";
770 sum_mes.push_back(temp);
771 }
else if((*iv)==
"FedChLErrArray"||(*iv)==
"FedChNErrArray"||(*iv)==
"FedETypeNErrArray"){
772 string tag = prefix +
"_" + (*iv);
774 if((*iv)==
"FedChLErrArray") {
if (!isBooked) temp = bei->
book2D(
"FedChLErrArray",
"Type of last error",40,-0.5,39.5,37,0.,37.);
776 string fullpathname = bei->
pwd() +
"/" + (*iv);
777 temp = bei->
get(fullpathname);
779 if((*iv)==
"FedChNErrArray") {
if (!isBooked) temp = bei->
book2D(
"FedChNErrArray",
"Total number of errors",40,-0.5,39.5,37,0.,37.);
781 string fullpathname = bei->
pwd() +
"/" + (*iv);
782 temp = bei->
get(fullpathname);
784 if((*iv)==
"FedETypeNErrArray"){
786 temp = bei->
book2D(
"FedETypeNErrArray",
"Number of each error type",40,-0.5,39.5,21,0.,21.);
810 string fullpathname = bei->
pwd() +
"/" + (*iv);
811 temp = bei->
get(fullpathname);
814 sum_mes.push_back(temp);
817 if (sum_mes.size() == 0) {
818 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" <<
"\n" ;
823 for (vector<string>::const_iterator it = subdirs.begin();
824 it != subdirs.end(); it++) {
825 if ( (*it).find(
"FED_") == string::npos)
continue;
827 string fedid = (*it).substr((*it).find(
"_")+1);
828 std::istringstream isst;
833 for (vector<MonitorElement*>::const_iterator
isum = sum_mes.begin();
835 for (vector<string>::const_iterator im = contents.begin();
836 im != contents.end(); im++) {
837 if(((*im).find(
"FedChNErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedChNErrArray")!=std::string::npos) ||
838 ((*im).find(
"FedChLErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedChLErrArray")!=std::string::npos) ||
839 ((*im).find(
"FedETypeNErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedETypeNErrArray")!=std::string::npos)){
840 string fullpathname = bei->
pwd() +
"/" + (*im);
843 for(
int i=0;
i!=37;
i++){
844 int n = (*im).find(
"_"); n++;
845 string channel_str = (*im).substr(n);
846 std::istringstream jsst;
847 jsst.str(channel_str);
851 if((*im).find(
"FedETypeNErrArray_")!=std::string::npos &&
i<21) (*isum)->Fill(ndet-1,
i,me->
getIntValue());
857 string sname = ((*isum)->getName());
859 tname = sname.substr(7,(sname.find(
"_",7)-6));
860 if (((*im)).
find(tname) == 0) {
861 string fullpathname = bei->
pwd() +
"/" + (*im);
866 if (sname.find(
"_NErrors_")!=string::npos){
867 string path1 = fullpathname;
868 path1 = path1.replace(path1.find(
"NErrors"),7,
"errorType");
872 for(
int jj=1;
jj<16;
jj++){
875 string path2 = path1;
876 path2 = path2.replace(path2.find(
"errorType"),9,
"TBMMessage");
884 }
else (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->
getEntries());
886 (*isum)->setAxisTitle(
"FED #",1);
888 title = sname.substr(7,(sname.find(
"_",7)-7)) +
" per FED";
889 (*isum)->setAxisTitle(title,2);
899 for (vector<string>::const_iterator it = subdirs.begin();
900 it != subdirs.end(); it++) {
901 if((*it).find(
"Endcap")!=string::npos ||
902 (*it).find(
"Barrel")!=string::npos)
continue;
914 vector<string>& me_names) {
916 vector<MonitorElement*> gsum_mes;
917 string currDir = bei->
pwd();
919 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
921 if ((dir_name.find(
"DQMData") == 0) ||
922 (dir_name.find(
"Pixel") == 0) ||
923 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
924 (dir_name.find(
"Endcap") == 0) ||
925 (dir_name.find(
"HalfCylinder") == 0) ||
926 (dir_name.find(
"Disk") == 0) ||
927 (dir_name.find(
"Blade") == 0) ||
928 (dir_name.find(
"Panel") == 0) )
return;
930 int nDirs = subdirs.size();
936 bool first_subdir =
true;
937 for (vector<string>::const_iterator it = subdirs.begin();
938 it != subdirs.end(); it++) {
956 for (vector<string>::const_iterator im = contents.begin();
957 im != contents.end(); im++) {
959 for (vector<string>::const_iterator iv = me_names.begin();
960 iv != me_names.end(); iv++) {
961 string var =
"_" + (*iv) +
"_";
963 if ((*im).find(var) != string::npos) {
964 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
965 (*im).find(
"Track_")!=string::npos)
continue;
967 string full_path = (*it) +
"/" +(*im);
971 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
972 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
973 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
974 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
976 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
977 (*iv)==
"ndigisFREQ" || (*iv)==
"adcCOMB")
979 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
980 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
981 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
983 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
984 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
985 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
987 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
989 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
990 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
991 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
992 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
993 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
994 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
995 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
996 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
997 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
998 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
999 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
1000 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
1001 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
1002 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
1003 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
1004 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix" ||
1005 (*iv)==
"SiPixelErrorsCalibDigis_NCalibErrors" )
1017 nbin = me->
getTH1F()->GetNbinsX();
1018 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1019 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1020 else if(prefix==
"SUMOFF" && dir_name==
"Barrel") nbin=192;
1021 else if((*iv)==
"adcCOMB") nbin=256;
1022 else if(dir_name==
"Barrel") nbin=768;
1023 else if(prefix==
"SUMOFF" && dir_name.find(
"Shell")!=string::npos) nbin=48;
1024 else if(dir_name.find(
"Shell")!=string::npos) nbin=192;
1025 else nbin=nbin*nDirs;
1043 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1044 igm != gsum_mes.end(); igm++) {
1046 if ((*igm)->getName().find(var) != string::npos) {
1048 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Ladders",1);
1049 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1050 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1051 else (*igm)->setAxisTitle(
"Modules",1);
1056 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Ladder";
1057 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1058 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Ladder";
1059 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix!=
"SUMOFF") title =
"NEvents with digis per Module";
1060 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix==
"SUMOFF") title =
"NEvents with digis per Ladder/Blade";
1061 else if((*igm)->getName().find(
"adcCOMB_") != string::npos) title =
"NDigis";
1062 else if((*igm)->getName().find(
"chargeCOMB_") != string::npos) title =
"NClusters";
1063 else title =
"mean " + (*iv) +
" per Module";
1064 (*igm)->setAxisTitle(title,2);
1068 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1070 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1072 }
else if((*igm)->getName().find(
"Ladder") != string::npos){
1073 nbin_i=0; nbin_subdir=4;
1074 }
else if((*igm)->getName().find(
"Layer") != string::npos){
1075 nbin_i=(cnt-1)*4; nbin_subdir=4;
1076 }
else if((*igm)->getName().find(
"Shell") != string::npos){
1077 if(prefix!=
"SUMOFF"){
1078 if(iDir==0){ nbin_i=0; nbin_subdir=40; }
1079 else if(iDir==1){ nbin_i=40; nbin_subdir=64; }
1080 else if(iDir==2){ nbin_i=104; nbin_subdir=88; }
1082 if(iDir==0){ nbin_i=0; nbin_subdir=10; }
1083 else if(iDir==1){ nbin_i=10; nbin_subdir=16; }
1084 else if(iDir==2){ nbin_i=26; nbin_subdir=22; }
1086 }
else if((*igm)->getName().find(
"Barrel") != string::npos){
1087 if(prefix!=
"SUMOFF"){
1088 if(iDir==0){ nbin_i=0; nbin_subdir=192; }
1089 else if(iDir==1){ nbin_i=192; nbin_subdir=192; }
1090 else if(iDir==2){ nbin_i=384; nbin_subdir=192; }
1091 else if(iDir==3){ nbin_i=576; nbin_subdir=192; }
1093 if(iDir==0){ nbin_i=0; nbin_subdir=48; }
1094 else if(iDir==1){ nbin_i=48; nbin_subdir=48; }
1095 else if(iDir==2){ nbin_i=96; nbin_subdir=48; }
1096 else if(iDir==3){ nbin_i=144; nbin_subdir=48; }
1101 if((*igm)->getName().find(
"ndigisFREQ")==string::npos)
1103 if(((*igm)->getName().find(
"adcCOMB")!=string::npos && me->
getName().find(
"adcCOMB")!=string::npos)
1104 || ((*igm)->getName().find(
"chargeCOMB")!=string::npos && me->
getName().find(
"chargeCOMB")!=string::npos))
1106 (*igm)->getTH1F()->Add(me->
getTH1F());
1107 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1108 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1109 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1110 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1111 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1112 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1113 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1114 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1115 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1116 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1117 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1118 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1119 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1120 (*igm)->getName().find(
"size_")==string::npos)){
1124 else if(me->
getName().find(
"ndigisFREQ")!=string::npos)
1134 first_subdir =
false;
1141 vector<string>& me_names) {
1143 vector<MonitorElement*> gsum_mes;
1144 string currDir = bei->
pwd();
1146 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
1147 if ((dir_name.find(
"DQMData") == 0) ||
1148 (dir_name.find(
"Pixel") == 0) ||
1149 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
1150 (dir_name.find(
"Barrel") == 0) ||
1151 (dir_name.find(
"Shell") == 0) ||
1152 (dir_name.find(
"Layer") == 0) ||
1153 (dir_name.find(
"Ladder") == 0) )
return;
1158 int nbin_subdir = 0;
1160 bool first_subdir =
true;
1161 for (vector<string>::const_iterator it = subdirs.begin();
1162 it != subdirs.end(); it++) {
1177 for (vector<string>::const_iterator im = contents.begin();
1178 im != contents.end(); im++) {
1179 for (vector<string>::const_iterator iv = me_names.begin();
1180 iv != me_names.end(); iv++) {
1181 string var =
"_" + (*iv) +
"_";
1182 if ((*im).find(var) != string::npos) {
1183 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
1184 (*im).find(
"Track_")!=string::npos)
continue;
1185 string full_path = (*it) +
"/" +(*im);
1189 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
1190 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
1191 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
1192 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
1194 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
1195 (*iv)==
"ndigisFREQ"||(*iv)==
"adcCOMB")
1197 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
1198 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
1199 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
1201 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
1202 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
1203 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
1205 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
1207 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
1208 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
1209 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
1210 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
1211 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
1212 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
1213 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
1214 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
1215 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
1216 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
1217 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
1218 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
1219 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
1220 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
1221 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
1222 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix"||
1223 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
1234 nbin = me->
getTH1F()->GetNbinsX();
1235 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1236 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1237 else if(prefix==
"SUMOFF" && dir_name==
"Endcap") nbin=96;
1238 else if(dir_name==
"Endcap") nbin=672;
1239 else if(prefix==
"SUMOFF" && dir_name.find(
"HalfCylinder")!=string::npos) nbin=24;
1240 else if(dir_name.find(
"HalfCylinder")!=string::npos) nbin=168;
1241 else if(prefix==
"SUMOFF" && dir_name.find(
"Disk")!=string::npos) nbin=12;
1242 else if(dir_name.find(
"Disk")!=string::npos) nbin=84;
1243 else if(dir_name.find(
"Blade")!=string::npos) nbin=7;
1263 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1264 igm != gsum_mes.end(); igm++) {
1265 if ((*igm)->getName().find(var) != string::npos) {
1266 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Blades",1);
1267 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1268 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1269 else (*igm)->setAxisTitle(
"Modules",1);
1271 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Blade";
1272 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1273 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Blade";
1274 else if((*igm)->getName().find(
"FREQ_") != string::npos) title =
"NEvents with digis per Module";
1275 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) title =
"NDigis";
1276 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) title =
"NClusters";
1277 else title =
"mean " + (*iv) +
" per Module";
1278 (*igm)->setAxisTitle(title,2);
1280 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1282 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1284 }
else if((*igm)->getName().find(
"Panel_") != string::npos){
1290 }
else if((*igm)->getName().find(
"Blade") != string::npos){
1291 if((*im).find(
"_1") != string::npos) nbin_subdir=4;
1292 if((*im).find(
"_2") != string::npos) {nbin_i=4; nbin_subdir=3;}
1293 }
else if((*igm)->getName().find(
"Disk") != string::npos){
1294 nbin_i=((cnt-1)%12)*7; nbin_subdir=7;
1295 }
else if((*igm)->getName().find(
"HalfCylinder") != string::npos){
1296 if(prefix!=
"SUMOFF"){
1298 if((*im).find(
"_2") != string::npos) nbin_i=84;
1301 if((*im).find(
"_2") != string::npos) nbin_i=12;
1303 }
else if((*igm)->getName().find(
"Endcap") != string::npos){
1304 if(prefix!=
"SUMOFF"){
1306 if((*im).find(
"_mO") != string::npos) nbin_i=168;
1307 if((*im).find(
"_pI") != string::npos) nbin_i=336;
1308 if((*im).find(
"_pO") != string::npos) nbin_i=504;
1311 if((*im).find(
"_mO") != string::npos) nbin_i=24;
1312 if((*im).find(
"_pI") != string::npos) nbin_i=48;
1313 if((*im).find(
"_pO") != string::npos) nbin_i=72;
1318 if((*igm)->getName().find(
"ndigisFREQ")==string::npos){
1319 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)){
1320 (*igm)->getTH1F()->Add(me->
getTH1F());
1321 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1322 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1323 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1324 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1325 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1326 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1327 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1328 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1329 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1330 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1331 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1332 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1333 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1334 (*igm)->getName().find(
"size_")==string::npos)){
1337 }
else if(me->
getName().find(
"ndigisFREQ")!=string::npos){
1349 first_subdir =
false;
1359 vector<MonitorElement*> & mes) {
1361 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return;
1364 for (vector<string>::const_iterator it = contents.begin();
1365 it != contents.end(); it++) {
1367 if ((*it).find(me_name) == 0) {
1368 string fullpathname = bei->
pwd() +
"/" + me_name;
1385 if(me_name.find(
"ALLMODS_adcCOMB_")!=string::npos) temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),128,0,256);
1386 else if(me_name.find(
"ALLMODS_chargeCOMB_")!=string::npos) temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),100,0,200);
1387 else temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1388 if (temp_me) mes.push_back(temp_me);
1402 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return me;
1405 for (vector<string>::const_iterator it = contents.begin();
1406 it != contents.end(); it++) {
1407 if ((*it).find(me_name) == 0) {
1408 string fullpathname = bei->
pwd() +
"/" + (*it);
1409 me = bei->
get(fullpathname);
1427 if(me_name.find(
"SUMOFF")==string::npos){
1428 if(me_name.find(
"Blade_")!=string::npos)me = bei->
book1D(me_name.c_str(), me_name.c_str(),7,1.,8.);
1429 else me = bei->
book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1432 }
else if(me_name.find(
"Layer_1")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),10,1.,11.);
1433 }
else if(me_name.find(
"Layer_2")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),16,1.,17.);
1434 }
else if(me_name.find(
"Layer_3")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1435 }
else if(me_name.find(
"Disk_")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),12,1.,13.);
1451 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return me;
1454 for (vector<string>::const_iterator it = contents.begin();
1455 it != contents.end(); it++) {
1456 if ((*it).find(me_name) == 0) {
1457 string fullpathname = bei->
pwd() +
"/" + (*it);
1459 me = bei->
get(fullpathname);
1469 me = bei->
book1D(me_name.c_str(), me_name.c_str(),40,-0.5,39.5);
1480 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1482 if(isbarrel && (*it).find(
"Barrel")==string::npos)
continue;
1483 if(!isbarrel && (*it).find(
"Endcap")==string::npos)
continue;
1485 if((*it).find(
"Module_")!=string::npos)
continue;
1486 if((*it).find(
"Panel_")!=string::npos)
continue;
1487 if((*it).find(
"Ladder_")!=string::npos)
continue;
1488 if((*it).find(
"Blade_")!=string::npos)
continue;
1489 if((*it).find(
"Layer_")!=string::npos)
continue;
1490 if((*it).find(
"Disk_")!=string::npos)
continue;
1495 OccupancyMap = bei->
book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
1498 OccupancyMap = bei->
book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
1543 string currDir = bei->
pwd();
1544 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
1547 if(dname.find(
"Layer_")!=string::npos || dname.find(
"Disk_")!=string::npos){
1548 vector<string> meVec = bei->
getMEs();
1549 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1550 string full_path = currDir +
"/" + (*it);
1551 if(full_path.find(
"hitmap_siPixelDigis")!=string::npos){
1555 string path = full_path;
1556 while (path.find_last_of(
"/") != 5)
1558 path = path.substr(0,path.find_last_of(
"/"));
1560 OccupancyMap = bei->
get(path +
"/" + (isbarrel?
"barrel":
"endcap") +
"OccupancyMap");
1578 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1581 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
1600 std::string partB[] = {
"Layer_1",
"Layer_2",
"Layer_3"};
1601 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[0],
"TRKMAP_" + name +
"_" + partB[0], 20, 1., 21., 8, 1., 9.);
1602 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[1],
"TRKMAP_" + name +
"_" + partB[1], 32, 1., 33., 8, 1., 9.);
1603 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[2],
"TRKMAP_" + name +
"_" + partB[2], 44, 1., 45., 8, 1., 9.);
1606 std::string partE[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1607 for(Int_t
p = 0 ;
p <
NCyl ;
p++)
1608 bei->
book2D(
"TRKMAP_" + name +
"_" + partE[
p],
"TRKMAP_" + name +
"_" + partE[p], 24, 1., 25., 7, 1., 8.);
1619 Double_t minB =
mapMin(mapB,
true);
1620 Double_t maxB =
mapMax(mapB,
true);
1626 Double_t minE =
mapMin(mapE,
false);
1627 Double_t maxE =
mapMax(mapE,
false);
1629 Double_t
min = minE<=minB?minE:minB;
1630 Double_t
max = maxE>=maxB?maxE:maxB;
1658 for (vector<string>::const_iterator it = dirLev1.begin(); it != dirLev1.end(); it++)
1664 for (vector<string>::const_iterator it2 = dirLev2.begin(); it2 != dirLev2.end(); it2++)
1670 for (vector<string>::const_iterator it3 = dirLev3.begin(); it3 != dirLev3.end(); it3++)
1681 for (vector<string>::const_iterator it4 = dirLev4.begin(); it4 != dirLev4.end(); it4++)
1690 for (vector<string>::const_iterator it5 = dirLev5.begin(); it5 != dirLev5.end(); it5++)
1716 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
1718 if((*im).find(type +
"_") == string::npos){
1723 std::string fullpathname = bei->
pwd() +
"/" + (*im);
1729 Int_t
nbins = histo->GetNbinsX();
1733 map[
i][
j][
k][
l] = histo->GetBinContent(l + 1);
1737 map[
i][
j][
k][
l] = histo->GetEntries();
1741 map[
i][
j][
k][
l] = histo->GetMean();
1748 sum += histo->GetBinContent(
m + 1);
1757 sum += histo->GetBinContent(
m + 1) * histo->GetBinLowEdge(
m + 1);
1773 std::string
part[] = {
"Layer_1",
"Layer_2",
"Layer_3"};
1774 std::string
path = bei->
pwd();
1777 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1782 cout <<
"Problem: " << fullpath << endl;
1786 for(Int_t
b = 0 ;
b < (10 + 6 *
p);
b++)
1788 me[
p]->getTH2F()->SetBinContent(
b + 1,
i + 1,
map[0][
p][
b][
i]);
1789 me[
p]->getTH2F()->SetBinContent(
b + 1, i + 1 + NModuleB,
map[1][
p][
b][i]);
1790 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1,
map[2][
p][
b][i]);
1791 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1 + NModuleB,
map[3][
p][
b][i]);
1793 me[
p]->getTH2F()->SetMinimum(min);
1794 me[
p]->getTH2F()->SetMaximum(max);
1803 std::string
part[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1804 std::string
path = bei->
pwd();
1805 for (Int_t
i = 0;
i <
NCyl;
i++)
1807 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1812 me[
i]->getTH2F()->SetMinimum(min);
1813 me[
i]->getTH2F()->SetMaximum(max);
1816 cout <<
"Problem: " << fullpath << endl;
1819 for(Int_t
c = 0 ;
c <
NCyl ;
c += 2)
1820 for(Int_t d = 0 ; d <
NDisk ; d++)
1822 me[
c + d]->getTH2F()->SetBinContent(
b + 1, 1,
map[
c][d][
b][0]);
1823 me[
c + d]->getTH2F()->SetBinContent(b + 1, 2,
map[
c][d][b][4]);
1824 me[
c + d]->getTH2F()->SetBinContent(b + 1, 3,
map[
c][d][b][1]);
1825 me[
c + d]->getTH2F()->SetBinContent(b + 1, 4,
map[
c][d][b][5]);
1826 me[
c + d]->getTH2F()->SetBinContent(b + 1, 5,
map[
c][d][b][2]);
1827 me[
c + d]->getTH2F()->SetBinContent(b + 1, 6,
map[
c][d][b][6]);
1828 me[
c + d]->getTH2F()->SetBinContent(b + 1, 7,
map[
c][d][b][3]);
1830 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 1,
map[
c + 1][d][b][0]);
1831 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 2,
map[
c + 1][d][b][4]);
1832 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 3,
map[
c + 1][d][b][1]);
1833 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 4,
map[
c + 1][d][b][5]);
1834 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 5,
map[
c + 1][d][b][2]);
1835 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 6,
map[
c + 1][d][b][6]);
1836 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 7,
map[
c + 1][d][b][3]);
1845 Double_t
min =
map[0][0][0][0];
1848 for(Int_t d = 0 ; d < (isBarrel?3:2) ; d++)
1849 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12) ;
b++)
1850 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++){
1851 if(
map[
p][d][
b][
i] < min)
1862 Double_t
max =
map[0][0][0][0];
1865 for(Int_t d = 0 ; d < (isBarrel?3:2); d++)
1866 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12);
b++)
1867 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++)
1868 if(
map[
p][d][
b][
i] > max)
1887 if(
offlineXMLfile_) localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_qualitytest.xml");
1888 else localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
1896 cout <<
" Problem setting up quality tests "<<endl;
1908 int messageCounter=0;
1909 string currDir = bei->
pwd();
1910 vector<string> contentVec;
1915 for (vector<string>::iterator it = contentVec.begin();
1916 it != contentVec.end(); it++) {
1919 if (nval == 0)
continue;
1920 for (vector<string>::const_iterator im = contents.begin();
1921 im != contents.end(); im++) {
1928 for(vector<QReport *>::const_iterator wi = warnings.begin();
1929 wi != warnings.end(); ++wi) {
1936 edm::LogWarning(
"SiPixelActionExecutor::checkQTestResults") <<
" *** Warning for " << me->
getName() <<
","
1937 << (*wi)->getMessage() <<
" " << me->
getMean()
1942 warnings=vector<QReport*>();
1945 for(vector<QReport *>::const_iterator ei = errors.begin();
1946 ei != errors.end(); ++ei) {
1948 float empty_mean = me->
getMean();
1949 float empty_rms = me->
getRMS();
1950 if((empty_mean != 0 && empty_rms != 0) || (
calib_type_ == 0)){
1958 << (*ei)->getMessage() <<
" " << me->
getMean()
1964 errors=vector<QReport*>();
1968 nval=int(); contents=vector<string>();
1970 LogDebug(
"SiPixelActionExecutor::checkQTestResults") <<
"messageCounter: "<<messageCounter<<
" , message_limit: "<<
message_limit_<<endl;
1973 contentVec=vector<string>(); currDir=string(); messageCounter=int();
1983 string currDir = bei->
pwd();
1984 if (currDir.find(
"Layer") != string::npos) {
1985 string name =
"Default";
1991 for (vector<string>::const_iterator it = subdirs.begin();
1992 it != subdirs.end(); it++) {
2003 static int icount = 0;
2004 string currDir = bei->
pwd();
2005 if (currDir.find(
"Ladder_") != string::npos) {
2009 for (vector<string>::const_iterator im = contents.begin();
2010 im != contents.end(); im++) {
2011 if ((*im).find(
"Clusters") != string::npos) {
2013 if (icount != 0 && icount%6 == 0) {
2016 ostringstream full_path;
2017 full_path <<
"test/" << currDir <<
"/" << *im ;
2018 string element =
"monitorable";
2019 string element_name = full_path.str();
2025 for (vector<string>::const_iterator it = subdirs.begin();
2026 it != subdirs.end(); it++) {
2040 for (vector<string>::iterator it =
tkMapMENames.begin();
2042 names.push_back(*it) ;
2044 return names.size();
2062 string currDir = bei->
pwd();
2065 int fedId=-1;
int linkId=-1;
2066 if (currDir.find(dir_name) != string::npos) {
2068 for (vector<string>::const_iterator it = subdirs.begin();
2069 it != subdirs.end(); it++) {
2070 if ( (*it).find(
"Module_") == string::npos)
continue;
2078 bool first_me =
false;
2080 for (vector<string>::const_iterator im = contents.begin();
2081 im != contents.end(); im++) {
2083 string mEName = (*im);
2084 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2085 std::istringstream isst;
2086 isst.str(detIdString);
2087 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2094 for(
int fedid=0; fedid<=40; ++fedid){
2096 uint32_t newDetId = detId;
2097 if(converter.hasDetUnit(newDetId)){
2102 if(fedId==-1)
continue;
2107 formatter.toCabling(cabling,detector);
2108 linkId = cabling.
link;
2112 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2116 for (vector<string>::const_iterator it = subdirs.begin();
2117 it != subdirs.end(); it++) {
2118 if((*it).find(
"Endcap")!=string::npos)
continue;
2128 string currDir = bei->
pwd();
2129 string dir_name =
"Panel_";
2131 int fedId=-1;
int linkId=-1;
2132 if (currDir.find(dir_name) != string::npos) {
2134 for (vector<string>::const_iterator it = subdirs.begin();
2135 it != subdirs.end(); it++) {
2136 if ( (*it).find(
"Module_") == string::npos)
continue;
2144 bool first_me =
false;
2146 for (vector<string>::const_iterator im = contents.begin();
2147 im != contents.end(); im++) {
2149 string mEName = (*im);
2150 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2151 std::istringstream isst;
2152 isst.str(detIdString);
2153 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2160 for(
int fedid=0; fedid<=40; ++fedid){
2162 uint32_t newDetId = detId;
2163 if(converter.hasDetUnit(newDetId)){
2168 if(fedId==-1)
continue;
2173 formatter.toCabling(cabling,detector);
2174 linkId = cabling.
link;
2178 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2182 for (vector<string>::const_iterator it = subdirs.begin();
2183 it != subdirs.end(); it++) {
2184 if((bei->
pwd()).
find(
"Barrel")!=string::npos) bei->
goUp();
2186 if((*it).find(
"Barrel")!=string::npos)
continue;
2210 me = bei->
get(
"Pixel/Barrel/SUMDIG_adc_Barrel");
2212 std::cout<<
"SUMDIG_adc_Barrel: "<<std::endl;
2215 me = bei->
get(
"Pixel/Barrel/SUMDIG_ndigis_Barrel");
2217 std::cout<<
"SUMDIG_ndigis_Barrel: "<<std::endl;
2220 me = bei->
get(
"Pixel/Barrel/SUMCLU_charge_Barrel");
2222 std::cout<<
"SUMCLU_charge_Barrel: "<<std::endl;
2225 me = bei->
get(
"Pixel/Barrel/SUMCLU_nclusters_Barrel");
2227 std::cout<<
"SUMCLU_nclusters_Barrel: "<<std::endl;
2230 me = bei->
get(
"Pixel/Barrel/SUMCLU_size_Barrel");
2232 std::cout<<
"SUMCLU_size_Barrel: "<<std::endl;
2240 me = bei->
get(
"Pixel/Endcap/SUMDIG_adc_Endcap");
2242 std::cout<<
"SUMDIG_adc_Endcap: "<<std::endl;
2245 me = bei->
get(
"Pixel/Endcap/SUMDIG_ndigis_Endcap");
2247 std::cout<<
"SUMDIG_ndigis_Endcap: "<<std::endl;
2250 me = bei->
get(
"Pixel/Endcap/SUMCLU_charge_Endcap");
2252 std::cout<<
"SUMCLU_charge_Endcap: "<<std::endl;
2255 me = bei->
get(
"Pixel/Endcap/SUMCLU_nclusters_Endcap");
2257 std::cout<<
"SUMCLU_nclusters_Endcap: "<<std::endl;
2260 me = bei->
get(
"Pixel/Endcap/SUMCLU_size_Endcap");
2262 std::cout<<
"SUMCLU_size_Endcap: "<<std::endl;
2274 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;z-side;Ladder",2,-1.,1.,20,-10.,10.);
2275 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;z-side;Ladder",2,-1.,1.,32,-16.,16.);
2276 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;z-side;Ladder",2,-1.,1.,44,-22.,22.);
2278 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,20,-10.,10.);
2279 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,32,-16.,16.);
2280 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2286 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;",24,-12.,12.,1,0.,1.);
2287 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;",24,-12.,12.,1,0.,1.);
2288 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;",24,-12.,12.,1,0.,1.);
2289 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;",24,-12.,12.,1,0.,1.);
2291 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules",24,-12.,12.,7,1.,8.);
2292 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules",24,-12.,12.,7,1.,8.);
2293 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules",24,-12.,12.,7,1.,8.);
2294 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules",24,-12.,12.,7,1.,8.);
2314 string currDir = bei->
pwd();
2315 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
2319 if(isbarrel && dname.find(
"Ladder_")!=string::npos){
2320 vector<string> meVec = bei->
getMEs();
2321 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2322 string full_path = currDir +
"/" + (*it);
2323 if(full_path.find(
"missing_")!=string::npos){
2328 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2329 me = bei->
get(new_path);
2333 float hitEfficiency = -1.;
2334 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2336 int binx = 0;
int biny = 0;
2337 if(currDir.find(
"Shell_m")!=string::npos){ binx = 1;}
else{ binx = 2;}
2338 if(dname.find(
"01")!=string::npos){ biny = 1;}
else if(dname.find(
"02")!=string::npos){ biny = 2;}
2339 else if(dname.find(
"03")!=string::npos){ biny = 3;}
else if(dname.find(
"04")!=string::npos){ biny = 4;}
2340 else if(dname.find(
"05")!=string::npos){ biny = 5;}
else if(dname.find(
"06")!=string::npos){ biny = 6;}
2341 else if(dname.find(
"07")!=string::npos){ biny = 7;}
else if(dname.find(
"08")!=string::npos){ biny = 8;}
2342 else if(dname.find(
"09")!=string::npos){ biny = 9;}
else if(dname.find(
"10")!=string::npos){ biny = 10;}
2343 else if(dname.find(
"11")!=string::npos){ biny = 11;}
else if(dname.find(
"12")!=string::npos){ biny = 12;}
2344 else if(dname.find(
"13")!=string::npos){ biny = 13;}
else if(dname.find(
"14")!=string::npos){ biny = 14;}
2345 else if(dname.find(
"15")!=string::npos){ biny = 15;}
else if(dname.find(
"16")!=string::npos){ biny = 16;}
2346 else if(dname.find(
"17")!=string::npos){ biny = 17;}
else if(dname.find(
"18")!=string::npos){ biny = 18;}
2347 else if(dname.find(
"19")!=string::npos){ biny = 19;}
else if(dname.find(
"20")!=string::npos){ biny = 20;}
2348 else if(dname.find(
"21")!=string::npos){ biny = 21;}
else if(dname.find(
"22")!=string::npos){ biny = 22;}
2349 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2350 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2351 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2352 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2354 if(currDir.find(
"Layer_1")!=string::npos){
2358 }
else if(currDir.find(
"Layer_2")!=string::npos){
2361 }
else if(currDir.find(
"Layer_3")!=string::npos){
2367 }
else if(!isbarrel && dname.find(
"Blade_")!=string::npos){
2368 vector<string> meVec = bei->
getMEs();
2369 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2370 string full_path = currDir +
"/" + (*it);
2371 if(full_path.find(
"missing_")!=string::npos){
2375 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2376 me = bei->
get(new_path);
2379 float hitEfficiency = -1.;
2380 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2381 int binx = 0;
int biny = 1;
2382 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2383 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2384 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2385 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2386 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2387 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2388 if(currDir.find(
"HalfCylinder_mI")!=string::npos || currDir.find(
"HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2390 if(binx==1) binx = 12;
2391 else if(binx==2) binx = 11;
2392 else if(binx==3) binx = 10;
2393 else if(binx==4) binx = 9;
2394 else if(binx==5) binx = 8;
2395 else if(binx==6) binx = 7;
2396 else if(binx==7) binx = 6;
2397 else if(binx==8) binx = 5;
2398 else if(binx==9) binx = 4;
2399 else if(binx==10) binx = 3;
2400 else if(binx==11) binx = 2;
2401 else if(binx==12) binx = 1;
2403 if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2406 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2409 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2412 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2422 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2425 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
2432 if(dname.find(
"Module_")!=string::npos){
2433 vector<string> meVec = bei->
getMEs();
2434 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2435 string full_path = currDir +
"/" + (*it);
2436 if(full_path.find(
"missing_")!=string::npos){
2440 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2441 me = bei->
get(new_path);
2444 float hitEfficiency = -1.;
2445 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2446 int binx = 0;
int biny = 0;
2448 if(currDir.find(
"Shell_m")!=string::npos){
2449 if(currDir.find(
"Module_4")!=string::npos){ binx = 1;}
else if(currDir.find(
"Module_3")!=string::npos){ binx = 2;}
2450 if(currDir.find(
"Module_2")!=string::npos){ binx = 3;}
else if(currDir.find(
"Module_1")!=string::npos){ binx = 4;}
2451 }
else if(currDir.find(
"Shell_p")!=string::npos){
2452 if(currDir.find(
"Module_1")!=string::npos){ binx = 5;}
else if(currDir.find(
"Module_2")!=string::npos){ binx = 6;}
2453 if(currDir.find(
"Module_3")!=string::npos){ binx = 7;}
else if(currDir.find(
"Module_4")!=string::npos){ binx = 8;}
2455 if(currDir.find(
"01")!=string::npos){ biny = 1;}
else if(currDir.find(
"02")!=string::npos){ biny = 2;}
2456 else if(currDir.find(
"03")!=string::npos){ biny = 3;}
else if(currDir.find(
"04")!=string::npos){ biny = 4;}
2457 else if(currDir.find(
"05")!=string::npos){ biny = 5;}
else if(currDir.find(
"06")!=string::npos){ biny = 6;}
2458 else if(currDir.find(
"07")!=string::npos){ biny = 7;}
else if(currDir.find(
"08")!=string::npos){ biny = 8;}
2459 else if(currDir.find(
"09")!=string::npos){ biny = 9;}
else if(currDir.find(
"10")!=string::npos){ biny = 10;}
2460 else if(currDir.find(
"11")!=string::npos){ biny = 11;}
else if(currDir.find(
"12")!=string::npos){ biny = 12;}
2461 else if(currDir.find(
"13")!=string::npos){ biny = 13;}
else if(currDir.find(
"14")!=string::npos){ biny = 14;}
2462 else if(currDir.find(
"15")!=string::npos){ biny = 15;}
else if(currDir.find(
"16")!=string::npos){ biny = 16;}
2463 else if(currDir.find(
"17")!=string::npos){ biny = 17;}
else if(currDir.find(
"18")!=string::npos){ biny = 18;}
2464 else if(currDir.find(
"19")!=string::npos){ biny = 19;}
else if(currDir.find(
"20")!=string::npos){ biny = 20;}
2465 else if(currDir.find(
"21")!=string::npos){ biny = 21;}
else if(currDir.find(
"22")!=string::npos){ biny = 22;}
2466 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2467 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2468 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2469 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2472 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2473 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2474 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2475 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2476 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2477 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2478 if(currDir.find(
"HalfCylinder_mO")!=string::npos || currDir.find(
"HalfCylinder_pO")!=string::npos){ binx = binx + 12;}
2479 if(currDir.find(
"Panel_1/Module_1")!=string::npos){ biny = 1;}
else if(currDir.find(
"Panel_2/Module_1")!=string::npos){ biny = 2;}
2480 else if(currDir.find(
"Panel_1/Module_2")!=string::npos){ biny = 3;}
else if(currDir.find(
"Panel_2/Module_2")!=string::npos){ biny = 4;}
2481 else if(currDir.find(
"Panel_1/Module_3")!=string::npos){ biny = 5;}
else if(currDir.find(
"Panel_2/Module_3")!=string::npos){ biny = 6;}
2482 else if(currDir.find(
"Panel_1/Module_4")!=string::npos){ biny = 7;}
2485 if(currDir.find(
"Layer_1")!=string::npos){
2488 }
else if(currDir.find(
"Layer_2")!=string::npos){
2491 }
else if(currDir.find(
"Layer_3")!=string::npos){
2494 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2497 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2500 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2503 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2512 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2515 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 getData(Double_t map[][3][22][7], std::string type, DQMStore *bei, funcType ff, Int_t i, Int_t j, Int_t k, Int_t l)
void createEfficiency(DQMStore *bei)
bool init()
Write XML file.
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
std::vector< std::string > getSubdirs(void) const
static const HistoName names[]
Double_t mapMin(const Double_t map[][3][22][7], bool isBarrel)
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)
int createMap(Double_t map[][3][22][7], std::string type, DQMStore *bei, funcType ff, bool isBarrel)
void bookTrackerMaps(DQMStore *bei, std::string name)
Double_t mapMax(const Double_t map[][3][22][7], bool isBarrel)
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_
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
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)
SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag)
MonitorElement * DEV_charge_Barrel
void bookEfficiency(DQMStore *bei)
void dumpEndcapRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
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
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 prephistosE(MonitorElement *me[4], DQMStore *bei, const Double_t map[][3][22][7], 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)
void prephistosB(MonitorElement *me[4], DQMStore *bei, const Double_t map[][3][22][7], std::string name, Double_t min, Double_t max)
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)
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