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!! ";
191 bei->setCurrentFolder(
"Pixel/");
193 fillSummary(bei, barrel_structure_name, barrel_me_names,
true, isUpgrade);
194 bei->setCurrentFolder(
"Pixel/");
196 string endcap_structure_name;
197 vector<string> endcap_me_names;
199 edm::LogInfo(
"SiPixelActionExecutor") <<
"Failed to read Endcap Summary configuration parameters!! " <<
"\n" ;
205 bei->setCurrentFolder(
"Pixel/");
207 fillSummary(bei, endcap_structure_name, endcap_me_names,
false, isUpgrade);
208 bei->setCurrentFolder(
"Pixel/");
210 bei->setCurrentFolder(
"Pixel/");
213 string federror_structure_name;
214 vector<string> federror_me_names;
216 cout <<
"SiPixelActionExecutor::createSummary: Failed to read FED Error Summary configuration parameters!! ";
219 bei->setCurrentFolder(
"Pixel/");
222 bei->setCurrentFolder(
"Pixel/");
236 if (isUpgrade) {nBPixModules=1184;}
else {nBPixModules=768;}
239 bei->setCurrentFolder(
"Pixel/Barrel");
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);
246 bei->setCurrentFolder(
"Pixel/Endcap");
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();
381 vector<string> panels = bei->getSubdirs();
383 for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
385 modules = bei->getSubdirs();
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" ;
516 vector<string> subdirs = bei->getSubdirs();
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;
528 vector<string>
contents = bei->getMEs();
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();
686 vector<string> subdirs = bei->getSubdirs();
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;
758 vector<string>
contents = bei->getMEs();
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)==
"FedChLErr"||(*iv)==
"FedChNErr"||(*iv)==
"FedETypeNErr")
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)==
"FedChLErr"||(*iv)==
"FedChNErr"||(*iv)==
"FedETypeNErr"){
777 string tag = prefix +
"_" + (*iv);
779 if((*iv)==
"FedChLErr") {
if (!isBooked) temp = bei->book2D(
"FedChLErr",
"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)==
"FedChNErr") {
if (!isBooked) temp = bei->book2D(
"FedChNErr",
"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)==
"FedETypeNErr"){
791 temp = bei->book2D(
"FedETypeNErr",
"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" ;
826 vector<string> subdirs = bei->getSubdirs();
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;
836 vector<string>
contents = bei->getMEs();
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(
"FedChNErr")!=std::string::npos && (*isum)->getName().find(
"FedChNErr")!=std::string::npos) ||
843 ((*im).find(
"FedChLErr")!=std::string::npos && (*isum)->getName().find(
"FedChLErr")!=std::string::npos) ||
844 ((*im).find(
"FedETypeNErr")!=std::string::npos && (*isum)->getName().find(
"FedETypeNErr")!=std::string::npos)){
845 string fullpathname = bei->pwd() +
"/" + (*im);
848 for(
int i=0;
i!=37;
i++){
849 if((*im).find(
"FedETypeNErr")!=std::string::npos &&
i<21) (*isum)->
Fill(ndet-1,
i,me->
getBinContent(
i+1));
854 string sname = ((*isum)->getName());
856 tname = sname.substr(7,(sname.find(
"_",7)-6));
857 if (((*im)).
find(tname) == 0) {
858 string fullpathname = bei->pwd() +
"/" + (*im);
863 if (sname.find(
"_NErrors_")!=string::npos){
864 string path1 = fullpathname;
865 path1 = path1.replace(path1.find(
"NErrors"),7,
"errorType");
869 for(
int jj=1;
jj<16;
jj++){
872 string path2 = path1;
873 path2 = path2.replace(path2.find(
"errorType"),9,
"TBMMessage");
881 }
else (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->
getEntries());
883 (*isum)->setAxisTitle(
"FED #",1);
885 title = sname.substr(7,(sname.find(
"_",7)-7)) +
" per FED";
886 (*isum)->setAxisTitle(title,2);
895 vector<string> subdirs = bei->getSubdirs();
896 for (vector<string>::const_iterator it = subdirs.begin();
897 it != subdirs.end(); it++) {
898 if((*it).find(
"Endcap")!=string::npos ||
899 (*it).find(
"Barrel")!=string::npos)
continue;
911 vector<string>& me_names,
914 vector<MonitorElement*> gsum_mes;
915 string currDir = bei->pwd();
917 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
919 if ((dir_name.find(
"DQMData") == 0) ||
920 (dir_name.find(
"Pixel") == 0) ||
921 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
922 (dir_name.find(
"Endcap") == 0) ||
923 (dir_name.find(
"HalfCylinder") == 0) ||
924 (dir_name.find(
"Disk") == 0) ||
925 (dir_name.find(
"Blade") == 0) ||
926 (dir_name.find(
"Panel") == 0) )
return;
927 vector<string> subdirs = bei->getSubdirs();
928 int nDirs = subdirs.size();
934 bool first_subdir =
true;
935 for (vector<string>::const_iterator it = subdirs.begin();
936 it != subdirs.end(); it++) {
940 vector<string>
contents = bei->getMEs();
954 for (vector<string>::const_iterator im = contents.begin();
955 im != contents.end(); im++) {
957 for (vector<string>::const_iterator iv = me_names.begin();
958 iv != me_names.end(); iv++) {
959 string var =
"_" + (*iv) +
"_";
961 if ((*im).find(var) != string::npos) {
962 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
963 (*im).find(
"Track_")!=string::npos)
continue;
965 string full_path = (*it) +
"/" +(*im);
969 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
970 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
971 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
972 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
974 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
975 (*iv)==
"ndigisFREQ" || (*iv)==
"adcCOMB")
977 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
978 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
979 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
981 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
982 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
983 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
985 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
987 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
988 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
989 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
990 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
991 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
992 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
993 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
994 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
995 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
996 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
997 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
998 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
999 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
1000 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
1001 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
1002 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix" ||
1003 (*iv)==
"SiPixelErrorsCalibDigis_NCalibErrors" )
1013 if (first_subdir && !isUpgrade){
1015 nbin = me->
getTH1F()->GetNbinsX();
1016 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1017 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1018 else if(prefix==
"SUMOFF" && dir_name==
"Barrel") nbin=192;
1019 else if((*iv)==
"adcCOMB") nbin=256;
1020 else if(dir_name==
"Barrel") nbin=768;
1021 else if(prefix==
"SUMOFF" && dir_name.find(
"Shell")!=string::npos) nbin=48;
1022 else if(dir_name.find(
"Shell")!=string::npos) nbin=192;
1023 else nbin=nbin*nDirs;
1026 }
else if (first_subdir && isUpgrade){
1028 nbin = me->
getTH1F()->GetNbinsX();
1029 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1030 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1031 else if(prefix==
"SUMOFF" && dir_name==
"Barrel") nbin=296;
1032 else if((*iv)==
"adcCOMB") nbin=256;
1033 else if(dir_name==
"Barrel") nbin=1184;
1034 else if(prefix==
"SUMOFF" && dir_name.find(
"Shell")!=string::npos) nbin=74;
1035 else if(dir_name.find(
"Shell")!=string::npos) nbin=296;
1036 else nbin=nbin*nDirs;
1054 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1055 igm != gsum_mes.end(); igm++) {
1057 if ((*igm)->getName().find(var) != string::npos) {
1059 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Ladders",1);
1060 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1061 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1062 else (*igm)->setAxisTitle(
"Modules",1);
1067 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Ladder";
1068 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1069 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Ladder";
1070 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix!=
"SUMOFF") title =
"NEvents with digis per Module";
1071 else if((*igm)->getName().find(
"FREQ_") != string::npos && prefix==
"SUMOFF") title =
"NEvents with digis per Ladder/Blade";
1072 else if((*igm)->getName().find(
"adcCOMB_") != string::npos) title =
"NDigis";
1073 else if((*igm)->getName().find(
"chargeCOMB_") != string::npos) title =
"NClusters";
1074 else title =
"mean " + (*iv) +
" per Module";
1075 (*igm)->setAxisTitle(title,2);
1079 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1081 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1083 }
else if((*igm)->getName().find(
"Ladder") != string::npos){
1084 nbin_i=0; nbin_subdir=4;
1085 }
else if((*igm)->getName().find(
"Layer") != string::npos){
1086 nbin_i=(cnt-1)*4; nbin_subdir=4;
1087 }
else if((*igm)->getName().find(
"Shell") != string::npos){
1088 if(prefix!=
"SUMOFF"){
1089 if(iDir==0){ nbin_i=0; nbin_subdir=40; }
1090 else if(iDir==1){ nbin_i=40; nbin_subdir=64; }
1091 else if(iDir==2){ nbin_i=104; nbin_subdir=88; }
1093 if(iDir==0){ nbin_i=0; nbin_subdir=10; }
1094 else if(iDir==1){ nbin_i=10; nbin_subdir=16; }
1095 else if(iDir==2){ nbin_i=26; nbin_subdir=22; }
1097 }
else if((*igm)->getName().find(
"Barrel") != string::npos){
1098 if(prefix!=
"SUMOFF"){
1099 if(iDir==0){ nbin_i=0; nbin_subdir=192; }
1100 else if(iDir==1){ nbin_i=192; nbin_subdir=192; }
1101 else if(iDir==2){ nbin_i=384; nbin_subdir=192; }
1102 else if(iDir==3){ nbin_i=576; nbin_subdir=192; }
1104 if(iDir==0){ nbin_i=0; nbin_subdir=48; }
1105 else if(iDir==1){ nbin_i=48; nbin_subdir=48; }
1106 else if(iDir==2){ nbin_i=96; nbin_subdir=48; }
1107 else if(iDir==3){ nbin_i=144; nbin_subdir=48; }
1110 }
else if (isUpgrade) {
1111 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1113 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1115 }
else if((*igm)->getName().find(
"Ladder") != string::npos){
1116 nbin_i=0; nbin_subdir=4;
1117 }
else if((*igm)->getName().find(
"Layer") != string::npos){
1118 nbin_i=(cnt-1)*4; nbin_subdir=4;
1119 }
else if((*igm)->getName().find(
"Shell") != string::npos){
1120 if(prefix!=
"SUMOFF"){
1121 if(iDir==0){ nbin_i=0; nbin_subdir=24; }
1122 else if(iDir==1){ nbin_i=24; nbin_subdir=56; }
1123 else if(iDir==2){ nbin_i=80; nbin_subdir=88; }
1124 else if(iDir==3){ nbin_i=168; nbin_subdir=128; }
1126 if(iDir==0){ nbin_i=0; nbin_subdir=6; }
1127 else if(iDir==1){ nbin_i=6; nbin_subdir=14; }
1128 else if(iDir==2){ nbin_i=20; nbin_subdir=22; }
1129 else if(iDir==3){ nbin_i=42; nbin_subdir=32; }
1131 }
else if((*igm)->getName().find(
"Barrel") != string::npos){
1132 if(prefix!=
"SUMOFF"){
1133 if(iDir==0){ nbin_i=0; nbin_subdir=296; }
1134 else if(iDir==1){ nbin_i=296; nbin_subdir=296; }
1135 else if(iDir==2){ nbin_i=592; nbin_subdir=296; }
1136 else if(iDir==3){ nbin_i=888; nbin_subdir=296; }
1137 else if(iDir==4){ nbin_i=1184; nbin_subdir=296; }
1139 if(iDir==0){ nbin_i=0; nbin_subdir=74; }
1140 else if(iDir==1){ nbin_i=74; nbin_subdir=74; }
1141 else if(iDir==2){ nbin_i=148; nbin_subdir=74; }
1142 else if(iDir==3){ nbin_i=222; nbin_subdir=74; }
1143 else if(iDir==4){ nbin_i=296; nbin_subdir=74; }
1148 if((*igm)->getName().find(
"ndigisFREQ")==string::npos)
1150 if(((*igm)->getName().find(
"adcCOMB")!=string::npos && me->
getName().find(
"adcCOMB")!=string::npos)
1151 || ((*igm)->getName().find(
"chargeCOMB")!=string::npos && me->
getName().find(
"chargeCOMB")!=string::npos))
1153 (*igm)->getTH1F()->Add(me->
getTH1F());
1154 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1155 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1156 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1157 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1158 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1159 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1160 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1161 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1162 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1163 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1164 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1165 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1166 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1167 (*igm)->getName().find(
"size_")==string::npos)){
1171 else if(me->
getName().find(
"ndigisFREQ")!=string::npos)
1181 first_subdir =
false;
1188 vector<string>& me_names,
1191 vector<MonitorElement*> gsum_mes;
1192 string currDir = bei->pwd();
1194 string dir_name = path_name.substr(path_name.find_last_of(
"/")+1);
1195 if ((dir_name.find(
"DQMData") == 0) ||
1196 (dir_name.find(
"Pixel") == 0) ||
1197 (dir_name.find(
"AdditionalPixelErrors") == 0) ||
1198 (dir_name.find(
"Barrel") == 0) ||
1199 (dir_name.find(
"Shell") == 0) ||
1200 (dir_name.find(
"Layer") == 0) ||
1201 (dir_name.find(
"Ladder") == 0) )
return;
1202 vector<string> subdirs = bei->getSubdirs();
1206 int nbin_subdir = 0;
1208 bool first_subdir =
true;
1209 for (vector<string>::const_iterator it = subdirs.begin();
1210 it != subdirs.end(); it++) {
1213 vector<string>
contents = bei->getMEs();
1225 for (vector<string>::const_iterator im = contents.begin();
1226 im != contents.end(); im++) {
1227 for (vector<string>::const_iterator iv = me_names.begin();
1228 iv != me_names.end(); iv++) {
1229 string var =
"_" + (*iv) +
"_";
1230 if ((*im).find(var) != string::npos) {
1231 if((var==
"_charge_" || var==
"_nclusters_" || var==
"_size_" || var==
"_sizeX_" || var==
"_sizeY_") &&
1232 (*im).find(
"Track_")!=string::npos)
continue;
1233 string full_path = (*it) +
"/" +(*im);
1237 if((*iv)==
"errorType"||(*iv)==
"NErrors"||(*iv)==
"fullType"||(*iv)==
"chanNmbr"||
1238 (*iv)==
"TBMType"||(*iv)==
"EvtNbr"||(*iv)==
"evtSize"||(*iv)==
"linkId"||
1239 (*iv)==
"ROCId"||(*iv)==
"DCOLId"||(*iv)==
"PXId"||(*iv)==
"ROCNmbr"||
1240 (*iv)==
"TBMMessage"||(*iv)==
"Type36Hitmap")
1242 else if((*iv)==
"ndigis"||(*iv)==
"adc" ||
1243 (*iv)==
"ndigisFREQ"||(*iv)==
"adcCOMB")
1245 else if((*iv)==
"nclusters"||(*iv)==
"x"||(*iv)==
"y"||(*iv)==
"charge"||(*iv)==
"chargeCOMB"||
1246 (*iv)==
"size"||(*iv)==
"sizeX"||(*iv)==
"sizeY"||(*iv)==
"minrow"||
1247 (*iv)==
"maxrow"||(*iv)==
"mincol"||(*iv)==
"maxcol")
1249 if(currDir.find(
"Track")!=string::npos) prefix=
"SUMTRK";
1250 else if((*iv)==
"residualX_mean"||(*iv)==
"residualY_mean"||
1251 (*iv)==
"residualX_RMS"||(*iv)==
"residualY_RMS")
1253 else if((*iv)==
"ClustX"||(*iv)==
"ClustY"||(*iv)==
"nRecHits"||(*iv)==
"ErrorX"||(*iv)==
"ErrorY")
1255 else if((*iv)==
"Gain1d_mean"||(*iv)==
"GainChi2NDF1d_mean"||
1256 (*iv)==
"GainChi2Prob1d_mean"||(*iv)==
"Pedestal1d_mean"||
1257 (*iv)==
"ScurveChi2ProbSummary_mean"||(*iv)==
"ScurveFitResultSummary_mean"||
1258 (*iv)==
"ScurveSigmasSummary_mean"||(*iv)==
"ScurveThresholdSummary_mean"||
1259 (*iv)==
"Gain1d_RMS"||(*iv)==
"GainChi2NDF1d_RMS"||
1260 (*iv)==
"GainChi2Prob1d_RMS"||(*iv)==
"Pedestal1d_RMS"||
1261 (*iv)==
"GainNPoints1d_mean" || (*iv)==
"GainNPoints1d_RMS" ||
1262 (*iv)==
"GainHighPoint1d_mean" || (*iv)==
"GainHighPoint1d_RMS" ||
1263 (*iv)==
"GainLowPoint1d_mean" || (*iv)==
"GainLowPoint1d_RMS" ||
1264 (*iv)==
"GainEndPoint1d_mean" || (*iv)==
"GainEndPoint1d_RMS" ||
1265 (*iv)==
"GainFitResult2d_mean" || (*iv)==
"GainFitResult2d_RMS" ||
1266 (*iv)==
"GainDynamicRange2d_mean" || (*iv)==
"GainDynamicRange2d_RMS" ||
1267 (*iv)==
"GainSaturate2d_mean" || (*iv)==
"GainSaturate2d_RMS" ||
1268 (*iv)==
"ScurveChi2ProbSummary_RMS"||(*iv)==
"ScurveFitResultSummary_RMS"||
1269 (*iv)==
"ScurveSigmasSummary_RMS"||(*iv)==
"ScurveThresholdSummary_RMS"||
1270 (*iv)==
"pixelAliveSummary_mean"||(*iv)==
"pixelAliveSummary_FracOfPerfectPix"||
1271 (*iv) ==
"SiPixelErrorsCalibDigis_NCalibErrors")
1280 if (first_subdir && !isUpgrade){
1282 nbin = me->
getTH1F()->GetNbinsX();
1283 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1284 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1285 else if(prefix==
"SUMOFF" && dir_name==
"Endcap") nbin=96;
1286 else if(dir_name==
"Endcap") nbin=672;
1287 else if(prefix==
"SUMOFF" && dir_name.find(
"HalfCylinder")!=string::npos) nbin=24;
1288 else if(dir_name.find(
"HalfCylinder")!=string::npos) nbin=168;
1289 else if(prefix==
"SUMOFF" && dir_name.find(
"Disk")!=string::npos) nbin=12;
1290 else if(dir_name.find(
"Disk")!=string::npos) nbin=84;
1291 else if(dir_name.find(
"Blade")!=string::npos) nbin=7;
1296 }
else if(first_subdir && isUpgrade){
1297 nbin = me->
getTH1F()->GetNbinsX();
1298 string me_name = prefix +
"_" + (*iv) +
"_" +
dir_name;
1299 if((*iv)==
"adcCOMB"||(*iv)==
"chargeCOMB") me_name =
"ALLMODS_" + (*iv) +
"_" +
dir_name;
1300 else if(prefix==
"SUMOFF" && dir_name==
"Endcap") nbin=336;
1301 else if(dir_name==
"Endcap") nbin=672;
1302 else if(prefix==
"SUMOFF" && dir_name.find(
"HalfCylinder")!=string::npos) nbin=84;
1303 else if(dir_name.find(
"HalfCylinder")!=string::npos) nbin=168;
1304 else if(prefix==
"SUMOFF" && dir_name.find(
"Disk")!=string::npos) nbin=28;
1305 else if(dir_name.find(
"Disk")!=string::npos) nbin=56;
1306 else if(dir_name.find(
"Blade")!=string::npos) nbin=2;
1323 for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1324 igm != gsum_mes.end(); igm++) {
1325 if ((*igm)->getName().find(var) != string::npos) {
1326 if(prefix==
"SUMOFF") (*igm)->setAxisTitle(
"Blades",1);
1327 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Digi charge [ADC]",1);
1328 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) (*igm)->setAxisTitle(
"Cluster charge [kilo electrons]",1);
1329 else (*igm)->setAxisTitle(
"Modules",1);
1331 if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMOFF") title =
"Total number of errors per Blade";
1332 else if((*igm)->getName().find(
"NErrors_") != string::npos && prefix==
"SUMRAW") title =
"Total number of errors per Module";
1333 else if(prefix==
"SUMOFF") title =
"mean " + (*iv) +
" per Blade";
1334 else if((*igm)->getName().find(
"FREQ_") != string::npos) title =
"NEvents with digis per Module";
1335 else if((*igm)->getName().find(
"adcCOMB_")!=string::npos) title =
"NDigis";
1336 else if((*igm)->getName().find(
"chargeCOMB_")!=string::npos) title =
"NClusters";
1337 else title =
"mean " + (*iv) +
" per Module";
1338 (*igm)->setAxisTitle(title,2);
1341 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1343 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1345 }
else if((*igm)->getName().find(
"Panel_") != string::npos){
1351 }
else if((*igm)->getName().find(
"Blade") != string::npos){
1352 if((*im).find(
"_1") != string::npos) nbin_subdir=4;
1353 if((*im).find(
"_2") != string::npos) {nbin_i=4; nbin_subdir=3;}
1354 }
else if((*igm)->getName().find(
"Disk") != string::npos){
1355 nbin_i=((cnt-1)%12)*7; nbin_subdir=7;
1356 }
else if((*igm)->getName().find(
"HalfCylinder") != string::npos){
1357 if(prefix!=
"SUMOFF"){
1359 if((*im).find(
"_2") != string::npos) nbin_i=84;
1362 if((*im).find(
"_2") != string::npos) nbin_i=12;
1364 }
else if((*igm)->getName().find(
"Endcap") != string::npos){
1365 if(prefix!=
"SUMOFF"){
1367 if((*im).find(
"_mO") != string::npos) nbin_i=168;
1368 if((*im).find(
"_pI") != string::npos) nbin_i=336;
1369 if((*im).find(
"_pO") != string::npos) nbin_i=504;
1372 if((*im).find(
"_mO") != string::npos) nbin_i=24;
1373 if((*im).find(
"_pI") != string::npos) nbin_i=48;
1374 if((*im).find(
"_pO") != string::npos) nbin_i=72;
1377 }
else if (isUpgrade) {
1378 if((*igm)->getName().find(
"ALLMODS_adcCOMB_")!=string::npos){
1380 }
else if((*igm)->getName().find(
"ALLMODS_chargeCOMB_")!=string::npos){
1382 }
else if((*igm)->getName().find(
"Panel_") != string::npos){
1388 }
else if((*igm)->getName().find(
"Blade") != string::npos){
1389 if((*im).find(
"_1") != string::npos) nbin_subdir=1;
1390 if((*im).find(
"_2") != string::npos) {nbin_i=1; nbin_subdir=1;}
1391 }
else if((*igm)->getName().find(
"Disk") != string::npos){
1392 nbin_i=((cnt-1)%28)*2; nbin_subdir=2;
1393 }
else if((*igm)->getName().find(
"HalfCylinder") != string::npos){
1394 if(prefix!=
"SUMOFF"){
1396 if((*im).find(
"_2") != string::npos) nbin_i=56;
1397 if((*im).find(
"_3") != string::npos) nbin_i=112;
1400 if((*im).find(
"_2") != string::npos) nbin_i=28;
1401 if((*im).find(
"_3") != string::npos) nbin_i=56;
1403 }
else if((*igm)->getName().find(
"Endcap") != string::npos){
1404 if(prefix!=
"SUMOFF"){
1406 if((*im).find(
"_mO") != string::npos) nbin_i=168;
1407 if((*im).find(
"_pI") != string::npos) nbin_i=336;
1408 if((*im).find(
"_pO") != string::npos) nbin_i=504;
1411 if((*im).find(
"_mO") != string::npos) nbin_i=84;
1412 if((*im).find(
"_pI") != string::npos) nbin_i=168;
1413 if((*im).find(
"_pO") != string::npos) nbin_i=252;
1419 if((*igm)->getName().find(
"ndigisFREQ")==string::npos){
1420 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)){
1421 (*igm)->getTH1F()->Add(me->
getTH1F());
1422 }
else if(((*igm)->getName().find(
"charge_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1423 me->
getName().find(
"charge_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1424 ((*igm)->getName().find(
"nclusters_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1425 me->
getName().find(
"nclusters_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1426 ((*igm)->getName().find(
"size_")!=string::npos && (*igm)->getName().find(
"Track_")==string::npos &&
1427 me->
getName().find(
"size_")!=string::npos && me->
getName().find(
"Track_")==string::npos) ||
1428 ((*igm)->getName().find(
"charge_OffTrack_")!=string::npos && me->
getName().find(
"charge_OffTrack_")!=string::npos) ||
1429 ((*igm)->getName().find(
"nclusters_OffTrack_")!=string::npos && me->
getName().find(
"nclusters_OffTrack_")!=string::npos) ||
1430 ((*igm)->getName().find(
"size_OffTrack_")!=string::npos && me->
getName().find(
"size_OffTrack_")!=string::npos) ||
1431 ((*igm)->getName().find(
"charge_OnTrack_")!=string::npos && me->
getName().find(
"charge_OnTrack_")!=string::npos) ||
1432 ((*igm)->getName().find(
"nclusters_OnTrack_")!=string::npos && me->
getName().find(
"nclusters_OnTrack_")!=string::npos) ||
1433 ((*igm)->getName().find(
"size_OnTrack_")!=string::npos && me->
getName().find(
"size_OnTrack_")!=string::npos) ||
1434 ((*igm)->getName().find(
"charge_")==string::npos && (*igm)->getName().find(
"nclusters_")==string::npos &&
1435 (*igm)->getName().find(
"size_")==string::npos)){
1438 }
else if(me->
getName().find(
"ndigisFREQ")!=string::npos){
1450 first_subdir =
false;
1460 vector<MonitorElement*> & mes) {
1462 if((bei->pwd()).
find(
"Pixel")==string::npos)
return;
1463 vector<string>
contents = bei->getMEs();
1465 for (vector<string>::const_iterator it = contents.begin();
1466 it != contents.end(); it++) {
1468 if ((*it).find(me_name) == 0) {
1469 string fullpathname = bei->pwd() +
"/" + me_name;
1486 if(me_name.find(
"ALLMODS_adcCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),128,0,256);
1487 else if(me_name.find(
"ALLMODS_chargeCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),100,0,200);
1488 else temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1489 if (temp_me) mes.push_back(temp_me);
1504 if((bei->pwd()).
find(
"Pixel")==string::npos)
return me;
1505 vector<string>
contents = bei->getMEs();
1507 for (vector<string>::const_iterator it = contents.begin();
1508 it != contents.end(); it++) {
1509 if ((*it).find(me_name) == 0) {
1510 string fullpathname = bei->pwd() +
"/" + (*it);
1511 me = bei->get(fullpathname);
1530 if(me_name.find(
"SUMOFF")==string::npos){
1531 if(me_name.find(
"Blade_")!=string::npos)me = bei->book1D(me_name.c_str(), me_name.c_str(),7,1.,8.);
1532 else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1535 }
else if(me_name.find(
"Layer_1")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),10,1.,11.);
1536 }
else if(me_name.find(
"Layer_2")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),16,1.,17.);
1537 }
else if(me_name.find(
"Layer_3")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1538 }
else if(me_name.find(
"Disk_")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),12,1.,13.);
1541 else if (isUpgrade) {
1542 if(me_name.find(
"SUMOFF")==string::npos){
1543 if(me_name.find(
"Blade_")!=string::npos)me = bei->book1D(me_name.c_str(), me_name.c_str(),2,1.,3.);
1544 else me = bei->book1D(me_name.c_str(), me_name.c_str(),1,1.,2.);
1547 }
else if(me_name.find(
"Layer_1")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),6,1.,7.);
1548 }
else if(me_name.find(
"Layer_2")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),14,1.,15.);
1549 }
else if(me_name.find(
"Layer_3")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1550 }
else if(me_name.find(
"Layer_4")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),32,1.,33.);
1551 }
else if(me_name.find(
"Disk_")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),28,1.,29.);
1569 if((bei->pwd()).
find(
"Pixel")==string::npos)
return me;
1570 vector<string>
contents = bei->getMEs();
1572 for (vector<string>::const_iterator it = contents.begin();
1573 it != contents.end(); it++) {
1574 if ((*it).find(me_name) == 0) {
1575 string fullpathname = bei->pwd() +
"/" + (*it);
1577 me = bei->get(fullpathname);
1587 me = bei->book1D(me_name.c_str(), me_name.c_str(),40,-0.5,39.5);
1597 vector<string> subdirs = bei->getSubdirs();
1598 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1600 if(isbarrel && (*it).find(
"Barrel")==string::npos)
continue;
1601 if(!isbarrel && (*it).find(
"Endcap")==string::npos)
continue;
1603 if((*it).find(
"Module_")!=string::npos)
continue;
1604 if((*it).find(
"Panel_")!=string::npos)
continue;
1605 if((*it).find(
"Ladder_")!=string::npos)
continue;
1606 if((*it).find(
"Blade_")!=string::npos)
continue;
1607 if((*it).find(
"Layer_")!=string::npos)
continue;
1608 if((*it).find(
"Disk_")!=string::npos)
continue;
1613 OccupancyMap = bei->book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
1616 OccupancyMap = bei->book2D((isbarrel?
"barrelOccupancyMap":
"endcapOccupancyMap"),
"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
1634 bei->setCurrentFolder(
"Pixel");
1639 bei->setCurrentFolder(
"Pixel");
1661 string currDir = bei->pwd();
1662 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
1665 if(dname.find(
"Layer_")!=string::npos || dname.find(
"Disk_")!=string::npos){
1666 vector<string> meVec = bei->getMEs();
1667 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1668 string full_path = currDir +
"/" + (*it);
1669 if(full_path.find(
"hitmap_siPixelDigis")!=string::npos){
1673 string path = full_path;
1674 while (path.find_last_of(
"/") != 5)
1676 path = path.substr(0,path.find_last_of(
"/"));
1678 OccupancyMap = bei->get(path +
"/" + (isbarrel?
"barrel":
"endcap") +
"OccupancyMap");
1695 vector<string> subdirs = bei->getSubdirs();
1696 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1699 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
1717 bei->setCurrentFolder(
"Pixel/Barrel");
1718 std::string partB[] = {
"Layer_1",
"Layer_2",
"Layer_3"};
1719 bei->book2D(
"TRKMAP_" + name +
"_" + partB[0],
"TRKMAP_" + name +
"_" + partB[0], 20, 1., 21., 8, 1., 9.);
1720 bei->book2D(
"TRKMAP_" + name +
"_" + partB[1],
"TRKMAP_" + name +
"_" + partB[1], 32, 1., 33., 8, 1., 9.);
1721 bei->book2D(
"TRKMAP_" + name +
"_" + partB[2],
"TRKMAP_" + name +
"_" + partB[2], 44, 1., 45., 8, 1., 9.);
1723 bei->setCurrentFolder(
"Pixel/Endcap");
1724 std::string partE[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1725 for(Int_t
p = 0 ;
p <
NCyl ;
p++)
1726 bei->book2D(
"TRKMAP_" + name +
"_" + partE[
p],
"TRKMAP_" + name +
"_" + partE[p], 24, 1., 25., 7, 1., 8.);
1735 bei->setCurrentFolder(
"Pixel/Barrel/");
1737 Double_t minB =
mapMin(mapB,
true);
1738 Double_t maxB =
mapMax(mapB,
true);
1742 bei->setCurrentFolder(
"Pixel/Endcap/");
1744 Double_t minE =
mapMin(mapE,
false);
1745 Double_t maxE =
mapMax(mapE,
false);
1747 Double_t
min = minE<=minB?minE:minB;
1748 Double_t
max = maxE>=maxB?maxE:maxB;
1760 bei->setCurrentFolder(
"Pixel/Barrel");
1762 bei->setCurrentFolder(
"Pixel/Endcap");
1774 vector<string> dirLev1 = bei->getSubdirs();
1776 for (vector<string>::const_iterator it = dirLev1.begin(); it != dirLev1.end(); it++)
1780 vector<string> dirLev2 = bei->getSubdirs();
1782 for (vector<string>::const_iterator it2 = dirLev2.begin(); it2 != dirLev2.end(); it2++)
1787 vector<string> dirLev3 = bei->getSubdirs();
1788 for (vector<string>::const_iterator it3 = dirLev3.begin(); it3 != dirLev3.end(); it3++)
1798 vector<string> dirLev4 = bei->getSubdirs();
1799 for (vector<string>::const_iterator it4 = dirLev4.begin(); it4 != dirLev4.end(); it4++)
1807 vector<string> dirLev5 = bei->getSubdirs();
1808 for (vector<string>::const_iterator it5 = dirLev5.begin(); it5 != dirLev5.end(); it5++)
1833 vector<string>
contents = bei->getMEs();
1834 for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
1836 if((*im).find(type +
"_") == string::npos){
1841 std::string fullpathname = bei->pwd() +
"/" + (*im);
1847 Int_t
nbins = histo->GetNbinsX();
1851 map[
i][
j][
k][
l] = histo->GetBinContent(l + 1);
1855 map[
i][
j][
k][
l] = histo->GetEntries();
1859 map[
i][
j][
k][
l] = histo->GetMean();
1866 sum += histo->GetBinContent(
m + 1);
1875 sum += histo->GetBinContent(
m + 1) * histo->GetBinLowEdge(
m + 1);
1895 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1900 cout <<
"Problem: " << fullpath << endl;
1904 for(Int_t
b = 0 ;
b < (10 + 6 *
p);
b++)
1906 me[
p]->getTH2F()->SetBinContent(
b + 1,
i + 1,
map[0][
p][
b][
i]);
1907 me[
p]->getTH2F()->SetBinContent(
b + 1, i + 1 + NModuleB,
map[1][
p][
b][i]);
1908 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1,
map[2][
p][
b][i]);
1909 me[
p]->getTH2F()->SetBinContent(
b + 1 + 10 + 6 *
p, i + 1 + NModuleB,
map[3][
p][
b][i]);
1911 me[
p]->getTH2F()->SetMinimum(min);
1912 me[
p]->getTH2F()->SetMaximum(max);
1921 std::string part[] = {
"Disc_1_M",
"Disc_2_M",
"Disc_1_P",
"Disc_2_P" };
1923 for (Int_t
i = 0;
i <
NCyl;
i++)
1925 std::string fullpath = path +
"/" +
"TRKMAP_" + name +
"_" + part[
i];
1930 me[
i]->getTH2F()->SetMinimum(min);
1931 me[
i]->getTH2F()->SetMaximum(max);
1934 cout <<
"Problem: " << fullpath << endl;
1937 for(Int_t
c = 0 ;
c <
NCyl ;
c += 2)
1938 for(Int_t d = 0 ; d <
NDisk ; d++)
1940 me[
c + d]->getTH2F()->SetBinContent(
b + 1, 1,
map[
c][d][
b][0]);
1941 me[
c + d]->getTH2F()->SetBinContent(b + 1, 2,
map[
c][d][b][4]);
1942 me[
c + d]->getTH2F()->SetBinContent(b + 1, 3,
map[
c][d][b][1]);
1943 me[
c + d]->getTH2F()->SetBinContent(b + 1, 4,
map[
c][d][b][5]);
1944 me[
c + d]->getTH2F()->SetBinContent(b + 1, 5,
map[
c][d][b][2]);
1945 me[
c + d]->getTH2F()->SetBinContent(b + 1, 6,
map[
c][d][b][6]);
1946 me[
c + d]->getTH2F()->SetBinContent(b + 1, 7,
map[
c][d][b][3]);
1948 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 1,
map[
c + 1][d][b][0]);
1949 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 2,
map[
c + 1][d][b][4]);
1950 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 3,
map[
c + 1][d][b][1]);
1951 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 4,
map[
c + 1][d][b][5]);
1952 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 5,
map[
c + 1][d][b][2]);
1953 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 6,
map[
c + 1][d][b][6]);
1954 me[
c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 7,
map[
c + 1][d][b][3]);
1963 Double_t
min =
map[0][0][0][0];
1966 for(Int_t d = 0 ; d < (isBarrel?3:2) ; d++)
1967 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12) ;
b++)
1968 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++){
1969 if(
map[
p][d][
b][
i] < min)
1980 Double_t
max =
map[0][0][0][0];
1983 for(Int_t d = 0 ; d < (isBarrel?3:2); d++)
1984 for(Int_t
b = 0 ;
b < (isBarrel?(d*6+10):12);
b++)
1985 for(Int_t
i = 0 ;
i < (isBarrel?4:7);
i++)
1986 if(
map[
p][d][
b][
i] > max)
2005 if(
offlineXMLfile_) localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_qualitytest.xml");
2006 else localPath =
string(
"DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
2014 cout <<
" Problem setting up quality tests "<<endl;
2026 int messageCounter=0;
2027 string currDir = bei->pwd();
2028 vector<string> contentVec;
2029 bei->getContents(contentVec);
2033 for (vector<string>::iterator it = contentVec.begin();
2034 it != contentVec.end(); it++) {
2037 if (nval == 0)
continue;
2038 for (vector<string>::const_iterator im = contents.begin();
2039 im != contents.end(); im++) {
2046 for(vector<QReport *>::const_iterator wi = warnings.begin();
2047 wi != warnings.end(); ++wi) {
2054 edm::LogWarning(
"SiPixelActionExecutor::checkQTestResults") <<
" *** Warning for " << me->
getName() <<
","
2055 << (*wi)->getMessage() <<
" " << me->
getMean()
2060 warnings=vector<QReport*>();
2063 for(vector<QReport *>::const_iterator ei = errors.begin();
2064 ei != errors.end(); ++ei) {
2066 float empty_mean = me->
getMean();
2067 float empty_rms = me->
getRMS();
2068 if((empty_mean != 0 && empty_rms != 0) || (
calib_type_ == 0)){
2076 << (*ei)->getMessage() <<
" " << me->
getMean()
2082 errors=vector<QReport*>();
2086 nval=int(); contents=vector<string>();
2088 LogDebug(
"SiPixelActionExecutor::checkQTestResults") <<
"messageCounter: "<<messageCounter<<
" , message_limit: "<<
message_limit_<<endl;
2091 contentVec=vector<string>(); currDir=
string(); messageCounter=int();
2101 string currDir = bei->pwd();
2102 if (currDir.find(
"Layer") != string::npos) {
2103 string name =
"Default";
2108 vector<string> subdirs = bei->getSubdirs();
2109 for (vector<string>::const_iterator it = subdirs.begin();
2110 it != subdirs.end(); it++) {
2121 static int icount = 0;
2122 string currDir = bei->pwd();
2123 if (currDir.find(
"Ladder_") != string::npos) {
2125 vector<string>
contents = bei->getMEs();
2127 for (vector<string>::const_iterator im = contents.begin();
2128 im != contents.end(); im++) {
2129 if ((*im).find(
"Clusters") != string::npos) {
2131 if (icount != 0 && icount%6 == 0) {
2134 ostringstream full_path;
2135 full_path <<
"test/" << currDir <<
"/" << *im ;
2136 string element =
"monitorable";
2137 string element_name = full_path.str();
2142 vector<string> subdirs = bei->getSubdirs();
2143 for (vector<string>::const_iterator it = subdirs.begin();
2144 it != subdirs.end(); it++) {
2158 for (vector<string>::iterator it =
tkMapMENames.begin();
2160 names.push_back(*it) ;
2162 return names.size();
2180 string currDir = bei->pwd();
2183 int fedId=-1;
int linkId=-1;
2184 if (currDir.find(dir_name) != string::npos) {
2185 vector<string> subdirs = bei->getSubdirs();
2186 for (vector<string>::const_iterator it = subdirs.begin();
2187 it != subdirs.end(); it++) {
2188 if ( (*it).find(
"Module_") == string::npos)
continue;
2195 vector<string>
contents = bei->getMEs();
2196 bool first_me =
false;
2198 for (vector<string>::const_iterator im = contents.begin();
2199 im != contents.end(); im++) {
2201 string mEName = (*im);
2202 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2203 std::istringstream isst;
2204 isst.str(detIdString);
2205 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2212 for(
int fedid=0; fedid<=40; ++fedid){
2214 uint32_t newDetId = detId;
2215 if(converter.hasDetUnit(newDetId)){
2220 if(fedId==-1)
continue;
2226 linkId = cabling.
link;
2230 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2233 vector<string> subdirs = bei->getSubdirs();
2234 for (vector<string>::const_iterator it = subdirs.begin();
2235 it != subdirs.end(); it++) {
2236 if((*it).find(
"Endcap")!=string::npos)
continue;
2246 string currDir = bei->pwd();
2247 string dir_name =
"Panel_";
2249 int fedId=-1;
int linkId=-1;
2250 if (currDir.find(dir_name) != string::npos) {
2251 vector<string> subdirs = bei->getSubdirs();
2252 for (vector<string>::const_iterator it = subdirs.begin();
2253 it != subdirs.end(); it++) {
2254 if ( (*it).find(
"Module_") == string::npos)
continue;
2261 vector<string>
contents = bei->getMEs();
2262 bool first_me =
false;
2264 for (vector<string>::const_iterator im = contents.begin();
2265 im != contents.end(); im++) {
2267 string mEName = (*im);
2268 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
2269 std::istringstream isst;
2270 isst.str(detIdString);
2271 if(mEName.find(
"_3")!=string::npos) isst>>detId;
2278 for(
int fedid=0; fedid<=40; ++fedid){
2280 uint32_t newDetId = detId;
2281 if(converter.hasDetUnit(newDetId)){
2286 if(fedId==-1)
continue;
2292 linkId = cabling.
link;
2296 cout<<
" "<<fedId<<
" "<<linkId<<endl;
2299 vector<string> subdirs = bei->getSubdirs();
2300 for (vector<string>::const_iterator it = subdirs.begin();
2301 it != subdirs.end(); it++) {
2302 if((bei->pwd()).
find(
"Barrel")!=string::npos) bei->goUp();
2304 if((*it).find(
"Barrel")!=string::npos)
continue;
2328 me = bei->get(
"Pixel/Barrel/SUMDIG_adc_Barrel");
2330 std::cout<<
"SUMDIG_adc_Barrel: "<<std::endl;
2333 me = bei->get(
"Pixel/Barrel/SUMDIG_ndigis_Barrel");
2335 std::cout<<
"SUMDIG_ndigis_Barrel: "<<std::endl;
2338 me = bei->get(
"Pixel/Barrel/SUMCLU_charge_Barrel");
2340 std::cout<<
"SUMCLU_charge_Barrel: "<<std::endl;
2343 me = bei->get(
"Pixel/Barrel/SUMCLU_nclusters_Barrel");
2345 std::cout<<
"SUMCLU_nclusters_Barrel: "<<std::endl;
2348 me = bei->get(
"Pixel/Barrel/SUMCLU_size_Barrel");
2350 std::cout<<
"SUMCLU_size_Barrel: "<<std::endl;
2358 me = bei->get(
"Pixel/Endcap/SUMDIG_adc_Endcap");
2360 std::cout<<
"SUMDIG_adc_Endcap: "<<std::endl;
2363 me = bei->get(
"Pixel/Endcap/SUMDIG_ndigis_Endcap");
2365 std::cout<<
"SUMDIG_ndigis_Endcap: "<<std::endl;
2368 me = bei->get(
"Pixel/Endcap/SUMCLU_charge_Endcap");
2370 std::cout<<
"SUMCLU_charge_Endcap: "<<std::endl;
2373 me = bei->get(
"Pixel/Endcap/SUMCLU_nclusters_Endcap");
2375 std::cout<<
"SUMCLU_nclusters_Endcap: "<<std::endl;
2378 me = bei->get(
"Pixel/Endcap/SUMCLU_size_Endcap");
2380 std::cout<<
"SUMCLU_size_Endcap: "<<std::endl;
2390 bei->setCurrentFolder(
"Pixel/Barrel");
2393 HitEfficiency_L1 = bei->book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4,4,20,-10.,10.);
2394 HitEfficiency_L2 = bei->book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4,4,32,-16.,16.);
2395 HitEfficiency_L3 = bei->book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4,4,44,-22.,22.);
2397 HitEfficiency_L1 = bei->book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,20,-10.,10.);
2398 HitEfficiency_L2 = bei->book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,32,-16.,16.);
2399 HitEfficiency_L3 = bei->book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2402 else if (isUpgrade) {
2404 HitEfficiency_L1 = bei->book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;z-side;Ladder",2,-1.,1.,12,-6.,6.);
2405 HitEfficiency_L2 = bei->book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;z-side;Ladder",2,-1.,1.,28,-14.,14.);
2406 HitEfficiency_L3 = bei->book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;z-side;Ladder",2,-1.,1.,44,-22.,22.);
2407 HitEfficiency_L4 = bei->book2D(
"HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;z-side;Ladder",2,-1.,1.,64,-32.,32.);
2409 HitEfficiency_L1 = bei->book2D(
"HitEfficiency_L1",
"Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,12,-6.,6.);
2410 HitEfficiency_L2 = bei->book2D(
"HitEfficiency_L2",
"Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,28,-14.,14.);
2411 HitEfficiency_L3 = bei->book2D(
"HitEfficiency_L3",
"Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2412 HitEfficiency_L4 = bei->book2D(
"HitEfficiency_L4",
"Hit Efficiency in Barrel_Layer4;Module;Ladder",8,-4.,4.,64,-32.,32.);
2417 bei->setCurrentFolder(
"Pixel/Endcap");
2420 HitEfficiency_Dp1 = bei->book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;",24,-12.,12.,1,0.,1.);
2421 HitEfficiency_Dp2 = bei->book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;",24,-12.,12.,1,0.,1.);
2422 HitEfficiency_Dm1 = bei->book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;",24,-12.,12.,1,0.,1.);
2423 HitEfficiency_Dm2 = bei->book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;",24,-12.,12.,1,0.,1.);
2425 HitEfficiency_Dp1 = bei->book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules",24,-12.,12.,7,1.,8.);
2426 HitEfficiency_Dp2 = bei->book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules",24,-12.,12.,7,1.,8.);
2427 HitEfficiency_Dm1 = bei->book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules",24,-12.,12.,7,1.,8.);
2428 HitEfficiency_Dm2 = bei->book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules",24,-12.,12.,7,1.,8.);
2430 }
else if (isUpgrade) {
2432 HitEfficiency_Dp1 = bei->book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;",28,-17.,11.,1,0.,1.);
2433 HitEfficiency_Dp2 = bei->book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;",28,-17.,11.,1,0.,1.);
2434 HitEfficiency_Dp3 = bei->book2D(
"HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;",28,-17.,11.,1,0.,1.);
2435 HitEfficiency_Dm1 = bei->book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;",28,-17.,11.,1,0.,1.);
2436 HitEfficiency_Dm2 = bei->book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;",28,-17.,11.,1,0.,1.);
2437 HitEfficiency_Dm3 = bei->book2D(
"HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;",28,-17.,11.,1,0.,1.);
2439 HitEfficiency_Dp1 = bei->book2D(
"HitEfficiency_Dp1",
"Hit Efficiency in Endcap_Disk_p1;Blades;Modules",28,-17.,11.,2,1.,3.);
2440 HitEfficiency_Dp2 = bei->book2D(
"HitEfficiency_Dp2",
"Hit Efficiency in Endcap_Disk_p2;Blades;Modules",28,-17.,11.,2,1.,3.);
2441 HitEfficiency_Dp3 = bei->book2D(
"HitEfficiency_Dp3",
"Hit Efficiency in Endcap_Disk_p3;Blades;Modules",28,-17.,11.,2,1.,3.);
2442 HitEfficiency_Dm1 = bei->book2D(
"HitEfficiency_Dm1",
"Hit Efficiency in Endcap_Disk_m1;Blades;Modules",28,-17.,11.,2,1.,3.);
2443 HitEfficiency_Dm2 = bei->book2D(
"HitEfficiency_Dm2",
"Hit Efficiency in Endcap_Disk_m2;Blades;Modules",28,-17.,11.,2,1.,3.);
2444 HitEfficiency_Dm3 = bei->book2D(
"HitEfficiency_Dm3",
"Hit Efficiency in Endcap_Disk_m3;Blades;Modules",28,-17.,11.,2,1.,3.);
2465 string currDir = bei->pwd();
2466 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
2470 if(isbarrel && dname.find(
"Ladder_")!=string::npos){
2472 vector<string> meVec = bei->getMEs();
2473 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2474 string full_path = currDir +
"/" + (*it);
2476 if(full_path.find(
"missingMod_")!=string::npos){
2480 if (!missing)
continue;
2481 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2483 if (!valid)
continue;
2488 if(dname.find(
"01")!=string::npos){ biny = 1;}
else if(dname.find(
"02")!=string::npos){ biny = 2;}
2489 else if(dname.find(
"03")!=string::npos){ biny = 3;}
else if(dname.find(
"04")!=string::npos){ biny = 4;}
2490 else if(dname.find(
"05")!=string::npos){ biny = 5;}
else if(dname.find(
"06")!=string::npos){ biny = 6;}
2491 else if(dname.find(
"07")!=string::npos){ biny = 7;}
else if(dname.find(
"08")!=string::npos){ biny = 8;}
2492 else if(dname.find(
"09")!=string::npos){ biny = 9;}
else if(dname.find(
"10")!=string::npos){ biny = 10;}
2493 else if(dname.find(
"11")!=string::npos){ biny = 11;}
else if(dname.find(
"12")!=string::npos){ biny = 12;}
2494 else if(dname.find(
"13")!=string::npos){ biny = 13;}
else if(dname.find(
"14")!=string::npos){ biny = 14;}
2495 else if(dname.find(
"15")!=string::npos){ biny = 15;}
else if(dname.find(
"16")!=string::npos){ biny = 16;}
2496 else if(dname.find(
"17")!=string::npos){ biny = 17;}
else if(dname.find(
"18")!=string::npos){ biny = 18;}
2497 else if(dname.find(
"19")!=string::npos){ biny = 19;}
else if(dname.find(
"20")!=string::npos){ biny = 20;}
2498 else if(dname.find(
"21")!=string::npos){ biny = 21;}
else if(dname.find(
"22")!=string::npos){ biny = 22;}
2500 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2501 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2502 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2504 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2513 if(currDir.find(
"Shell_m")!=string::npos){ start = 1;}
else{ start = 5;}
2514 for(
int i=start;
i<start+5;
i++){
2515 float hitEfficiency = -1.0;
2516 float missingHits=0;
2520 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2521 if(currDir.find(
"Layer_1")!=string::npos){
2525 else if(currDir.find(
"Layer_2")!=string::npos){
2529 else if(currDir.find(
"Layer_3")!=string::npos){
2539 else if (isUpgrade) {
2540 vector<string> meVec = bei->getMEs();
2541 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2542 string full_path = currDir +
"/" + (*it);
2543 if(full_path.find(
"missing_")!=string::npos){
2548 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2549 me = bei->get(new_path);
2553 float hitEfficiency = -1.;
2554 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2556 int binx = 0;
int biny = 0;
2557 if(currDir.find(
"Shell_m")!=string::npos){ binx = 1;}
else{ binx = 2;}
2558 if(dname.find(
"01")!=string::npos){ biny = 1;}
else if(dname.find(
"02")!=string::npos){ biny = 2;}
2559 else if(dname.find(
"03")!=string::npos){ biny = 3;}
else if(dname.find(
"04")!=string::npos){ biny = 4;}
2560 else if(dname.find(
"05")!=string::npos){ biny = 5;}
else if(dname.find(
"06")!=string::npos){ biny = 6;}
2561 else if(dname.find(
"07")!=string::npos){ biny = 7;}
else if(dname.find(
"08")!=string::npos){ biny = 8;}
2562 else if(dname.find(
"09")!=string::npos){ biny = 9;}
else if(dname.find(
"10")!=string::npos){ biny = 10;}
2563 else if(dname.find(
"11")!=string::npos){ biny = 11;}
else if(dname.find(
"12")!=string::npos){ biny = 12;}
2564 else if(dname.find(
"13")!=string::npos){ biny = 13;}
else if(dname.find(
"14")!=string::npos){ biny = 14;}
2565 else if(dname.find(
"15")!=string::npos){ biny = 15;}
else if(dname.find(
"16")!=string::npos){ biny = 16;}
2566 else if(dname.find(
"17")!=string::npos){ biny = 17;}
else if(dname.find(
"18")!=string::npos){ biny = 18;}
2567 else if(dname.find(
"19")!=string::npos){ biny = 19;}
else if(dname.find(
"20")!=string::npos){ biny = 20;}
2568 else if(dname.find(
"21")!=string::npos){ biny = 21;}
else if(dname.find(
"22")!=string::npos){ biny = 22;}
2569 else if(dname.find(
"23")!=string::npos){ biny = 23;}
else if(dname.find(
"24")!=string::npos){ biny = 24;}
2570 else if(dname.find(
"25")!=string::npos){ biny = 25;}
else if(dname.find(
"25")!=string::npos){ biny = 25;}
2571 else if(dname.find(
"26")!=string::npos){ biny = 26;}
else if(dname.find(
"27")!=string::npos){ biny = 27;}
2572 else if(dname.find(
"28")!=string::npos){ biny = 28;}
else if(dname.find(
"29")!=string::npos){ biny = 29;}
2573 else if(dname.find(
"30")!=string::npos){ biny = 30;}
else if(dname.find(
"31")!=string::npos){ biny = 31;}
2574 else if(dname.find(
"32")!=string::npos){ biny = 32;}
2575 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2576 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 6;}
2577 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 14;}
2578 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2579 else if(currDir.find(
"Layer_4")!=string::npos){ biny = biny + 32;}
2581 if(currDir.find(
"Layer_1")!=string::npos){
2585 }
else if(currDir.find(
"Layer_2")!=string::npos){
2588 }
else if(currDir.find(
"Layer_3")!=string::npos){
2591 }
else if(currDir.find(
"Layer_4")!=string::npos){
2598 }
else if(!isbarrel && dname.find(
"Blade_")!=string::npos && !isUpgrade){
2599 vector<string> meVec = bei->getMEs();
2600 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2601 string full_path = currDir +
"/" + (*it);
2602 if(full_path.find(
"missing_")!=string::npos){
2606 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2607 me = bei->get(new_path);
2610 float hitEfficiency = -1.;
2611 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2612 int binx = 0;
int biny = 1;
2613 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2614 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2615 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2616 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2617 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2618 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2619 if(currDir.find(
"HalfCylinder_mI")!=string::npos || currDir.find(
"HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2621 if(binx==1) binx = 12;
2622 else if(binx==2) binx = 11;
2623 else if(binx==3) binx = 10;
2624 else if(binx==4) binx = 9;
2625 else if(binx==5) binx = 8;
2626 else if(binx==6) binx = 7;
2627 else if(binx==7) binx = 6;
2628 else if(binx==8) binx = 5;
2629 else if(binx==9) binx = 4;
2630 else if(binx==10) binx = 3;
2631 else if(binx==11) binx = 2;
2632 else if(binx==12) binx = 1;
2634 if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2637 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2640 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2643 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2650 }
else if(!isbarrel && dname.find(
"Blade_")!=string::npos && isUpgrade){
2651 vector<string> meVec = bei->getMEs();
2652 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2653 string full_path = currDir +
"/" + (*it);
2654 if(full_path.find(
"missing_")!=string::npos){
2658 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2659 me = bei->get(new_path);
2662 float hitEfficiency = -1.;
2663 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2664 int binx = 0;
int biny = 1;
2665 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2666 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2667 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2668 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2669 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2670 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2671 else if(currDir.find(
"13")!=string::npos){ binx = 13;}
else if(currDir.find(
"14")!=string::npos){ binx = 14;}
2672 else if(currDir.find(
"15")!=string::npos){ binx = 15;}
else if(currDir.find(
"16")!=string::npos){ binx = 16;}
2673 else if(currDir.find(
"17")!=string::npos){ binx = 17;}
2674 if(currDir.find(
"HalfCylinder_mI")!=string::npos || currDir.find(
"HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2676 if(binx==1) binx = 17;
2677 else if(binx==2) binx = 16;
2678 else if(binx==3) binx = 15;
2679 else if(binx==4) binx = 14;
2680 else if(binx==5) binx = 13;
2681 else if(binx==6) binx = 12;
2682 else if(binx==7) binx = 11;
2683 else if(binx==8) binx = 10;
2684 else if(binx==9) binx = 9;
2685 else if(binx==10) binx = 8;
2686 else if(binx==11) binx = 7;
2687 else if(binx==12) binx = 6;
2688 else if(binx==13) binx = 5;
2689 else if(binx==14) binx = 4;
2690 else if(binx==15) binx = 3;
2691 else if(binx==16) binx = 2;
2692 else if(binx==17) binx = 1;
2694 if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2697 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2700 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2703 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2706 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2709 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2718 vector<string> subdirs = bei->getSubdirs();
2719 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2722 if(*it !=
"Pixel" && ((isbarrel && (*it).find(
"Barrel")==string::npos) || (!isbarrel && (*it).find(
"Endcap")==string::npos)))
continue;
2729 if(dname.find(
"Module_")!=string::npos){
2730 vector<string> meVec = bei->getMEs();
2731 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2732 string full_path = currDir +
"/" + (*it);
2733 if(full_path.find(
"missing_")!=string::npos){
2737 string new_path = full_path.replace(full_path.find(
"missing"),7,
"valid");
2738 me = bei->get(new_path);
2741 float hitEfficiency = -1.;
2742 if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2743 int binx = 0;
int biny = 0;
2745 if(currDir.find(
"Shell_m")!=string::npos){
2746 if(currDir.find(
"Module_4")!=string::npos){ binx = 1;}
else if(currDir.find(
"Module_3")!=string::npos){ binx = 2;}
2747 if(currDir.find(
"Module_2")!=string::npos){ binx = 3;}
else if(currDir.find(
"Module_1")!=string::npos){ binx = 4;}
2748 }
else if(currDir.find(
"Shell_p")!=string::npos){
2749 if(currDir.find(
"Module_1")!=string::npos){ binx = 5;}
else if(currDir.find(
"Module_2")!=string::npos){ binx = 6;}
2750 if(currDir.find(
"Module_3")!=string::npos){ binx = 7;}
else if(currDir.find(
"Module_4")!=string::npos){ binx = 8;}
2753 if(currDir.find(
"01")!=string::npos){ biny = 1;}
else if(currDir.find(
"02")!=string::npos){ biny = 2;}
2754 else if(currDir.find(
"03")!=string::npos){ biny = 3;}
else if(currDir.find(
"04")!=string::npos){ biny = 4;}
2755 else if(currDir.find(
"05")!=string::npos){ biny = 5;}
else if(currDir.find(
"06")!=string::npos){ biny = 6;}
2756 else if(currDir.find(
"07")!=string::npos){ biny = 7;}
else if(currDir.find(
"08")!=string::npos){ biny = 8;}
2757 else if(currDir.find(
"09")!=string::npos){ biny = 9;}
else if(currDir.find(
"10")!=string::npos){ biny = 10;}
2758 else if(currDir.find(
"11")!=string::npos){ biny = 11;}
else if(currDir.find(
"12")!=string::npos){ biny = 12;}
2759 else if(currDir.find(
"13")!=string::npos){ biny = 13;}
else if(currDir.find(
"14")!=string::npos){ biny = 14;}
2760 else if(currDir.find(
"15")!=string::npos){ biny = 15;}
else if(currDir.find(
"16")!=string::npos){ biny = 16;}
2761 else if(currDir.find(
"17")!=string::npos){ biny = 17;}
else if(currDir.find(
"18")!=string::npos){ biny = 18;}
2762 else if(currDir.find(
"19")!=string::npos){ biny = 19;}
else if(currDir.find(
"20")!=string::npos){ biny = 20;}
2763 else if(currDir.find(
"21")!=string::npos){ biny = 21;}
else if(currDir.find(
"22")!=string::npos){ biny = 22;}
2764 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2765 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 10;}
2766 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 16;}
2767 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2770 else if (isUpgrade) {
2771 if(currDir.find(
"01")!=string::npos){ biny = 1;}
else if(currDir.find(
"02")!=string::npos){ biny = 2;}
2772 else if(currDir.find(
"03")!=string::npos){ biny = 3;}
else if(currDir.find(
"04")!=string::npos){ biny = 4;}
2773 else if(currDir.find(
"05")!=string::npos){ biny = 5;}
else if(currDir.find(
"06")!=string::npos){ biny = 6;}
2774 else if(currDir.find(
"07")!=string::npos){ biny = 7;}
else if(currDir.find(
"08")!=string::npos){ biny = 8;}
2775 else if(currDir.find(
"09")!=string::npos){ biny = 9;}
else if(currDir.find(
"10")!=string::npos){ biny = 10;}
2776 else if(currDir.find(
"11")!=string::npos){ biny = 11;}
else if(currDir.find(
"12")!=string::npos){ biny = 12;}
2777 else if(currDir.find(
"13")!=string::npos){ biny = 13;}
else if(currDir.find(
"14")!=string::npos){ biny = 14;}
2778 else if(currDir.find(
"15")!=string::npos){ biny = 15;}
else if(currDir.find(
"16")!=string::npos){ biny = 16;}
2779 else if(currDir.find(
"17")!=string::npos){ biny = 17;}
else if(currDir.find(
"18")!=string::npos){ biny = 18;}
2780 else if(currDir.find(
"19")!=string::npos){ biny = 19;}
else if(currDir.find(
"20")!=string::npos){ biny = 20;}
2781 else if(currDir.find(
"21")!=string::npos){ biny = 21;}
else if(currDir.find(
"22")!=string::npos){ biny = 22;}
2782 else if(currDir.find(
"23")!=string::npos){ biny = 23;}
else if(currDir.find(
"24")!=string::npos){ biny = 24;}
2783 else if(currDir.find(
"25")!=string::npos){ biny = 25;}
else if(currDir.find(
"25")!=string::npos){ biny = 25;}
2784 else if(currDir.find(
"26")!=string::npos){ biny = 26;}
else if(currDir.find(
"27")!=string::npos){ biny = 27;}
2785 else if(currDir.find(
"28")!=string::npos){ biny = 28;}
else if(currDir.find(
"29")!=string::npos){ biny = 29;}
2786 else if(currDir.find(
"30")!=string::npos){ biny = 30;}
else if(currDir.find(
"31")!=string::npos){ biny = 31;}
2787 else if(currDir.find(
"32")!=string::npos){ biny = 32;}
2788 if(currDir.find(
"Shell_mO")!=string::npos || currDir.find(
"Shell_pO")!=string::npos){
2789 if(currDir.find(
"Layer_1")!=string::npos){ biny = biny + 6;}
2790 else if(currDir.find(
"Layer_2")!=string::npos){ biny = biny + 14;}
2791 else if(currDir.find(
"Layer_3")!=string::npos){ biny = biny + 22;}
2792 else if(currDir.find(
"Layer_4")!=string::npos){ biny = biny + 32;}
2797 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2798 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2799 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2800 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2801 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2802 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2803 if(currDir.find(
"HalfCylinder_mO")!=string::npos || currDir.find(
"HalfCylinder_pO")!=string::npos){ binx = binx + 12;}
2804 if(currDir.find(
"Panel_1/Module_1")!=string::npos){ biny = 1;}
else if(currDir.find(
"Panel_2/Module_1")!=string::npos){ biny = 2;}
2805 else if(currDir.find(
"Panel_1/Module_2")!=string::npos){ biny = 3;}
else if(currDir.find(
"Panel_2/Module_2")!=string::npos){ biny = 4;}
2806 else if(currDir.find(
"Panel_1/Module_3")!=string::npos){ biny = 5;}
else if(currDir.find(
"Panel_2/Module_3")!=string::npos){ biny = 6;}
2807 else if(currDir.find(
"Panel_1/Module_4")!=string::npos){ biny = 7;}
2808 }
else if (isUpgrade) {
2809 if(currDir.find(
"01")!=string::npos){ binx = 1;}
else if(currDir.find(
"02")!=string::npos){ binx = 2;}
2810 else if(currDir.find(
"03")!=string::npos){ binx = 3;}
else if(currDir.find(
"04")!=string::npos){ binx = 4;}
2811 else if(currDir.find(
"05")!=string::npos){ binx = 5;}
else if(currDir.find(
"06")!=string::npos){ binx = 6;}
2812 else if(currDir.find(
"07")!=string::npos){ binx = 7;}
else if(currDir.find(
"08")!=string::npos){ binx = 8;}
2813 else if(currDir.find(
"09")!=string::npos){ binx = 9;}
else if(currDir.find(
"10")!=string::npos){ binx = 10;}
2814 else if(currDir.find(
"11")!=string::npos){ binx = 11;}
else if(currDir.find(
"12")!=string::npos){ binx = 12;}
2815 else if(currDir.find(
"13")!=string::npos){ binx = 13;}
else if(currDir.find(
"14")!=string::npos){ binx = 14;}
2816 else if(currDir.find(
"15")!=string::npos){ binx = 15;}
else if(currDir.find(
"16")!=string::npos){ binx = 16;}
2817 else if(currDir.find(
"17")!=string::npos){ binx = 17;}
2818 if(currDir.find(
"HalfCylinder_mO")!=string::npos || currDir.find(
"HalfCylinder_pO")!=string::npos){ binx = binx + 17;}
2819 if(currDir.find(
"Panel_1/Module_1")!=string::npos){ biny = 1;}
else if(currDir.find(
"Panel_2/Module_1")!=string::npos){ biny = 2;}
2823 if(currDir.find(
"Layer_1")!=string::npos){
2826 }
else if(currDir.find(
"Layer_2")!=string::npos){
2829 }
else if(currDir.find(
"Layer_3")!=string::npos){
2832 }
else if( isUpgrade && (currDir.find(
"Layer_4")!=string::npos) ){
2835 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2838 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2841 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_m")!=string::npos){
2844 }
else if(currDir.find(
"Disk_1")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2847 }
else if(currDir.find(
"Disk_2")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2850 }
else if(currDir.find(
"Disk_3")!=string::npos && currDir.find(
"HalfCylinder_p")!=string::npos){
2858 vector<string> subdirs = bei->getSubdirs();
2859 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2862 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
static const HistoName names[]
Double_t mapMin(const Double_t map[][3][22][7], bool isBarrel)
TH1 * getRefTH1(void) const
void fillOccupancy(DQMStore *bei, bool isbarrel)
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
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)
const T & max(const T &a, const T &b)
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)
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
T const * product() const
TH1F * getTH1F(void) const
MonitorElement * DEV_nclusters_Endcap
MonitorElement * HitEfficiency_Dp1
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 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 * 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
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)