87 while (!
infile.eof() && nModsInFile < nTOTmodules) {
94 LogInfo(
"PixelDQM") <<
"SiPixelDigiSource::SiPixelDigiSource: Got DQM BackEnd interface" << endl;
100 LogInfo(
"PixelDQM") <<
"SiPixelDigiSource::~SiPixelDigiSource: Destructor" << endl;
109 for (
int i = 0;
i != 40;
i++)
115 for (
int i = 0;
i != 40;
i++)
119 if (
modOn && thisls % 10 == 0) {
122 for (
int i = 0;
i < 2;
i++)
124 for (
int i = 0;
i < 2;
i++)
169 for (
int i = 0;
i != 40;
i++) {
170 float averageOcc = 0.;
172 if (averageBPIXFed > 0.)
175 if (averageFPIXFed > 0.)
185 if (thisls % 10 == 0)
197 if (
modOn && thisls % 10 == 0) {
199 int(thisls / 10), averageBPIXFed);
201 int(thisls / 10), averageFPIXFed);
207 LogInfo(
"PixelDQM") <<
" SiPixelDigiSource::beginJob - Initialisation ... " << std::endl;
210 LogInfo(
"PixelDQM") <<
"2DIM IS " <<
twoDimOn <<
" and set to high resolution? " <<
hiRes <<
"\n";
216 for (
int i = 0;
i != 40;
i++)
218 for (
int i = 0;
i != 4;
i++)
299 for (
int i = 0;
i < 2;
i++)
301 for (
int i = 0;
i < 2;
i++)
326 if (!
input.isValid())
331 int lumiSection = (
int)
iEvent.luminosityBlock();
333 int nActiveModules = 0;
335 std::map<uint32_t, SiPixelDigiModule*>::iterator struct_iter;
336 for (
int i = 0;
i != 192;
i++)
338 for (
int i = 0;
i != 1152;
i++)
340 for (
int i = 0;
i != 4;
i++)
344 int numberOfDigisMod = (*struct_iter)
345 .second->fill(*
input,
369 if (numberOfDigisMod > 0) {
370 nEventDigis = nEventDigis + numberOfDigisMod;
417 for (
int i = 0;
i != nBPiXmodules; ++
i) {
418 if ((*struct_iter).first ==
I_detId[
i]) {
430 i = (nBPiXmodules - 1);
473 else if (module == 2)
475 else if (module == 3)
477 else if (module == 4)
479 }
else if (panel == 2) {
482 else if (module == 2)
484 else if (module == 3)
487 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
488 iter =
i + 2 * (blade - 1) + (panel - 1);
489 }
else if (disk == 2) {
494 else if (module == 2)
496 else if (module == 3)
498 else if (module == 4)
500 }
else if (panel == 2) {
503 else if (module == 2)
505 else if (module == 3)
508 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
509 iter =
i + 2 * (blade - 1) + (panel - 1);
517 else if (module == 2)
519 else if (module == 3)
521 else if (module == 4)
523 }
else if (panel == 2) {
526 else if (module == 2)
528 else if (module == 3)
531 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
532 iter =
i + 2 * (blade - 1) + (panel - 1);
533 }
else if (disk == 2) {
538 else if (module == 2)
540 else if (module == 3)
542 else if (module == 4)
544 }
else if (panel == 2) {
547 else if (module == 2)
549 else if (module == 3)
552 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
553 iter =
i + 2 * (blade - 1) + (panel - 1);
561 else if (module == 2)
563 else if (module == 3)
565 else if (module == 4)
567 }
else if (panel == 2) {
570 else if (module == 2)
572 else if (module == 3)
575 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
576 iter =
i + 2 * (blade - 1) + (panel - 1);
577 }
else if (disk == 2) {
582 else if (module == 2)
584 else if (module == 3)
586 else if (module == 4)
588 }
else if (panel == 2) {
591 else if (module == 2)
593 else if (module == 3)
596 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
597 iter =
i + 2 * (blade - 1) + (panel - 1);
605 else if (module == 2)
607 else if (module == 3)
609 else if (module == 4)
611 }
else if (panel == 2) {
614 else if (module == 2)
616 else if (module == 3)
619 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
620 iter =
i + 2 * (blade - 1) + (panel - 1);
621 }
else if (disk == 2) {
626 else if (module == 2)
628 else if (module == 3)
630 else if (module == 4)
632 }
else if (panel == 2) {
635 else if (module == 2)
637 else if (module == 3)
640 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
641 iter =
i + 2 * (blade - 1) + (panel - 1);
646 for (
int i = nBPiXmodules;
i != nTOTmodules;
i++) {
647 if ((*struct_iter).first ==
I_detId[
i]) {
670 }
else if (panel == 2) {
674 if (blade < 12 && blade > 0 && (panel == 1 || panel == 2))
675 iter =
i + 2 * (blade - 1) + (panel - 1);
676 }
else if (disk == 2) {
681 }
else if (panel == 2) {
685 if (blade < 12 && blade > 0 && (panel == 1 || panel == 2))
686 iter =
i + 2 * (blade - 1) + (panel - 1);
687 }
else if (disk == 3) {
692 }
else if (panel == 2) {
696 if (blade < 12 && blade > 0 && (panel == 1 || panel == 2))
697 iter =
i + 2 * (blade - 1) + (panel - 1);
705 }
else if (panel == 2) {
709 if (blade < 18 && blade > 0 && (panel == 1 || panel == 2))
710 iter =
i + 2 * (blade - 1) + (panel - 1);
711 }
else if (disk == 2) {
716 }
else if (panel == 2) {
720 if (blade < 18 && blade > 0 && (panel == 1 || panel == 2))
721 iter =
i + 2 * (blade - 1) + (panel - 1);
722 }
else if (disk == 3) {
727 }
else if (panel == 2) {
731 if (blade < 18 && blade > 0 && (panel == 1 || panel == 2))
732 iter =
i + 2 * (blade - 1) + (panel - 1);
740 }
else if (panel == 2) {
744 if (blade < 12 && blade > 0 && (panel == 1 || panel == 2))
745 iter =
i + 2 * (blade - 1) + (panel - 1);
746 }
else if (disk == 2) {
751 }
else if (panel == 2) {
755 if (blade < 12 && blade > 0 && (panel == 1 || panel == 2))
756 iter =
i + 2 * (blade - 1) + (panel - 1);
757 }
else if (disk == 3) {
762 }
else if (panel == 2) {
766 if (blade < 12 && blade > 0 && (panel == 1 || panel == 2))
767 iter =
i + 2 * (blade - 1) + (panel - 1);
775 }
else if (panel == 2) {
779 if (blade < 18 && blade > 0 && (panel == 1 || panel == 2))
780 iter =
i + 2 * (blade - 1) + (panel - 1);
781 }
else if (disk == 2) {
786 }
else if (panel == 2) {
790 if (blade < 18 && blade > 0 && (panel == 1 || panel == 2))
791 iter =
i + 2 * (blade - 1) + (panel - 1);
792 }
else if (disk == 3) {
797 }
else if (panel == 2) {
801 if (blade < 18 && blade > 0 && (panel == 1 || panel == 2))
802 iter =
i + 2 * (blade - 1) + (panel - 1);
806 for (
int i = nBPiXmodules;
i != nTOTmodules;
i++) {
807 if ((*struct_iter).first ==
I_detId[
i]) {
817 for (
int i = 0;
i < 2; ++
i)
833 for (
int j = 0;
j != 192;
j++)
838 for (
int j = 0;
j != 72;
j++)
843 for (
int j = 24;
j != 96;
j++)
848 for (
int j = 96;
j != 168;
j++)
853 for (
int j = 120;
j != 192;
j++)
859 for (
int j = 0;
j != 336;
j++)
864 for (
int j = 0;
j != 100;
j++)
869 for (
int j = 22;
j != 134;
j++)
874 for (
int j = 44;
j != 168;
j++)
879 for (
int j = 168;
j != 268;
j++)
884 for (
int j = 190;
j != 302;
j++)
889 for (
int j = 212;
j != 336;
j++)
896 for (
int i = 0;
i != 32;
i++)
901 for (
int i = 0;
i != 32;
i++)
906 for (
int i = 0;
i != 32;
i++)
911 for (
int i = 0;
i != 32;
i++)
916 for (
int i = 0;
i != 32;
i++)
921 for (
int i = 0;
i != 32;
i++)
926 for (
int i = 0;
i != 32;
i++)
931 for (
int i = 0;
i != 32;
i++)
936 for (
int i = 0;
i != 32;
i++)
941 for (
int i = 0;
i != 32;
i++)
946 for (
int i = 0;
i != 32;
i++)
951 for (
int i = 0;
i != 32;
i++)
956 for (
int i = 0;
i != 32;
i++)
961 for (
int i = 0;
i != 32;
i++)
966 for (
int i = 0;
i != 32;
i++)
971 for (
int i = 0;
i != 32;
i++)
976 for (
int i = 0;
i != 32;
i++)
981 for (
int i = 0;
i != 32;
i++)
986 for (
int i = 0;
i != 32;
i++)
991 for (
int i = 0;
i != 32;
i++)
996 for (
int i = 0;
i != 32;
i++)
1001 for (
int i = 0;
i != 32;
i++)
1006 for (
int i = 0;
i != 32;
i++)
1011 for (
int i = 0;
i != 32;
i++)
1016 for (
int i = 0;
i != 32;
i++)
1021 for (
int i = 0;
i != 32;
i++)
1026 for (
int i = 0;
i != 32;
i++)
1031 for (
int i = 0;
i != 32;
i++)
1036 for (
int i = 0;
i != 32;
i++)
1041 for (
int i = 0;
i != 32;
i++)
1046 for (
int i = 0;
i != 32;
i++)
1051 for (
int i = 0;
i != 32;
i++)
1056 for (
int i = 0;
i != 32;
i++)
1061 for (
int i = 0;
i != 32;
i++)
1066 for (
int i = 0;
i != 32;
i++)
1071 for (
int i = 0;
i != 32;
i++)
1083 if (nActiveModules >= 4) {
1102 LogInfo(
"PixelDQM") <<
" SiPixelDigiSource::buildStructure";
1106 LogVerbatim(
"PixelDQM") <<
" *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl;
1107 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
dets().size() <<
" detectors" << std::endl;
1108 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
detTypes().size() <<
" types" << std::endl;
1110 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
dets().begin(); it != pDD->
dets().end(); it++) {
1111 if (dynamic_cast<PixelGeomDetUnit const*>((*it)) !=
nullptr) {
1112 DetId detId = (*it)->geographicalId();
1114 const PixelGeomDetUnit* pixDet = dynamic_cast<const PixelGeomDetUnit*>(geoUnit);
1121 LogDebug(
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
1122 uint32_t
id = detId();
1130 LogDebug(
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
1131 uint32_t
id = detId();
1143 sprintf(sside,
"HalfCylinder_%i", side);
1145 sprintf(sdisk,
"Disk_%i", disk);
1147 sprintf(sblade,
"Blade_%02i", blade);
1149 sprintf(spanel,
"Panel_%i", panel);
1151 sprintf(smodule,
"Module_%i", module);
1154 bool mask = side_str.find(
"HalfCylinder_1") != string::npos ||
1155 side_str.find(
"HalfCylinder_2") != string::npos ||
1156 side_str.find(
"HalfCylinder_4") != string::npos || disk_str.find(
"Disk_2") != string::npos;
1164 LogDebug(
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
1165 uint32_t
id = detId();
1177 sprintf(sside,
"HalfCylinder_%i", side);
1179 sprintf(sdisk,
"Disk_%i", disk);
1181 sprintf(sblade,
"Blade_%02i", blade);
1183 sprintf(spanel,
"Panel_%i", panel);
1185 sprintf(smodule,
"Module_%i", module);
1188 bool mask = side_str.find(
"HalfCylinder_1") != string::npos ||
1189 side_str.find(
"HalfCylinder_2") != string::npos ||
1190 side_str.find(
"HalfCylinder_4") != string::npos || disk_str.find(
"Disk_2") != string::npos;
1209 sprintf(
title,
"Rate of events with >%i digis;LumiSection;Rate [Hz]",
bigEventSize);
1212 sprintf(title1,
"Pixel events vs. BX;BX;# events");
1215 sprintf(title2,
"Rate of Pixel events;LumiSection;Rate [Hz]");
1218 sprintf(title3,
"Number of Zero-Occupancy Barrel ROCs;LumiSection;N_{ZERO-OCCUPANCY} Barrel ROCs");
1221 sprintf(title4,
"Number of Low-Efficiency Barrel ROCs;LumiSection;N_{LO EFF} Barrel ROCs");
1224 sprintf(title5,
"Number of Zero-Occupancy Endcap ROCs;LumiSection;N_{ZERO-OCCUPANCY} Endcap ROCs");
1227 sprintf(title6,
"Number of Low-Efficiency Endcap ROCs;LumiSection;N_{LO EFF} Endcap ROCs");
1230 sprintf(title7,
"Average digi occupancy per FED;FED;NDigis/<NDigis>");
1232 sprintf(title8,
"FED Digi Occupancy (NDigis/<NDigis>) vs LumiSections;Lumi Section;FED");
1240 "avgBarrelFedOccvsLumi",
1241 "Average Barrel FED digi occupancy (<NDigis>) vs LumiSections;Lumi Section;Average digi occupancy per FED",
1246 "avgEndcapFedOccvsLumi",
1247 "Average Endcap FED digi occupancy (<NDigis>) vs LumiSections;Lumi Section;Average digi occupancy per FED",
1254 "averageDigiOccupancy", title7, 40, -0.5, 39.5);
1257 std::map<uint32_t, SiPixelDigiModule*>::iterator struct_iter;
1268 throw cms::Exception(
"LogicError") <<
"[SiPixelDigiSource::bookMEs] Creation of DQM folder failed";
1275 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
1283 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
1291 LogDebug(
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
1298 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
1306 LogDebug(
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
1313 LogDebug(
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
1322 std::stringstream ss1, ss2;
1325 ss1 <<
"ALLMODS_ndigisCHAN_BarrelL" <<
i;
1327 ss2 <<
"Number of Digis L" <<
i;
1410 ss1 <<
"ALLMODS_ndigisCHAN_EndcapDp" <<
i;
1412 ss2 <<
"Number of Digis Disk p" <<
i;
1418 ss1 <<
"ALLMODS_ndigisCHAN_EndcapDm" <<
i;
1420 ss2 <<
"Number of Digis Disk m" <<
i;
1428 std::pair<int, int> tempPair =
mod->getZeroLoEffROCs();