39 offlineXMLfile_(offlineXMLfile),
40 Tier0Flag_(Tier0Flag) {
42 " Creating SiPixelActionExecutor " <<
"\n" ;
55 " Deleting SiPixelActionExecutor " <<
"\n" ;
67 else localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
80 int& sum_grandbarrel_freq,
81 int& sum_grandendcap_freq,
88 else localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
95 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
99 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Barrel Summary configuration parameters!! " <<
"\n" ;
103 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " <<
"\n" ;
107 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Barrel Summary configuration parameters!! " <<
"\n" ;
111 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Grand Endcap Summary configuration parameters!! " <<
"\n" ;
115 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read QTest Message Limit" <<
"\n" ;
119 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Source Type" <<
"\n" ;
123 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Calib Type" <<
"\n" ;
134 else localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
141 cout <<
"SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
145 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Summary configuration parameters!! " <<
"\n" ;
160 tkmap_creator.
create(bei);
175 string barrel_structure_name;
176 vector<string> barrel_me_names;
179 else localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
186 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Barrel Summary configuration parameters!! ";
193 fillSummary(bei, barrel_structure_name, barrel_me_names,
true, isUpgrade);
196 string endcap_structure_name;
197 vector<string> endcap_me_names;
199 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " <<
"\n" ;
207 fillSummary(bei, endcap_structure_name, endcap_me_names,
false, isUpgrade);
213 string federror_structure_name;
214 vector<string> federror_me_names;
216 cout <<
"SiPixelActionExecutor::createSummary: Failed to read FED Error Summary configuration parameters!! ";
236 if (isUpgrade) {nBPixModules=1184;}
else {nBPixModules=768;}
240 DEV_adc_Barrel = bei->
book1D(
"DEV_adc_Barrel",
"Deviation from reference;Module;<adc_ref>-<adc>",nBPixModules,0.,nBPixModules);
241 DEV_ndigis_Barrel = bei->
book1D(
"DEV_ndigis_Barrel",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>",nBPixModules,0.,nBPixModules);
242 DEV_charge_Barrel = bei->
book1D(
"DEV_charge_Barrel",
"Deviation from reference;Module;<charge_ref>-<charge>",nBPixModules,0.,nBPixModules);
243 DEV_nclusters_Barrel = bei->
book1D(
"DEV_nclusters_Barrel",
"Deviation from reference;Module;<nclusters_ref>-<nclusters>",nBPixModules,0.,nBPixModules);
244 DEV_size_Barrel = bei->
book1D(
"DEV_size_Barrel",
"Deviation from reference;Module;<size_ref>-<size>",nBPixModules,0.,nBPixModules);
247 DEV_adc_Endcap = bei->
book1D(
"DEV_adc_Endcap",
"Deviation from reference;Module;<adc_ref>-<adc>",672,0.,672.);
248 DEV_ndigis_Endcap = bei->
book1D(
"DEV_ndigis_Endcap",
"Deviation from reference;Module;<ndigis_ref>-<ndigis>",672,0.,672.);
249 DEV_charge_Endcap = bei->
book1D(
"DEV_charge_Endcap",
"Deviation from reference;Module;<charge_ref>-<charge>",672,0.,672.);
250 DEV_nclusters_Endcap = bei->
book1D(
"DEV_nclusters_Endcap",
"Deviation from reference;Module;<nclusters_ref>-<nclusters>",672,0.,672.);
251 DEV_size_Endcap = bei->
book1D(
"DEV_size_Endcap",
"Deviation from reference;Module;<size_ref>-<size>",672,0.,672.);
261 TH1* ref1; TH1* ref2;
262 TH1* ref3; TH1* ref4;
267 me1 = bei->
get(
"Pixel/Barrel/SUMDIG_adc_Barrel");
269 dev1 = bei->
get(
"Pixel/Barrel/DEV_adc_Barrel");
270 me2 = bei->
get(
"Pixel/Barrel/SUMDIG_ndigis_Barrel");
272 dev2 = bei->
get(
"Pixel/Barrel/DEV_ndigis_Barrel");
273 me3 = bei->
get(
"Pixel/Barrel/SUMCLU_charge_Barrel");
275 dev3 = bei->
get(
"Pixel/Barrel/DEV_charge_Barrel");
276 me4 = bei->
get(
"Pixel/Barrel/SUMCLU_nclusters_Barrel");
278 dev4 = bei->
get(
"Pixel/Barrel/DEV_nclusters_Barrel");
279 me5 = bei->
get(
"Pixel/Barrel/SUMCLU_size_Barrel");
281 dev5 = bei->
get(
"Pixel/Barrel/DEV_size_Barrel");
282 for(
int i=1;
i!=n+1;
i++){
283 float ref_value;
float new_value;
285 if(me1)
if(ref1)
if(dev1){
287 ref_value = ref1->GetBinContent(
i);
291 if(me2)
if(ref2)
if(dev2){
293 ref_value = ref2->GetBinContent(
i);
297 if(me3)
if(ref3)
if(dev3){
299 ref_value = ref3->GetBinContent(
i);
303 if(me4)
if(ref4)
if(dev4){
305 ref_value = ref4->GetBinContent(
i);
309 if(me5)
if(ref5)
if(dev5){
311 ref_value = ref5->GetBinContent(
i);
320 TH1* ref11; TH1* ref12;
321 TH1* ref13; TH1* ref14;
326 me11 = bei->
get(
"Pixel/Endcap/SUMDIG_adc_Endcap");
328 dev11 = bei->
get(
"Pixel/Endcap/DEV_adc_Endcap");
329 me12 = bei->
get(
"Pixel/Endcap/SUMDIG_ndigis_Endcap");
331 dev12 = bei->
get(
"Pixel/Endcap/DEV_ndigis_Endcap");
332 me13 = bei->
get(
"Pixel/Endcap/SUMCLU_charge_Endcap");
334 dev13 = bei->
get(
"Pixel/Endcap/DEV_charge_Endcap");
335 me14 = bei->
get(
"Pixel/Endcap/SUMCLU_nclusters_Endcap");
337 dev14 = bei->
get(
"Pixel/Endcap/DEV_nclusters_Endcap");
338 me15 = bei->
get(
"Pixel/Endcap/SUMCLU_size_Endcap");
340 dev15 = bei->
get(
"Pixel/Endcap/DEV_size_Endcap");
341 for(
int i=1;
i!=nn+1;
i++){
342 float ref_value;
float new_value;
344 if(me11)
if(ref11)
if(dev11){
346 ref_value = ref11->GetBinContent(
i);
350 if(me12)
if(ref12)
if(dev12){
352 ref_value = ref12->GetBinContent(
i);
356 if(me13)
if(ref13)
if(dev13){
358 ref_value = ref13->GetBinContent(
i);
362 if(me14)
if(ref14)
if(dev14){
364 ref_value = ref14->GetBinContent(
i);
368 if(me15)
if(ref15)
if(dev15){
370 ref_value = ref15->GetBinContent(
i);
379 blade_subdirs.clear();
383 for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
386 for (vector<string>::const_iterator m_it = modules.begin(); m_it != modules.end(); m_it++) {
388 blade_subdirs.push_back(*m_it);
402 string currDir = bei->
pwd();
412 if (currDir.find(dir_name) != string::npos) {
413 vector<MonitorElement*> sum_mes;
414 for (vector<string>::const_iterator iv = me_names.begin();
415 iv != me_names.end(); iv++) {
417 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
418 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
419 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
420 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
422 else if((*iv)==
"ndigis"||(*iv)==
"adc")
424 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||
425 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
426 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
428 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
429 else if((*iv)==
"residualX"||(*iv)==
"residualY")
431 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
433 else if((*iv)==
"Gain1d"||(*iv)==
"GainChi2NDF1d"||
434 (*iv)==
"GainChi2Prob1d"||(*iv)==
"Pedestal1d"||
435 (*iv)==
"GainNPoints1d"||(*iv)==
"GainHighPoint1d"||
436 (*iv)==
"GainLowPoint1d"||(*iv)==
"GainEndPoint1d"||
437 (*iv)==
"GainFitResult2d"||(*iv)==
"GainDynamicRange2d"||
438 (*iv)==
"GainSaturate2d"||
439 (*iv)==
"ScurveChi2ProbSummary"||(*iv)==
"ScurveFitResultSummary"||
440 (*iv)==
"ScurveSigmasSummary"||(*iv)==
"ScurveThresholdSummary"||
441 (*iv)==
"pixelAliveSummary" || (*iv) ==
"SiPixelErrorsCalibDigis")
445 if((*iv).find(
"residual")!=string::npos){
446 tag = prefix +
"_" + (*iv) +
"_mean_"
447 + currDir.substr(currDir.find(dir_name));
449 sum_mes.push_back(temp);
450 tag = prefix +
"_" + (*iv) +
"_RMS_"
451 + currDir.substr(currDir.find(dir_name));
453 sum_mes.push_back(temp);
454 }
else if(prefix ==
"SUMCAL"){
455 if((*iv)==
"Gain1d" || (*iv)==
"GainChi2NDF1d" || (*iv)==
"GainChi2Prob1d" ||
456 (*iv)==
"GainNPoints1d" || (*iv)==
"GainHighPoint1d" ||
457 (*iv)==
"GainLowPoint1d" || (*iv)==
"GainEndPoint1d" ||
458 (*iv)==
"GainDynamicRange2d" || (*iv)==
"GainSaturate2d" ||
459 (*iv)==
"Pedestal1d" ||
460 (*iv)==
"ScurveChi2ProbSummary" || (*iv)==
"ScurveFitResultSummary" ||
461 (*iv)==
"ScurveSigmasSummary" || (*iv)==
"ScurveThresholdSummary"){
462 tag = prefix +
"_" + (*iv) +
"_mean_"
463 + currDir.substr(currDir.find(dir_name));
465 sum_mes.push_back(temp);
466 tag = prefix +
"_" + (*iv) +
"_RMS_"
467 + currDir.substr(currDir.find(dir_name));
469 sum_mes.push_back(temp);
470 }
else if((*iv) ==
"SiPixelErrorsCalibDigis"){
471 tag = prefix +
"_" + (*iv) +
"_NCalibErrors_"
472 + currDir.substr(currDir.find(dir_name));
474 sum_mes.push_back(temp);
475 }
else if((*iv)==
"GainFitResult2d"){
476 tag = prefix +
"_" + (*iv) +
"_NNegativeFits_"
477 + currDir.substr(currDir.find(dir_name));
479 sum_mes.push_back(temp);
480 }
else if((*iv)==
"pixelAliveSummary"){
481 tag = prefix +
"_" + (*iv) +
"_FracOfPerfectPix_"
482 + currDir.substr(currDir.find(dir_name));
484 sum_mes.push_back(temp);
485 tag = prefix +
"_" + (*iv) +
"_mean_"
486 + currDir.substr(currDir.find(dir_name));
488 sum_mes.push_back(temp);
491 tag = prefix +
"_" + (*iv) +
"_" + currDir.substr(currDir.find(dir_name));
493 sum_mes.push_back(temp);
495 tag = prefix +
"_" + (*iv) +
"FREQ_"
496 + currDir.substr(currDir.find(dir_name));
498 sum_mes.push_back(temp);
500 if(prefix==
"SUMDIG" && (*iv)==
"adc"){
501 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(dir_name));
502 temp = bei->
book1D(tag.c_str(), tag.c_str(),128, 0., 256.);
503 sum_mes.push_back(temp);
505 if(prefix==
"SUMCLU" && (*iv)==
"charge"){
506 tag =
"ALLMODS_" + (*iv) +
"COMB_" + currDir.substr(currDir.find(dir_name));
507 temp = bei->
book1D(tag.c_str(), tag.c_str(),100, 0., 200.);
508 sum_mes.push_back(temp);
512 if (sum_mes.size() == 0) {
513 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" <<
"\n" ;
521 for (vector<string>::const_iterator it = subdirs.begin();
522 it != subdirs.end(); it++) {
523 if (prefix!=
"SUMOFF" && (*it).find(
"Module_") == string::npos)
continue;
524 if (prefix==
"SUMOFF" && (*it).find(isbarrel?
"Layer_":
"Disk_") == string::npos)
continue;
530 for (vector<MonitorElement*>::const_iterator
isum = sum_mes.begin();
532 for (vector<string>::const_iterator im = contents.begin();
533 im != contents.end(); im++) {
534 string sname = ((*isum)->getName());
536 tname = sname.substr(7,(sname.find(
"_",7)-6));
537 if(sname.find(
"ALLMODS_adcCOMB_")!=string::npos) tname =
"adc_";
538 if(sname.find(
"ALLMODS_chargeCOMB_")!=string::npos) tname =
"charge_";
539 if(sname.find(
"_charge_")!=string::npos && sname.find(
"Track_")==string::npos) tname =
"charge_";
540 if(sname.find(
"_nclusters_")!=string::npos && sname.find(
"Track_")==string::npos) tname =
"nclusters_";
541 if(sname.find(
"_size_")!=string::npos && sname.find(
"Track_")==string::npos) tname =
"size_";
542 if(sname.find(
"_charge_OffTrack_")!=string::npos) tname =
"charge_OffTrack_";
543 if(sname.find(
"_nclusters_OffTrack_")!=string::npos) tname =
"nclusters_OffTrack_";
544 if(sname.find(
"_size_OffTrack_")!=string::npos) tname =
"size_OffTrack_";
545 if(sname.find(
"_sizeX_OffTrack_")!=string::npos) tname =
"sizeX_OffTrack_";
546 if(sname.find(
"_sizeY_OffTrack_")!=string::npos) tname =
"sizeY_OffTrack_";
547 if(sname.find(
"_charge_OnTrack_")!=string::npos) tname =
"charge_OnTrack_";
548 if(sname.find(
"_nclusters_OnTrack_")!=string::npos) tname =
"nclusters_OnTrack_";
549 if(sname.find(
"_size_OnTrack_")!=string::npos) tname =
"size_OnTrack_";
550 if(sname.find(
"_sizeX_OnTrack_")!=string::npos) tname =
"sizeX_OnTrack_";
551 if(sname.find(
"_sizeY_OnTrack_")!=string::npos) tname =
"sizeY_OnTrack_";
553 if(tname.find(
"FREQ")!=string::npos) tname =
"ndigis_";
554 if (((*im)).find(tname) == 0) {
555 string fullpathname = bei->
pwd() +
"/" + (*im);
560 if(sname.find(
"_charge")!=string::npos && sname.find(
"Track_")==string::npos && me->
getName().find(
"Track_")!=string::npos)
continue;
561 if(sname.find(
"_nclusters_")!=string::npos && sname.find(
"Track_")==string::npos && me->
getName().find(
"Track_")!=string::npos)
continue;
562 if(sname.find(
"_size")!=string::npos && sname.find(
"Track_")==string::npos && me->
getName().find(
"Track_")!=string::npos)
continue;
565 if (sname.find(
"_RMS_")!=string::npos &&
566 sname.find(
"GainDynamicRange2d")==string::npos &&
567 sname.find(
"GainSaturate2d")==string::npos){
569 }
else if (sname.find(
"GainDynamicRange2d")!=string::npos ||
570 sname.find(
"GainSaturate2d")!=string::npos){
571 float SumOfEntries=0.;
float SumOfSquaredEntries=0.;
int SumOfPixels=0;
578 float MeanInZ = SumOfEntries / float(SumOfPixels);
579 float RMSInZ =
sqrt(SumOfSquaredEntries/
float(SumOfPixels));
580 if(sname.find(
"_mean_")!=string::npos) (*isum)->Fill(ndet, MeanInZ);
581 if(sname.find(
"_RMS_")!=string::npos) (*isum)->Fill(ndet, RMSInZ);
582 }
else if (sname.find(
"_FracOfPerfectPix_")!=string::npos){
585 float nall = (me->
getTH1F())->Integral(1,11);
587 (*isum)->Fill(ndet, nlast/nall);
588 }
else if (sname.find(
"_NCalibErrors_")!=string::npos ||
589 sname.find(
"FREQ_")!=string::npos){
591 (*isum)->Fill(ndet, nall);
592 }
else if (sname.find(
"GainFitResult2d")!=string::npos){
597 (*isum)->Fill(ndet,
float(NegFitPixels));
598 }
else if (sname.find(
"ALLMODS_adcCOMB_")!=string::npos ||
599 (sname.find(
"ALLMODS_chargeCOMB_")!=string::npos && me->
getName().find(
"Track_")==string::npos)){
600 (*isum)->getTH1F()->Add(me->
getTH1F());
601 }
else if (sname.find(
"_NErrors_")!=string::npos){
602 string path1 = fullpathname;
603 path1 = path1.replace(path1.find(
"NErrors"),7,
"errorType");
607 for(
int jj=1;
jj<16;
jj++){
610 string path2 = path1;
611 path2 = path2.replace(path2.find(
"errorType"),9,
"TBMMessage");
619 }
else if ((sname.find(
"_charge_")!=string::npos && sname.find(
"Track_")==string::npos &&
620 me->
getName().find(
"Track_")==string::npos) ||
621 (sname.find(
"_charge_")!=string::npos && sname.find(
"_OnTrack_")!=string::npos &&
622 me->
getName().find(
"_OnTrack_")!=string::npos) ||
623 (sname.find(
"_charge_")!=string::npos && sname.find(
"_OffTrack_")!=string::npos &&
624 me->
getName().find(
"_OffTrack_")!=string::npos) ||
625 (sname.find(
"_nclusters_")!=string::npos && sname.find(
"Track_")==string::npos &&
626 me->
getName().find(
"Track_")==string::npos) ||
627 (sname.find(
"_nclusters_")!=string::npos && sname.find(
"_OnTrack_")!=string::npos &&
628 me->
getName().find(
"_OnTrack_")!=string::npos) ||
629 (sname.find(
"_nclusters_")!=string::npos && sname.find(
"_OffTrack_")!=string::npos &&
630 me->
getName().find(
"_OffTrack_")!=string::npos) ||
631 (sname.find(
"_size")!=string::npos && sname.find(
"Track_")==string::npos &&
632 me->
getName().find(
"Track_")==string::npos) ||
633 (sname.find(
"_size")!=string::npos && sname.find(
"_OnTrack_")!=string::npos &&
634 me->
getName().find(
"_OnTrack_")!=string::npos) ||
635 (sname.find(
"_size")!=string::npos && sname.find(
"_OffTrack_")!=string::npos &&
636 me->
getName().find(
"_OffTrack_")!=string::npos)){
637 (*isum)->Fill(ndet, me->
getMean());
638 }
else if(sname.find(
"_charge_")==string::npos && sname.find(
"_nclusters_")==string::npos && sname.find(
"_size")==string::npos){
639 (*isum)->Fill(ndet, me->
getMean());
644 if(prefix==
"SUMOFF"){
645 (*isum)->setAxisTitle(isbarrel?
"Ladders":
"Blades",1);
646 }
else if(sname.find(
"ALLMODS_adcCOMB_")!=string::npos){
647 (*isum)->setAxisTitle(
"Digi charge [ADC]",1);
648 }
else if(sname.find(
"ALLMODS_chargeCOMB_")!=string::npos){
649 (*isum)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
651 (*isum)->setAxisTitle(
"Modules",1);
654 if (sname.find(
"_RMS_")!=string::npos){
655 title =
"RMS of " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
656 }
else if (sname.find(
"_FracOfPerfectPix_")!=string::npos){
657 title =
"FracOfPerfectPix " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
658 }
else if(sname.find(
"_NCalibErrors_")!=string::npos){
659 title =
"Number of CalibErrors " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
660 }
else if(sname.find(
"_NNegativeFits_")!=string::npos){
661 title =
"Number of pixels with neg. fit result " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per module";
662 }
else if (sname.find(
"FREQ_")!=string::npos){
663 title =
"NEvents with digis per module";
664 }
else if (sname.find(
"ALLMODS_adcCOMB_")!=string::npos){
666 }
else if (sname.find(
"ALLMODS_chargeCOMB_")!=string::npos){
668 }
else if (sname.find(
"_NErrors_")!=string::npos){
669 if(prefix==
"SUMOFF" && isbarrel) title =
"Total number of errors per Ladder";
670 else if(prefix==
"SUMOFF" && !isbarrel) title =
"Total number of errors per Blade";
671 else title =
"Total number of errors per Module";
673 if(prefix==
"SUMOFF") title =
"Mean " + sname.substr(7,(sname.find(
"_",7)-7)) + (isbarrel?
" per Ladder":
" per Blade");
674 else title =
"Mean " + sname.substr(7,(sname.find(
"_",7)-7)) +
" per Module";
676 (*isum)->setAxisTitle(title,2);
683 if(dir_name.find(
"Blade") == 0) bei->
goUp();
691 for (vector<string>::const_iterator it = subdirs.begin();
692 it != subdirs.end(); it++) {
694 if((bei->
pwd()).
find(
"Endcap")!=string::npos ||
695 (bei->
pwd()).
find(
"AdditionalPixelErrors")!=string::npos) bei->
goUp();
697 if((*it).find(
"Endcap")!=string::npos ||
698 (*it).find(
"AdditionalPixelErrors")!=string::npos)
continue;
699 fillSummary(bei, dir_name, me_names,
true, isUpgrade);
702 string grandbarrel_structure_name;
703 vector<string> grandbarrel_me_names;
705 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand Barrel Summary configuration parameters!! ";
714 for (vector<string>::const_iterator it = subdirs.begin();
715 it != subdirs.end(); it++) {
717 if((bei->
pwd()).
find(
"Barrel")!=string::npos ||
718 (bei->
pwd()).
find(
"AdditionalPixelErrors")!=string::npos) bei->
goUp();
720 if ((*it).find(
"Barrel")!=string::npos ||
721 (*it).find(
"AdditionalPixelErrors")!=string::npos)
continue;
722 fillSummary(bei, dir_name, me_names,
false, isUpgrade);
725 string grandendcap_structure_name;
726 vector<string> grandendcap_me_names;
728 cout <<
"SiPixelActionExecutor::createSummary: Failed to read Grand Endcap Summary configuration parameters!! ";
746 vector<string>& me_names) {
748 string currDir = bei->
pwd();
753 if (currDir.find(dir_name) != string::npos) {
754 vector<MonitorElement*> sum_mes;
755 for (vector<string>::const_iterator iv = me_names.begin();
756 iv != me_names.end(); iv++) {
757 bool isBooked =
false;
759 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
760 if ((*im).find(*iv) != string::npos) isBooked =
true;
762 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
763 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
764 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
765 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap"||
766 (*iv)==
"FedChLErrArray"||(*iv)==
"FedChNErrArray"||(*iv)==
"FedETypeNErrArray")
769 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
770 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
771 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
772 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap"){
773 string tag = prefix +
"_" + (*iv) +
"_FEDErrors";
775 sum_mes.push_back(temp);
776 }
else if((*iv)==
"FedChLErrArray"||(*iv)==
"FedChNErrArray"||(*iv)==
"FedETypeNErrArray"){
777 string tag = prefix +
"_" + (*iv);
779 if((*iv)==
"FedChLErrArray") {
if (!isBooked) temp = bei->
book2D(
"FedChLErrArray",
"Type of last error",40,-0.5,39.5,37,0.,37.);
781 string fullpathname = bei->
pwd() +
"/" + (*iv);
782 temp = bei->
get(fullpathname);
784 if((*iv)==
"FedChNErrArray") {
if (!isBooked) temp = bei->
book2D(
"FedChNErrArray",
"Total number of errors",40,-0.5,39.5,37,0.,37.);
786 string fullpathname = bei->
pwd() +
"/" + (*iv);
787 temp = bei->
get(fullpathname);
789 if((*iv)==
"FedETypeNErrArray"){
791 temp = bei->
book2D(
"FedETypeNErrArray",
"Number of each error type",40,-0.5,39.5,21,0.,21.);
815 string fullpathname = bei->
pwd() +
"/" + (*iv);
816 temp = bei->
get(fullpathname);
819 sum_mes.push_back(temp);
822 if (sum_mes.size() == 0) {
823 edm::LogInfo(
"SiPixelActionExecutor") <<
" Summary MEs can not be created" <<
"\n" ;
828 for (vector<string>::const_iterator it = subdirs.begin();
829 it != subdirs.end(); it++) {
830 if ( (*it).find(
"FED_") == string::npos)
continue;
832 string fedid = (*it).substr((*it).find(
"_")+1);
833 std::istringstream isst;
838 for (vector<MonitorElement*>::const_iterator
isum = sum_mes.begin();
840 for (vector<string>::const_iterator im = contents.begin();
841 im != contents.end(); im++) {
842 if(((*im).find(
"FedChNErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedChNErrArray")!=std::string::npos) ||
843 ((*im).find(
"FedChLErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedChLErrArray")!=std::string::npos) ||
844 ((*im).find(
"FedETypeNErrArray_")!=std::string::npos && (*isum)->getName().find(
"FedETypeNErrArray")!=std::string::npos)){
845 string fullpathname = bei->
pwd() +
"/" + (*im);
848 for(
int i=0;
i!=37;
i++){
849 int n = (*im).find(
"_"); n++;
850 string channel_str = (*im).substr(n);
851 std::istringstream jsst;
852 jsst.str(channel_str);
856 if((*im).find(
"FedETypeNErrArray_")!=std::string::npos &&
i<21) (*isum)->Fill(ndet-1,
i,me->
getIntValue());
862 string sname = ((*isum)->getName());
864 tname = sname.substr(7,(sname.find(
"_",7)-6));
865 if (((*im)).
find(tname) == 0) {
866 string fullpathname = bei->
pwd() +
"/" + (*im);
871 if (sname.find(
"_NErrors_")!=string::npos){
872 string path1 = fullpathname;
873 path1 = path1.replace(path1.find(
"NErrors"),7,
"errorType");
877 for(
int jj=1;
jj<16;
jj++){
880 string path2 = path1;
881 path2 = path2.replace(path2.find(
"errorType"),9,
"TBMMessage");
889 }
else (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->
getEntries());
891 (*isum)->setAxisTitle(
"FED #",1);
893 title = sname.substr(7,(sname.find(
"_",7)-7)) +
" per FED";
894 (*isum)->setAxisTitle(title,2);
904 for (vector<string>::const_iterator it = subdirs.begin();
905 it != subdirs.end(); it++) {
906 if((*it).find(
"Endcap")!=string::npos ||
907 (*it).find(
"Barrel")!=string::npos)
continue;
919 vector<string>& me_names,
922 vector<MonitorElement*> gsum_mes;
923 string currDir = bei->
pwd();
925 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
927 if ((dir_name.find(
"DQMData") == 0) ||
928 (dir_name.find(
"Pixel") == 0) ||
929 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
930 (dir_name.find(
"Endcap") == 0) ||
931 (dir_name.find(
"HalfCylinder") == 0) ||
932 (dir_name.find(
"Disk") == 0) ||
933 (dir_name.find(
"Blade") == 0) ||
934 (dir_name.find(
"Panel") == 0) )
return;
936 int nDirs = subdirs.size();
942 bool first_subdir =
true;
943 for (vector<string>::const_iterator it = subdirs.begin();
944 it != subdirs.end(); it++) {
962 for (vector<string>::const_iterator im = contents.begin();
963 im != contents.end(); im++) {
965 for (vector<string>::const_iterator iv = me_names.begin();
966 iv != me_names.end(); iv++) {
967 string var =
"_" + (*iv) +
"_";
969 if ((*im).find(var) != string::npos) {
970 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
971 (*im).find(
"Track_")!=string::npos)
continue;
973 string full_path = (*it) +
"/" +(*im);
977 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
978 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
979 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
980 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
982 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
983 (*iv)==
"ndigisFREQ" || (*iv)==
"adcCOMB")
985 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
986 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
987 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
989 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
990 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
991 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
993 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
995 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
996 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
997 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
998 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
999 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
1000 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
1001 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
1002 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
1003 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
1004 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
1005 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
1006 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
1007 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
1008 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
1009 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
1010 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix" ||
1011 (*iv)==
"SiPixelErrorsCalibDigis_NCalibErrors" )
1021 if (first_subdir && !isUpgrade){
1023 nbin = me->
getTH1F()->GetNbinsX();
1024 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1025 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1026 else if(prefix==
"SUMOFF" && dir_name==
"Barrel") nbin=192;
1027 else if((*iv)==
"adcCOMB") nbin=256;
1028 else if(dir_name==
"Barrel") nbin=768;
1029 else if(prefix==
"SUMOFF" && dir_name.find(
"Shell")!=string::npos) nbin=48;
1030 else if(dir_name.find(
"Shell")!=string::npos) nbin=192;
1031 else nbin=nbin*nDirs;
1034 }
else if (first_subdir && isUpgrade){
1036 nbin = me->
getTH1F()->GetNbinsX();
1037 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1038 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1039 else if(prefix==
"SUMOFF" && dir_name==
"Barrel") nbin=296;
1040 else if((*iv)==
"adcCOMB") nbin=256;
1041 else if(dir_name==
"Barrel") nbin=1184;
1042 else if(prefix==
"SUMOFF" && dir_name.find(
"Shell")!=string::npos) nbin=74;
1043 else if(dir_name.find(
"Shell")!=string::npos) nbin=296;
1044 else nbin=nbin*nDirs;
1062 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1063 igm != gsum_mes.end(); igm++) {
1065 if ((*igm)->getName().find(var) != string::npos) {
1067 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Ladders",1);
1068 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1069 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1070 else (*igm)->setAxisTitle(
"Modules",1);
1075 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Ladder";
1076 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1077 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Ladder";
1078 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix!=
"SUMOFF") title =
"NEvents with digis per Module";
1079 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix==
"SUMOFF") title =
"NEvents with digis per Ladder/Blade";
1080 else if((*igm)->getName().find(
"adcCOMB_") != string::npos) title =
"NDigis";
1081 else if((*igm)->getName().find(
"chargeCOMB_") != string::npos) title =
"NClusters";
1082 else title =
"mean " + (*iv) +
" per Module";
1083 (*igm)->setAxisTitle(title,2);
1087 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1089 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1091 }
else if((*igm)->getName().find(
"Ladder") != string::npos){
1092 nbin_i=0; nbin_subdir=4;
1093 }
else if((*igm)->getName().find(
"Layer") != string::npos){
1094 nbin_i=(cnt-1)*4; nbin_subdir=4;
1095 }
else if((*igm)->getName().find(
"Shell") != string::npos){
1096 if(prefix!=
"SUMOFF"){
1097 if(iDir==0){ nbin_i=0; nbin_subdir=40; }
1098 else if(iDir==1){ nbin_i=40; nbin_subdir=64; }
1099 else if(iDir==2){ nbin_i=104; nbin_subdir=88; }
1101 if(iDir==0){ nbin_i=0; nbin_subdir=10; }
1102 else if(iDir==1){ nbin_i=10; nbin_subdir=16; }
1103 else if(iDir==2){ nbin_i=26; nbin_subdir=22; }
1105 }
else if((*igm)->getName().find(
"Barrel") != string::npos){
1106 if(prefix!=
"SUMOFF"){
1107 if(iDir==0){ nbin_i=0; nbin_subdir=192; }
1108 else if(iDir==1){ nbin_i=192; nbin_subdir=192; }
1109 else if(iDir==2){ nbin_i=384; nbin_subdir=192; }
1110 else if(iDir==3){ nbin_i=576; nbin_subdir=192; }
1112 if(iDir==0){ nbin_i=0; nbin_subdir=48; }
1113 else if(iDir==1){ nbin_i=48; nbin_subdir=48; }
1114 else if(iDir==2){ nbin_i=96; nbin_subdir=48; }
1115 else if(iDir==3){ nbin_i=144; nbin_subdir=48; }
1118 }
else if (isUpgrade) {
1119 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1121 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1123 }
else if((*igm)->getName().find(
"Ladder") != string::npos){
1124 nbin_i=0; nbin_subdir=4;
1125 }
else if((*igm)->getName().find(
"Layer") != string::npos){
1126 nbin_i=(cnt-1)*4; nbin_subdir=4;
1127 }
else if((*igm)->getName().find(
"Shell") != string::npos){
1128 if(prefix!=
"SUMOFF"){
1129 if(iDir==0){ nbin_i=0; nbin_subdir=24; }
1130 else if(iDir==1){ nbin_i=24; nbin_subdir=56; }
1131 else if(iDir==2){ nbin_i=80; nbin_subdir=88; }
1132 else if(iDir==3){ nbin_i=168; nbin_subdir=128; }
1134 if(iDir==0){ nbin_i=0; nbin_subdir=6; }
1135 else if(iDir==1){ nbin_i=6; nbin_subdir=14; }
1136 else if(iDir==2){ nbin_i=20; nbin_subdir=22; }
1137 else if(iDir==3){ nbin_i=42; nbin_subdir=32; }
1139 }
else if((*igm)->getName().find(
"Barrel") != string::npos){
1140 if(prefix!=
"SUMOFF"){
1141 if(iDir==0){ nbin_i=0; nbin_subdir=296; }
1142 else if(iDir==1){ nbin_i=296; nbin_subdir=296; }
1143 else if(iDir==2){ nbin_i=592; nbin_subdir=296; }
1144 else if(iDir==3){ nbin_i=888; nbin_subdir=296; }
1145 else if(iDir==4){ nbin_i=1184; nbin_subdir=296; }
1147 if(iDir==0){ nbin_i=0; nbin_subdir=74; }
1148 else if(iDir==1){ nbin_i=74; nbin_subdir=74; }
1149 else if(iDir==2){ nbin_i=148; nbin_subdir=74; }
1150 else if(iDir==3){ nbin_i=222; nbin_subdir=74; }
1151 else if(iDir==4){ nbin_i=296; nbin_subdir=74; }
1156 if((*igm)->getName().find(
"ndigisFREQ")==string::npos)
1158 if(((*igm)->getName().find(
"adcCOMB")!=string::npos && me->
getName().find(
"adcCOMB")!=string::npos)
1159 || ((*igm)->getName().find(
"chargeCOMB")!=string::npos && me->
getName().find(
"chargeCOMB")!=string::npos))
1161 (*igm)->getTH1F()->Add(me->
getTH1F());
1162 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1163 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1164 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1165 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1166 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1167 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1168 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1169 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1170 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1171 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1172 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1173 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1174 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1175 (*igm)->getName().find(
"size_")==string::npos)){
1179 else if(me->
getName().find(
"ndigisFREQ")!=string::npos)
1189 first_subdir =
false;
1196 vector<string>& me_names,
1199 vector<MonitorElement*> gsum_mes;
1200 string currDir = bei->
pwd();
1202 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
1203 if ((dir_name.find(
"DQMData") == 0) ||
1204 (dir_name.find(
"Pixel") == 0) ||
1205 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
1206 (dir_name.find(
"Barrel") == 0) ||
1207 (dir_name.find(
"Shell") == 0) ||
1208 (dir_name.find(
"Layer") == 0) ||
1209 (dir_name.find(
"Ladder") == 0) )
return;
1214 int nbin_subdir = 0;
1216 bool first_subdir =
true;
1217 for (vector<string>::const_iterator it = subdirs.begin();
1218 it != subdirs.end(); it++) {
1233 for (vector<string>::const_iterator im = contents.begin();
1234 im != contents.end(); im++) {
1235 for (vector<string>::const_iterator iv = me_names.begin();
1236 iv != me_names.end(); iv++) {
1237 string var =
"_" + (*iv) +
"_";
1238 if ((*im).find(var) != string::npos) {
1239 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
1240 (*im).find(
"Track_")!=string::npos)
continue;
1241 string full_path = (*it) +
"/" +(*im);
1245 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
1246 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
1247 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
1248 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
1250 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
1251 (*iv)==
"ndigisFREQ"||(*iv)==
"adcCOMB")
1253 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
1254 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
1255 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
1257 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
1258 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
1259 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
1261 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
1263 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
1264 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
1265 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
1266 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
1267 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
1268 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
1269 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
1270 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
1271 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
1272 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
1273 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
1274 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
1275 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
1276 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
1277 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
1278 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix"||
1279 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
1288 if (first_subdir && !isUpgrade){
1290 nbin = me->
getTH1F()->GetNbinsX();
1291 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1292 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1293 else if(prefix==
"SUMOFF" && dir_name==
"Endcap") nbin=96;
1294 else if(dir_name==
"Endcap") nbin=672;
1295 else if(prefix==
"SUMOFF" && dir_name.find(
"HalfCylinder")!=string::npos) nbin=24;
1296 else if(dir_name.find(
"HalfCylinder")!=string::npos) nbin=168;
1297 else if(prefix==
"SUMOFF" && dir_name.find(
"Disk")!=string::npos) nbin=12;
1298 else if(dir_name.find(
"Disk")!=string::npos) nbin=84;
1299 else if(dir_name.find(
"Blade")!=string::npos) nbin=7;
1304 }
else if(first_subdir && isUpgrade){
1305 nbin = me->
getTH1F()->GetNbinsX();
1306 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1307 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1308 else if(prefix==
"SUMOFF" && dir_name==
"Endcap") nbin=336;
1309 else if(dir_name==
"Endcap") nbin=672;
1310 else if(prefix==
"SUMOFF" && dir_name.find(
"HalfCylinder")!=string::npos) nbin=84;
1311 else if(dir_name.find(
"HalfCylinder")!=string::npos) nbin=168;
1312 else if(prefix==
"SUMOFF" && dir_name.find(
"Disk")!=string::npos) nbin=28;
1313 else if(dir_name.find(
"Disk")!=string::npos) nbin=56;
1314 else if(dir_name.find(
"Blade")!=string::npos) nbin=2;
1331 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1332 igm != gsum_mes.end(); igm++) {
1333 if ((*igm)->getName().find(var) != string::npos) {
1334 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Blades",1);
1335 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1336 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1337 else (*igm)->setAxisTitle(
"Modules",1);
1339 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Blade";
1340 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1341 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Blade";
1342 else if((*igm)->getName().find(
"FREQ_") != string::npos) title =
"NEvents with digis per Module";
1343 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) title =
"NDigis";
1344 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) title =
"NClusters";
1345 else title =
"mean " + (*iv) +
" per Module";
1346 (*igm)->setAxisTitle(title,2);
1349 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1351 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1353 }
else if((*igm)->getName().find(
"Panel_") != string::npos){
1359 }
else if((*igm)->getName().find(
"Blade") != string::npos){
1360 if((*im).find(
"_1") != string::npos) nbin_subdir=4;
1361 if((*im).find(
"_2") != string::npos) {nbin_i=4; nbin_subdir=3;}
1362 }
else if((*igm)->getName().find(
"Disk") != string::npos){
1363 nbin_i=((cnt-1)%12)*7; nbin_subdir=7;
1364 }
else if((*igm)->getName().find(
"HalfCylinder") != string::npos){
1365 if(prefix!=
"SUMOFF"){
1367 if((*im).find(
"_2") != string::npos) nbin_i=84;
1370 if((*im).find(
"_2") != string::npos) nbin_i=12;
1372 }
else if((*igm)->getName().find(
"Endcap") != string::npos){
1373 if(prefix!=
"SUMOFF"){
1375 if((*im).find(
"_mO") != string::npos) nbin_i=168;
1376 if((*im).find(
"_pI") != string::npos) nbin_i=336;
1377 if((*im).find(
"_pO") != string::npos) nbin_i=504;
1380 if((*im).find(
"_mO") != string::npos) nbin_i=24;
1381 if((*im).find(
"_pI") != string::npos) nbin_i=48;
1382 if((*im).find(
"_pO") != string::npos) nbin_i=72;
1385 }
else if (isUpgrade) {
1386 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1388 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1390 }
else if((*igm)->getName().find(
"Panel_") != string::npos){
1396 }
else if((*igm)->getName().find(
"Blade") != string::npos){
1397 if((*im).find(
"_1") != string::npos) nbin_subdir=1;
1398 if((*im).find(
"_2") != string::npos) {nbin_i=1; nbin_subdir=1;}
1399 }
else if((*igm)->getName().find(
"Disk") != string::npos){
1400 nbin_i=((cnt-1)%28)*2; nbin_subdir=2;
1401 }
else if((*igm)->getName().find(
"HalfCylinder") != string::npos){
1402 if(prefix!=
"SUMOFF"){
1404 if((*im).find(
"_2") != string::npos) nbin_i=56;
1405 if((*im).find(
"_3") != string::npos) nbin_i=112;
1408 if((*im).find(
"_2") != string::npos) nbin_i=28;
1409 if((*im).find(
"_3") != string::npos) nbin_i=56;
1411 }
else if((*igm)->getName().find(
"Endcap") != string::npos){
1412 if(prefix!=
"SUMOFF"){
1414 if((*im).find(
"_mO") != string::npos) nbin_i=168;
1415 if((*im).find(
"_pI") != string::npos) nbin_i=336;
1416 if((*im).find(
"_pO") != string::npos) nbin_i=504;
1419 if((*im).find(
"_mO") != string::npos) nbin_i=84;
1420 if((*im).find(
"_pI") != string::npos) nbin_i=168;
1421 if((*im).find(
"_pO") != string::npos) nbin_i=252;
1427 if((*igm)->getName().find(
"ndigisFREQ")==string::npos){
1428 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)){
1429 (*igm)->getTH1F()->Add(me->
getTH1F());
1430 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1431 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1432 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1433 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1434 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1435 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1436 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1437 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1438 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1439 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1440 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1441 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1442 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1443 (*igm)->getName().find(
"size_")==string::npos)){
1446 }
else if(me->
getName().find(
"ndigisFREQ")!=string::npos){
1458 first_subdir =
false;
1468 vector<MonitorElement*> & mes) {
1470 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return;
1473 for (vector<string>::const_iterator it = contents.begin();
1474 it != contents.end(); it++) {
1476 if ((*it).find(me_name) == 0) {
1477 string fullpathname = bei->
pwd() +
"/" + me_name;
1494 if(me_name.find(
"ALLMODS_adcCOMB_")!=string::npos) temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),128,0,256);
1495 else if(me_name.find(
"ALLMODS_chargeCOMB_")!=string::npos) temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),100,0,200);
1496 else temp_me = bei->
book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1497 if (temp_me) mes.push_back(temp_me);
1512 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return me;
1515 for (vector<string>::const_iterator it = contents.begin();
1516 it != contents.end(); it++) {
1517 if ((*it).find(me_name) == 0) {
1518 string fullpathname = bei->
pwd() +
"/" + (*it);
1519 me = bei->
get(fullpathname);
1538 if(me_name.find(
"SUMOFF")==string::npos){
1539 if(me_name.find(
"Blade_")!=string::npos)me = bei->
book1D(me_name.c_str(), me_name.c_str(),7,1.,8.);
1540 else me = bei->
book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1543 }
else if(me_name.find(
"Layer_1")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),10,1.,11.);
1544 }
else if(me_name.find(
"Layer_2")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),16,1.,17.);
1545 }
else if(me_name.find(
"Layer_3")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1546 }
else if(me_name.find(
"Disk_")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),12,1.,13.);
1549 else if (isUpgrade) {
1550 if(me_name.find(
"SUMOFF")==string::npos){
1551 if(me_name.find(
"Blade_")!=string::npos)me = bei->
book1D(me_name.c_str(), me_name.c_str(),2,1.,3.);
1552 else me = bei->
book1D(me_name.c_str(), me_name.c_str(),1,1.,2.);
1555 }
else if(me_name.find(
"Layer_1")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),6,1.,7.);
1556 }
else if(me_name.find(
"Layer_2")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),14,1.,15.);
1557 }
else if(me_name.find(
"Layer_3")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1558 }
else if(me_name.find(
"Layer_4")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),32,1.,33.);
1559 }
else if(me_name.find(
"Disk_")!=string::npos){ me = bei->
book1D(me_name.c_str(), me_name.c_str(),28,1.,29.);
1577 if((bei->
pwd()).
find(
"Pixel")==string::npos)
return me;
1580 for (vector<string>::const_iterator it = contents.begin();
1581 it != contents.end(); it++) {
1582 if ((*it).find(me_name) == 0) {
1583 string fullpathname = bei->
pwd() +
"/" + (*it);
1585 me = bei->
get(fullpathname);
1595 me = bei->
book1D(me_name.c_str(), me_name.c_str(),40,-0.5,39.5);
1606 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1608 if(isbarrel && (*it).find(
"Barrel")==string::npos)
continue;
1609 if(!isbarrel && (*it).find(
"Endcap")==string::npos)
continue;
1611 if((*it).find(
"Module_")!=string::npos)
continue;
1612 if((*it).find(
"Panel_")!=string::npos)
continue;
1613 if((*it).find(
"Ladder_")!=string::npos)
continue;
1614 if((*it).find(
"Blade_")!=string::npos)
continue;
1615 if((*it).find(
"Layer_")!=string::npos)
continue;
1616 if((*it).find(
"Disk_")!=string::npos)
continue;
1621 OccupancyMap = bei->
book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
1624 OccupancyMap = bei->
book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
1669 string currDir = bei->
pwd();
1670 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
1673 if(dname.find(
"Layer_")!=string::npos || dname.find(
"Disk_")!=string::npos){
1674 vector<string> meVec = bei->
getMEs();
1675 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1676 string full_path = currDir +
"/" + (*it);
1677 if(full_path.find(
"hitmap_siPixelDigis")!=string::npos){
1681 string path = full_path;
1682 while (path.find_last_of(
"/") != 5)
1684 path = path.substr(0,path.find_last_of(
"/"));
1686 OccupancyMap = bei->
get(path +
"/" + (isbarrel?
"barrel":
"endcap") +
"OccupancyMap");
1704 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1707 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
1726 std::string partB[] = {
"Layer_1",
"Layer_2",
"Layer_3"};
1727 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[0],
"TRKMAP_" + name +
"_" + partB[0], 20, 1., 21., 8, 1., 9.);
1728 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[1],
"TRKMAP_" + name +
"_" + partB[1], 32, 1., 33., 8, 1., 9.);
1729 bei->
book2D(
"TRKMAP_" + name +
"_" + partB[2],
"TRKMAP_" + name +
"_" + partB[2], 44, 1., 45., 8, 1., 9.);
1732 std::string partE[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1733 for(Int_t
p = 0 ;
p <
NCyl ;
p++)
1734 bei->
book2D(
"TRKMAP_" + name +
"_" + partE[
p],
"TRKMAP_" + name +
"_" + partE[p], 24, 1., 25., 7, 1., 8.);
1745 Double_t minB =
mapMin(mapB,
true);
1746 Double_t maxB =
mapMax(mapB,
true);
1752 Double_t minE =
mapMin(mapE,
false);
1753 Double_t maxE =
mapMax(mapE,
false);
1755 Double_t
min = minE<=minB?minE:minB;
1756 Double_t
max = maxE>=maxB?maxE:maxB;
1784 for (vector<string>::const_iterator it = dirLev1.begin(); it != dirLev1.end(); it++)
1790 for (vector<string>::const_iterator it2 = dirLev2.begin(); it2 != dirLev2.end(); it2++)
1796 for (vector<string>::const_iterator it3 = dirLev3.begin(); it3 != dirLev3.end(); it3++)
1807 for (vector<string>::const_iterator it4 = dirLev4.begin(); it4 != dirLev4.end(); it4++)
1816 for (vector<string>::const_iterator it5 = dirLev5.begin(); it5 != dirLev5.end(); it5++)
1842 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
1844 if((*im).find(type +
"_") == string::npos){
1855 Int_t
nbins = histo->GetNbinsX();
1859 map[
i][
j][
k][
l] = histo->GetBinContent(l + 1);
1863 map[
i][
j][
k][
l] = histo->GetEntries();
1867 map[
i][
j][
k][
l] = histo->GetMean();
1874 sum += histo->GetBinContent(
m + 1);
1883 sum += histo->GetBinContent(
m + 1) * histo->GetBinLowEdge(
m + 1);
1903 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1908 cout <<
"Problem: " << fullpath << endl;
1912 for(Int_t
b = 0 ;
b < (10 + 6 *
p);
b++)
1914 me[
p]->getTH2F()->SetBinContent(
b + 1,
i + 1,
map[0][
p][
b][
i]);
1915 me[
p]->getTH2F()->SetBinContent(
b + 1, i + 1 + NModuleB,
map[1][
p][
b][i]);
1916 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1,
map[2][
p][
b][i]);
1917 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1 + NModuleB,
map[3][
p][
b][i]);
1919 me[
p]->getTH2F()->SetMinimum(min);
1920 me[
p]->getTH2F()->SetMaximum(max);
1929 std::string part[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1931 for (Int_t
i = 0;
i <
NCyl;
i++)
1933 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1938 me[
i]->getTH2F()->SetMinimum(min);
1939 me[
i]->getTH2F()->SetMaximum(max);
1942 cout <<
"Problem: " << fullpath << endl;
1945 for(Int_t
c = 0 ;
c <
NCyl ;
c += 2)
1946 for(Int_t d = 0 ; d <
NDisk ; d++)
1948 me[
c + d]->getTH2F()->SetBinContent(
b + 1, 1,
map[
c][d][
b][0]);
1949 me[
c + d]->getTH2F()->SetBinContent(b + 1, 2,
map[
c][d][b][4]);
1950 me[
c + d]->getTH2F()->SetBinContent(b + 1, 3,
map[
c][d][b][1]);
1951 me[
c + d]->getTH2F()->SetBinContent(b + 1, 4,
map[
c][d][b][5]);
1952 me[
c + d]->getTH2F()->SetBinContent(b + 1, 5,
map[
c][d][b][2]);
1953 me[
c + d]->getTH2F()->SetBinContent(b + 1, 6,
map[
c][d][b][6]);
1954 me[
c + d]->getTH2F()->SetBinContent(b + 1, 7,
map[
c][d][b][3]);
1956 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 1,
map[
c + 1][d][b][0]);
1957 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 2,
map[
c + 1][d][b][4]);
1958 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 3,
map[
c + 1][d][b][1]);
1959 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 4,
map[
c + 1][d][b][5]);
1960 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 5,
map[
c + 1][d][b][2]);
1961 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 6,
map[
c + 1][d][b][6]);
1962 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 7,
map[
c + 1][d][b][3]);
1971 Double_t
min =
map[0][0][0][0];
1974 for(Int_t d = 0 ; d < (isBarrel?3:2) ; d++)
1975 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12) ;
b++)
1976 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++){
1977 if(
map[
p][d][
b][
i] < min)
1988 Double_t
max =
map[0][0][0][0];
1991 for(Int_t d = 0 ; d < (isBarrel?3:2); d++)
1992 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12);
b++)
1993 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++)
1994 if(
map[
p][d][
b][
i] > max)
2013 if(
offlineXMLfile_) localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_qualitytest.xml");
2014 else localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
2022 cout <<
" Problem setting up quality tests "<<endl;
2034 int messageCounter=0;
2035 string currDir = bei->
pwd();
2036 vector<string> contentVec;
2041 for (vector<string>::iterator it = contentVec.begin();
2042 it != contentVec.end(); it++) {
2045 if (nval == 0)
continue;
2046 for (vector<string>::const_iterator im = contents.begin();
2047 im != contents.end(); im++) {
2054 for(vector<QReport *>::const_iterator wi = warnings.begin();
2055 wi != warnings.end(); ++wi) {
2062 edm::LogWarning(
"SiPixelActionExecutor::checkQTestResults") <<
" *** Warning for " << me->
getName() <<
","
2063 << (*wi)->getMessage() <<
" " << me->
getMean()
2068 warnings=vector<QReport*>();
2071 for(vector<QReport *>::const_iterator ei = errors.begin();
2072 ei != errors.end(); ++ei) {
2074 float empty_mean = me->
getMean();
2075 float empty_rms = me->
getRMS();
2076 if((empty_mean != 0 && empty_rms != 0) || (
calib_type_ == 0)){
2084 << (*ei)->getMessage() <<
" " << me->
getMean()
2090 errors=vector<QReport*>();
2094 nval=int(); contents=vector<string>();
2096 LogDebug(
"SiPixelActionExecutor::checkQTestResults") <<
"messageCounter: "<<messageCounter<<
" , message_limit: "<<
message_limit_<<endl;
2099 contentVec=vector<string>(); currDir=
string(); messageCounter=int();
2109 string currDir = bei->
pwd();
2110 if (currDir.find(
"Layer") != string::npos) {
2111 string name =
"Default";
2117 for (vector<string>::const_iterator it = subdirs.begin();
2118 it != subdirs.end(); it++) {
2129 static int icount = 0;
2130 string currDir = bei->
pwd();
2131 if (currDir.find(
"Ladder_") != string::npos) {
2135 for (vector<string>::const_iterator im = contents.begin();
2136 im != contents.end(); im++) {
2137 if ((*im).find(
"Clusters") != string::npos) {
2139 if (icount != 0 && icount%6 == 0) {
2142 ostringstream full_path;
2143 full_path <<
"test/" << currDir <<
"/" << *im ;
2144 string element =
"monitorable";
2145 string element_name = full_path.str();
2151 for (vector<string>::const_iterator it = subdirs.begin();
2152 it != subdirs.end(); it++) {
2166 for (vector<string>::iterator it =
tkMapMENames.begin();
2168 names.push_back(*it) ;
2170 return names.size();
2188 string currDir = bei->
pwd();
2191 int fedId=-1;
int linkId=-1;
2192 if (currDir.find(dir_name) != string::npos) {
2194 for (vector<string>::const_iterator it = subdirs.begin();
2195 it != subdirs.end(); it++) {
2196 if ( (*it).find(
"Module_") == string::npos)
continue;
2204 bool first_me =
false;
2206 for (vector<string>::const_iterator im = contents.begin();
2207 im != contents.end(); im++) {
2209 string mEName = (*im);
2210 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2211 std::istringstream isst;
2212 isst.str(detIdString);
2213 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2220 for(
int fedid=0; fedid<=40; ++fedid){
2222 uint32_t newDetId = detId;
2223 if(converter.hasDetUnit(newDetId)){
2228 if(fedId==-1)
continue;
2234 linkId = cabling.
link;
2238 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2242 for (vector<string>::const_iterator it = subdirs.begin();
2243 it != subdirs.end(); it++) {
2244 if((*it).find(
"Endcap")!=string::npos)
continue;
2254 string currDir = bei->
pwd();
2255 string dir_name =
"Panel_";
2257 int fedId=-1;
int linkId=-1;
2258 if (currDir.find(dir_name) != string::npos) {
2260 for (vector<string>::const_iterator it = subdirs.begin();
2261 it != subdirs.end(); it++) {
2262 if ( (*it).find(
"Module_") == string::npos)
continue;
2270 bool first_me =
false;
2272 for (vector<string>::const_iterator im = contents.begin();
2273 im != contents.end(); im++) {
2275 string mEName = (*im);
2276 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2277 std::istringstream isst;
2278 isst.str(detIdString);
2279 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2286 for(
int fedid=0; fedid<=40; ++fedid){
2288 uint32_t newDetId = detId;
2289 if(converter.hasDetUnit(newDetId)){
2294 if(fedId==-1)
continue;
2300 linkId = cabling.
link;
2304 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2308 for (vector<string>::const_iterator it = subdirs.begin();
2309 it != subdirs.end(); it++) {
2310 if((bei->
pwd()).
find(
"Barrel")!=string::npos) bei->
goUp();
2312 if((*it).find(
"Barrel")!=string::npos)
continue;
2336 me = bei->
get(
"Pixel/Barrel/SUMDIG_adc_Barrel");
2338 std::cout<<
"SUMDIG_adc_Barrel: "<<std::endl;
2341 me = bei->
get(
"Pixel/Barrel/SUMDIG_ndigis_Barrel");
2343 std::cout<<
"SUMDIG_ndigis_Barrel: "<<std::endl;
2346 me = bei->
get(
"Pixel/Barrel/SUMCLU_charge_Barrel");
2348 std::cout<<
"SUMCLU_charge_Barrel: "<<std::endl;
2351 me = bei->
get(
"Pixel/Barrel/SUMCLU_nclusters_Barrel");
2353 std::cout<<
"SUMCLU_nclusters_Barrel: "<<std::endl;
2356 me = bei->
get(
"Pixel/Barrel/SUMCLU_size_Barrel");
2358 std::cout<<
"SUMCLU_size_Barrel: "<<std::endl;
2366 me = bei->
get(
"Pixel/Endcap/SUMDIG_adc_Endcap");
2368 std::cout<<
"SUMDIG_adc_Endcap: "<<std::endl;
2371 me = bei->
get(
"Pixel/Endcap/SUMDIG_ndigis_Endcap");
2373 std::cout<<
"SUMDIG_ndigis_Endcap: "<<std::endl;
2376 me = bei->
get(
"Pixel/Endcap/SUMCLU_charge_Endcap");
2378 std::cout<<
"SUMCLU_charge_Endcap: "<<std::endl;
2381 me = bei->
get(
"Pixel/Endcap/SUMCLU_nclusters_Endcap");
2383 std::cout<<
"SUMCLU_nclusters_Endcap: "<<std::endl;
2386 me = bei->
get(
"Pixel/Endcap/SUMCLU_size_Endcap");
2388 std::cout<<
"SUMCLU_size_Endcap: "<<std::endl;
2401 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4,4,20,-10.,10.);
2402 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4,4,32,-16.,16.);
2403 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4,4,44,-22.,22.);
2405 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,20,-10.,10.);
2406 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,32,-16.,16.);
2407 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2410 else if (isUpgrade) {
2412 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;z-side;Ladder",2,-1.,1.,12,-6.,6.);
2413 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;z-side;Ladder",2,-1.,1.,28,-14.,14.);
2414 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;z-side;Ladder",2,-1.,1.,44,-22.,22.);
2415 HitEfficiency_L4 = bei->
book2D(
"HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;z-side;Ladder",2,-1.,1.,64,-32.,32.);
2417 HitEfficiency_L1 = bei->
book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,12,-6.,6.);
2418 HitEfficiency_L2 = bei->
book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,28,-14.,14.);
2419 HitEfficiency_L3 = bei->
book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2420 HitEfficiency_L4 = bei->
book2D(
"HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;Module;Ladder",8,-4.,4.,64,-32.,32.);
2428 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;",24,-12.,12.,1,0.,1.);
2429 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;",24,-12.,12.,1,0.,1.);
2430 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;",24,-12.,12.,1,0.,1.);
2431 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;",24,-12.,12.,1,0.,1.);
2433 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules",24,-12.,12.,7,1.,8.);
2434 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules",24,-12.,12.,7,1.,8.);
2435 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules",24,-12.,12.,7,1.,8.);
2436 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules",24,-12.,12.,7,1.,8.);
2438 }
else if (isUpgrade) {
2440 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;",28,-17.,11.,1,0.,1.);
2441 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;",28,-17.,11.,1,0.,1.);
2442 HitEfficiency_Dp3 = bei->
book2D(
"HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;",28,-17.,11.,1,0.,1.);
2443 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;",28,-17.,11.,1,0.,1.);
2444 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;",28,-17.,11.,1,0.,1.);
2445 HitEfficiency_Dm3 = bei->
book2D(
"HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;",28,-17.,11.,1,0.,1.);
2447 HitEfficiency_Dp1 = bei->
book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules",28,-17.,11.,2,1.,3.);
2448 HitEfficiency_Dp2 = bei->
book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules",28,-17.,11.,2,1.,3.);
2449 HitEfficiency_Dp3 = bei->
book2D(
"HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;Modules",28,-17.,11.,2,1.,3.);
2450 HitEfficiency_Dm1 = bei->
book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules",28,-17.,11.,2,1.,3.);
2451 HitEfficiency_Dm2 = bei->
book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules",28,-17.,11.,2,1.,3.);
2452 HitEfficiency_Dm3 = bei->
book2D(
"HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;Modules",28,-17.,11.,2,1.,3.);
2473 string currDir = bei->
pwd();
2474 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
2478 if(isbarrel && dname.find(
"Ladder_")!=string::npos){
2480 vector<string> meVec = bei->
getMEs();
2481 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2482 string full_path = currDir +
"/" + (*it);
2484 if(full_path.find(
"missingMod_")!=string::npos){
2488 if (!missing)
continue;
2489 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2491 if (!valid)
continue;
2496 if(dname.find(
"01")!=string::npos){ biny = 1;}
else if(dname.find(
"02")!=string::npos){ biny = 2;}
2497 else if(dname.find(
"03")!=string::npos){ biny = 3;}
else if(dname.find(
"04")!=string::npos){ biny = 4;}
2498 else if(dname.find(
"05")!=string::npos){ biny = 5;}
else if(dname.find(
"06")!=string::npos){ biny = 6;}
2499 else if(dname.find(
"07")!=string::npos){ biny = 7;}
else if(dname.find(
"08")!=string::npos){ biny = 8;}
2500 else if(dname.find(
"09")!=string::npos){ biny = 9;}
else if(dname.find(
"10")!=string::npos){ biny = 10;}
2501 else if(dname.find(
"11")!=string::npos){ biny = 11;}
else if(dname.find(
"12")!=string::npos){ biny = 12;}
2502 else if(dname.find(
"13")!=string::npos){ biny = 13;}
else if(dname.find(
"14")!=string::npos){ biny = 14;}
2503 else if(dname.find(
"15")!=string::npos){ biny = 15;}
else if(dname.find(
"16")!=string::npos){ biny = 16;}
2504 else if(dname.find(
"17")!=string::npos){ biny = 17;}
else if(dname.find(
"18")!=string::npos){ biny = 18;}
2505 else if(dname.find(
"19")!=string::npos){ biny = 19;}
else if(dname.find(
"20")!=string::npos){ biny = 20;}
2506 else if(dname.find(
"21")!=string::npos){ biny = 21;}
else if(dname.find(
"22")!=string::npos){ biny = 22;}
2508 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2509 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2510 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2512 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2521 if(currDir.find(
"Shell_m")!=string::npos){ start = 1;}
else{ start = 5;}
2522 for(
int i=start;
i<start+5;
i++){
2523 float hitEfficiency = -1.0;
2524 float missingHits=0;
2528 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2529 if(currDir.find(
"Layer_1")!=string::npos){
2533 else if(currDir.find(
"Layer_2")!=string::npos){
2537 else if(currDir.find(
"Layer_3")!=string::npos){
2547 else if (isUpgrade) {
2548 vector<string> meVec = bei->
getMEs();
2549 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2550 string full_path = currDir +
"/" + (*it);
2551 if(full_path.find(
"missing_")!=string::npos){
2556 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2557 me = bei->
get(new_path);
2561 float hitEfficiency = -1.;
2562 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2564 int binx = 0;
int biny = 0;
2565 if(currDir.find(
"Shell_m")!=string::npos){ binx = 1;}
else{ binx = 2;}
2566 if(dname.find(
"01")!=string::npos){ biny = 1;}
else if(dname.find(
"02")!=string::npos){ biny = 2;}
2567 else if(dname.find(
"03")!=string::npos){ biny = 3;}
else if(dname.find(
"04")!=string::npos){ biny = 4;}
2568 else if(dname.find(
"05")!=string::npos){ biny = 5;}
else if(dname.find(
"06")!=string::npos){ biny = 6;}
2569 else if(dname.find(
"07")!=string::npos){ biny = 7;}
else if(dname.find(
"08")!=string::npos){ biny = 8;}
2570 else if(dname.find(
"09")!=string::npos){ biny = 9;}
else if(dname.find(
"10")!=string::npos){ biny = 10;}
2571 else if(dname.find(
"11")!=string::npos){ biny = 11;}
else if(dname.find(
"12")!=string::npos){ biny = 12;}
2572 else if(dname.find(
"13")!=string::npos){ biny = 13;}
else if(dname.find(
"14")!=string::npos){ biny = 14;}
2573 else if(dname.find(
"15")!=string::npos){ biny = 15;}
else if(dname.find(
"16")!=string::npos){ biny = 16;}
2574 else if(dname.find(
"17")!=string::npos){ biny = 17;}
else if(dname.find(
"18")!=string::npos){ biny = 18;}
2575 else if(dname.find(
"19")!=string::npos){ biny = 19;}
else if(dname.find(
"20")!=string::npos){ biny = 20;}
2576 else if(dname.find(
"21")!=string::npos){ biny = 21;}
else if(dname.find(
"22")!=string::npos){ biny = 22;}
2577 else if(dname.find(
"23")!=string::npos){ biny = 23;}
else if(dname.find(
"24")!=string::npos){ biny = 24;}
2578 else if(dname.find(
"25")!=string::npos){ biny = 25;}
else if(dname.find(
"25")!=string::npos){ biny = 25;}
2579 else if(dname.find(
"26")!=string::npos){ biny = 26;}
else if(dname.find(
"27")!=string::npos){ biny = 27;}
2580 else if(dname.find(
"28")!=string::npos){ biny = 28;}
else if(dname.find(
"29")!=string::npos){ biny = 29;}
2581 else if(dname.find(
"30")!=string::npos){ biny = 30;}
else if(dname.find(
"31")!=string::npos){ biny = 31;}
2582 else if(dname.find(
"32")!=string::npos){ biny = 32;}
2583 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2584 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 6;}
2585 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 14;}
2586 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2587 else if(currDir.find(
"Layer_4")!=string::npos){ biny = biny + 32;}
2589 if(currDir.find(
"Layer_1")!=string::npos){
2593 }
else if(currDir.find(
"Layer_2")!=string::npos){
2596 }
else if(currDir.find(
"Layer_3")!=string::npos){
2599 }
else if(currDir.find(
"Layer_4")!=string::npos){
2606 }
else if(!isbarrel && dname.find(
"Blade_")!=string::npos && !isUpgrade){
2607 vector<string> meVec = bei->
getMEs();
2608 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2609 string full_path = currDir +
"/" + (*it);
2610 if(full_path.find(
"missing_")!=string::npos){
2614 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2615 me = bei->
get(new_path);
2618 float hitEfficiency = -1.;
2619 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2620 int binx = 0;
int biny = 1;
2621 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2622 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2623 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2624 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2625 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2626 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2627 if(currDir.find(
"HalfCylinder_mI")!=string::npos || currDir.find(
"HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2629 if(binx==1) binx = 12;
2630 else if(binx==2) binx = 11;
2631 else if(binx==3) binx = 10;
2632 else if(binx==4) binx = 9;
2633 else if(binx==5) binx = 8;
2634 else if(binx==6) binx = 7;
2635 else if(binx==7) binx = 6;
2636 else if(binx==8) binx = 5;
2637 else if(binx==9) binx = 4;
2638 else if(binx==10) binx = 3;
2639 else if(binx==11) binx = 2;
2640 else if(binx==12) binx = 1;
2642 if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2645 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2648 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2651 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2658 }
else if(!isbarrel && dname.find(
"Blade_")!=string::npos && isUpgrade){
2659 vector<string> meVec = bei->
getMEs();
2660 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2661 string full_path = currDir +
"/" + (*it);
2662 if(full_path.find(
"missing_")!=string::npos){
2666 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2667 me = bei->
get(new_path);
2670 float hitEfficiency = -1.;
2671 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2672 int binx = 0;
int biny = 1;
2673 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2674 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2675 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2676 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2677 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2678 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2679 else if(currDir.find(
"13")!=string::npos){ binx = 13;}
else if(currDir.find(
"14")!=string::npos){ binx = 14;}
2680 else if(currDir.find(
"15")!=string::npos){ binx = 15;}
else if(currDir.find(
"16")!=string::npos){ binx = 16;}
2681 else if(currDir.find(
"17")!=string::npos){ binx = 17;}
2682 if(currDir.find(
"HalfCylinder_mI")!=string::npos || currDir.find(
"HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2684 if(binx==1) binx = 17;
2685 else if(binx==2) binx = 16;
2686 else if(binx==3) binx = 15;
2687 else if(binx==4) binx = 14;
2688 else if(binx==5) binx = 13;
2689 else if(binx==6) binx = 12;
2690 else if(binx==7) binx = 11;
2691 else if(binx==8) binx = 10;
2692 else if(binx==9) binx = 9;
2693 else if(binx==10) binx = 8;
2694 else if(binx==11) binx = 7;
2695 else if(binx==12) binx = 6;
2696 else if(binx==13) binx = 5;
2697 else if(binx==14) binx = 4;
2698 else if(binx==15) binx = 3;
2699 else if(binx==16) binx = 2;
2700 else if(binx==17) binx = 1;
2702 if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2705 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2708 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2711 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2714 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2717 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2727 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2730 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
2737 if(dname.find(
"Module_")!=string::npos){
2738 vector<string> meVec = bei->
getMEs();
2739 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2740 string full_path = currDir +
"/" + (*it);
2741 if(full_path.find(
"missing_")!=string::npos){
2745 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2746 me = bei->
get(new_path);
2749 float hitEfficiency = -1.;
2750 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2751 int binx = 0;
int biny = 0;
2753 if(currDir.find(
"Shell_m")!=string::npos){
2754 if(currDir.find(
"Module_4")!=string::npos){ binx = 1;}
else if(currDir.find(
"Module_3")!=string::npos){ binx = 2;}
2755 if(currDir.find(
"Module_2")!=string::npos){ binx = 3;}
else if(currDir.find(
"Module_1")!=string::npos){ binx = 4;}
2756 }
else if(currDir.find(
"Shell_p")!=string::npos){
2757 if(currDir.find(
"Module_1")!=string::npos){ binx = 5;}
else if(currDir.find(
"Module_2")!=string::npos){ binx = 6;}
2758 if(currDir.find(
"Module_3")!=string::npos){ binx = 7;}
else if(currDir.find(
"Module_4")!=string::npos){ binx = 8;}
2761 if(currDir.find(
"01")!=string::npos){ biny = 1;}
else if(currDir.find(
"02")!=string::npos){ biny = 2;}
2762 else if(currDir.find(
"03")!=string::npos){ biny = 3;}
else if(currDir.find(
"04")!=string::npos){ biny = 4;}
2763 else if(currDir.find(
"05")!=string::npos){ biny = 5;}
else if(currDir.find(
"06")!=string::npos){ biny = 6;}
2764 else if(currDir.find(
"07")!=string::npos){ biny = 7;}
else if(currDir.find(
"08")!=string::npos){ biny = 8;}
2765 else if(currDir.find(
"09")!=string::npos){ biny = 9;}
else if(currDir.find(
"10")!=string::npos){ biny = 10;}
2766 else if(currDir.find(
"11")!=string::npos){ biny = 11;}
else if(currDir.find(
"12")!=string::npos){ biny = 12;}
2767 else if(currDir.find(
"13")!=string::npos){ biny = 13;}
else if(currDir.find(
"14")!=string::npos){ biny = 14;}
2768 else if(currDir.find(
"15")!=string::npos){ biny = 15;}
else if(currDir.find(
"16")!=string::npos){ biny = 16;}
2769 else if(currDir.find(
"17")!=string::npos){ biny = 17;}
else if(currDir.find(
"18")!=string::npos){ biny = 18;}
2770 else if(currDir.find(
"19")!=string::npos){ biny = 19;}
else if(currDir.find(
"20")!=string::npos){ biny = 20;}
2771 else if(currDir.find(
"21")!=string::npos){ biny = 21;}
else if(currDir.find(
"22")!=string::npos){ biny = 22;}
2772 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2773 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2774 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2775 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2778 else if (isUpgrade) {
2779 if(currDir.find(
"01")!=string::npos){ biny = 1;}
else if(currDir.find(
"02")!=string::npos){ biny = 2;}
2780 else if(currDir.find(
"03")!=string::npos){ biny = 3;}
else if(currDir.find(
"04")!=string::npos){ biny = 4;}
2781 else if(currDir.find(
"05")!=string::npos){ biny = 5;}
else if(currDir.find(
"06")!=string::npos){ biny = 6;}
2782 else if(currDir.find(
"07")!=string::npos){ biny = 7;}
else if(currDir.find(
"08")!=string::npos){ biny = 8;}
2783 else if(currDir.find(
"09")!=string::npos){ biny = 9;}
else if(currDir.find(
"10")!=string::npos){ biny = 10;}
2784 else if(currDir.find(
"11")!=string::npos){ biny = 11;}
else if(currDir.find(
"12")!=string::npos){ biny = 12;}
2785 else if(currDir.find(
"13")!=string::npos){ biny = 13;}
else if(currDir.find(
"14")!=string::npos){ biny = 14;}
2786 else if(currDir.find(
"15")!=string::npos){ biny = 15;}
else if(currDir.find(
"16")!=string::npos){ biny = 16;}
2787 else if(currDir.find(
"17")!=string::npos){ biny = 17;}
else if(currDir.find(
"18")!=string::npos){ biny = 18;}
2788 else if(currDir.find(
"19")!=string::npos){ biny = 19;}
else if(currDir.find(
"20")!=string::npos){ biny = 20;}
2789 else if(currDir.find(
"21")!=string::npos){ biny = 21;}
else if(currDir.find(
"22")!=string::npos){ biny = 22;}
2790 else if(currDir.find(
"23")!=string::npos){ biny = 23;}
else if(currDir.find(
"24")!=string::npos){ biny = 24;}
2791 else if(currDir.find(
"25")!=string::npos){ biny = 25;}
else if(currDir.find(
"25")!=string::npos){ biny = 25;}
2792 else if(currDir.find(
"26")!=string::npos){ biny = 26;}
else if(currDir.find(
"27")!=string::npos){ biny = 27;}
2793 else if(currDir.find(
"28")!=string::npos){ biny = 28;}
else if(currDir.find(
"29")!=string::npos){ biny = 29;}
2794 else if(currDir.find(
"30")!=string::npos){ biny = 30;}
else if(currDir.find(
"31")!=string::npos){ biny = 31;}
2795 else if(currDir.find(
"32")!=string::npos){ biny = 32;}
2796 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2797 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 6;}
2798 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 14;}
2799 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2800 else if(currDir.find(
"Layer_4")!=string::npos){ biny = biny + 32;}
2805 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2806 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2807 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2808 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2809 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2810 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2811 if(currDir.find(
"HalfCylinder_mO")!=string::npos || currDir.find(
"HalfCylinder_pO")!=string::npos){ binx = binx + 12;}
2812 if(currDir.find(
"Panel_1/Module_1")!=string::npos){ biny = 1;}
else if(currDir.find(
"Panel_2/Module_1")!=string::npos){ biny = 2;}
2813 else if(currDir.find(
"Panel_1/Module_2")!=string::npos){ biny = 3;}
else if(currDir.find(
"Panel_2/Module_2")!=string::npos){ biny = 4;}
2814 else if(currDir.find(
"Panel_1/Module_3")!=string::npos){ biny = 5;}
else if(currDir.find(
"Panel_2/Module_3")!=string::npos){ biny = 6;}
2815 else if(currDir.find(
"Panel_1/Module_4")!=string::npos){ biny = 7;}
2816 }
else if (isUpgrade) {
2817 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2818 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2819 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2820 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2821 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2822 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2823 else if(currDir.find(
"13")!=string::npos){ binx = 13;}
else if(currDir.find(
"14")!=string::npos){ binx = 14;}
2824 else if(currDir.find(
"15")!=string::npos){ binx = 15;}
else if(currDir.find(
"16")!=string::npos){ binx = 16;}
2825 else if(currDir.find(
"17")!=string::npos){ binx = 17;}
2826 if(currDir.find(
"HalfCylinder_mO")!=string::npos || currDir.find(
"HalfCylinder_pO")!=string::npos){ binx = binx + 17;}
2827 if(currDir.find(
"Panel_1/Module_1")!=string::npos){ biny = 1;}
else if(currDir.find(
"Panel_2/Module_1")!=string::npos){ biny = 2;}
2831 if(currDir.find(
"Layer_1")!=string::npos){
2834 }
else if(currDir.find(
"Layer_2")!=string::npos){
2837 }
else if(currDir.find(
"Layer_3")!=string::npos){
2840 }
else if( isUpgrade && (currDir.find(
"Layer_4")!=string::npos) ){
2843 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2846 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2849 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2852 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2855 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2858 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2867 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2870 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 bookDeviations(DQMStore *bei, bool isUpgrade)
void setBinContent(int binx, double content)
set content of bin (1-D)
tuple start
Check for commandline option errors.
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)
bool init()
Write XML file.
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void fillGrandBarrelSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
MonitorElement * HitEfficiency_Dp3
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 char const * tname
static int getMEList(std::string name, std::vector< std::string > &values)
MonitorElement * HitEfficiency_L4
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
void createEfficiency(DQMStore *bei, bool isUpgrade)
MonitorElement * DEV_nclusters_Barrel
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)
MonitorElement * getSummaryME(DQMStore *bei, std::string me_name, bool isUpgrade)
void bookTrackerMaps(DQMStore *bei, std::string name)
void fillEfficiency(DQMStore *bei, bool isbarrel, bool isUpgrade)
Double_t mapMax(const Double_t map[][3][22][7], bool isBarrel)
void fillSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
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)
SiPixelConfigWriter * configWriter_
tuple path
else: Piece not in the list, fine.
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)
void bookEfficiency(DQMStore *bei, bool isUpgrade)
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 createLayout(DQMStore *bei)
MonitorElement * DEV_charge_Endcap
void fillGrandEndcapSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
void createSummary(DQMStore *bei, bool isUpgrade)
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
MonitorElement * HitEfficiency_Dm3
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)
MonitorElement * DEV_size_Endcap
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 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