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);
479 }
else if (panel == 2) {
487 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
488 iter =
i + 2 * (blade - 1) + (panel - 1);
489 }
else if (disk == 2) {
500 }
else if (panel == 2) {
508 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
509 iter =
i + 2 * (blade - 1) + (panel - 1);
523 }
else if (panel == 2) {
531 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
532 iter =
i + 2 * (blade - 1) + (panel - 1);
533 }
else if (disk == 2) {
544 }
else if (panel == 2) {
552 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
553 iter =
i + 2 * (blade - 1) + (panel - 1);
567 }
else if (panel == 2) {
575 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
576 iter =
i + 2 * (blade - 1) + (panel - 1);
577 }
else if (disk == 2) {
588 }
else if (panel == 2) {
596 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
597 iter =
i + 2 * (blade - 1) + (panel - 1);
611 }
else if (panel == 2) {
619 if (blade < 13 && blade > 0 && (panel == 1 || panel == 2))
620 iter =
i + 2 * (blade - 1) + (panel - 1);
621 }
else if (disk == 2) {
632 }
else if (panel == 2) {
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");
1213 pixEvtsPerBX = iBooker.book1D(
"pixEvtsPerBX", title1, 3565, 0., 3565.);
1215 sprintf(title2,
"Rate of Pixel events;LumiSection;Rate [Hz]");
1216 pixEventRate = iBooker.book1D(
"pixEventRate", title2, 5000, 0., 5000.);
1218 sprintf(title3,
"Number of Zero-Occupancy Barrel ROCs;LumiSection;N_{ZERO-OCCUPANCY} Barrel ROCs");
1219 noOccROCsBarrel = iBooker.book1D(
"noOccROCsBarrel", title3, 500, 0., 5000.);
1221 sprintf(title4,
"Number of Low-Efficiency Barrel ROCs;LumiSection;N_{LO EFF} Barrel ROCs");
1222 loOccROCsBarrel = iBooker.book1D(
"loOccROCsBarrel", title4, 500, 0., 5000.);
1224 sprintf(title5,
"Number of Zero-Occupancy Endcap ROCs;LumiSection;N_{ZERO-OCCUPANCY} Endcap ROCs");
1225 noOccROCsEndcap = iBooker.book1D(
"noOccROCsEndcap", title5, 500, 0., 5000.);
1227 sprintf(title6,
"Number of Low-Efficiency Endcap ROCs;LumiSection;N_{LO EFF} Endcap ROCs");
1228 loOccROCsEndcap = iBooker.book1D(
"loOccROCsEndcap", title6, 500, 0., 5000.);
1230 sprintf(title7,
"Average digi occupancy per FED;FED;NDigis/<NDigis>");
1232 sprintf(title8,
"FED Digi Occupancy (NDigis/<NDigis>) vs LumiSections;Lumi Section;FED");
1236 averageDigiOccupancy = iBooker.bookProfile(
"averageDigiOccupancy", title7, 40, -0.5, 39.5, 0., 3.);
1238 avgfedDigiOccvsLumi = iBooker.book2D(
"avgfedDigiOccvsLumi", title8, 640, 0., 3200., 40, -0.5, 39.5);
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);
1255 avgfedDigiOccvsLumi = iBooker.book2D(
"avgfedDigiOccvsLumi", title8, 3200, 0., 3200., 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";
1318 meNDigisCOMBBarrel_ = iBooker.book1D(
"ALLMODS_ndigisCOMB_Barrel",
"Number of Digis", 200, 0., 400.);
1320 meNDigisCHANBarrel_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_Barrel",
"Number of Digis", 100, 0., 1000.);
1322 std::stringstream ss1, ss2;
1325 ss1 <<
"ALLMODS_ndigisCHAN_BarrelL" <<
i;
1327 ss2 <<
"Number of Digis L" <<
i;
1331 meNDigisCHANBarrelCh1_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh1",
"Number of Digis Ch1", 100, 0., 1000.);
1333 meNDigisCHANBarrelCh2_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh2",
"Number of Digis Ch2", 100, 0., 1000.);
1335 meNDigisCHANBarrelCh3_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh3",
"Number of Digis Ch3", 100, 0., 1000.);
1337 meNDigisCHANBarrelCh4_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh4",
"Number of Digis Ch4", 100, 0., 1000.);
1339 meNDigisCHANBarrelCh5_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh5",
"Number of Digis Ch5", 100, 0., 1000.);
1341 meNDigisCHANBarrelCh6_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh6",
"Number of Digis Ch6", 100, 0., 1000.);
1343 meNDigisCHANBarrelCh7_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh7",
"Number of Digis Ch7", 100, 0., 1000.);
1345 meNDigisCHANBarrelCh8_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh8",
"Number of Digis Ch8", 100, 0., 1000.);
1347 meNDigisCHANBarrelCh9_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh9",
"Number of Digis Ch9", 100, 0., 1000.);
1349 meNDigisCHANBarrelCh10_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh10",
"Number of Digis Ch10", 100, 0., 1000.);
1351 meNDigisCHANBarrelCh11_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh11",
"Number of Digis Ch11", 100, 0., 1000.);
1353 meNDigisCHANBarrelCh12_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh12",
"Number of Digis Ch12", 100, 0., 1000.);
1355 meNDigisCHANBarrelCh13_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh13",
"Number of Digis Ch13", 100, 0., 1000.);
1357 meNDigisCHANBarrelCh14_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh14",
"Number of Digis Ch14", 100, 0., 1000.);
1359 meNDigisCHANBarrelCh15_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh15",
"Number of Digis Ch15", 100, 0., 1000.);
1361 meNDigisCHANBarrelCh16_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh16",
"Number of Digis Ch16", 100, 0., 1000.);
1363 meNDigisCHANBarrelCh17_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh17",
"Number of Digis Ch17", 100, 0., 1000.);
1365 meNDigisCHANBarrelCh18_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh18",
"Number of Digis Ch18", 100, 0., 1000.);
1367 meNDigisCHANBarrelCh19_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh19",
"Number of Digis Ch19", 100, 0., 1000.);
1369 meNDigisCHANBarrelCh20_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh20",
"Number of Digis Ch20", 100, 0., 1000.);
1371 meNDigisCHANBarrelCh21_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh21",
"Number of Digis Ch21", 100, 0., 1000.);
1373 meNDigisCHANBarrelCh22_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh22",
"Number of Digis Ch22", 100, 0., 1000.);
1375 meNDigisCHANBarrelCh23_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh23",
"Number of Digis Ch23", 100, 0., 1000.);
1377 meNDigisCHANBarrelCh24_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh24",
"Number of Digis Ch24", 100, 0., 1000.);
1379 meNDigisCHANBarrelCh25_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh25",
"Number of Digis Ch25", 100, 0., 1000.);
1381 meNDigisCHANBarrelCh26_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh26",
"Number of Digis Ch26", 100, 0., 1000.);
1383 meNDigisCHANBarrelCh27_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh27",
"Number of Digis Ch27", 100, 0., 1000.);
1385 meNDigisCHANBarrelCh28_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh28",
"Number of Digis Ch28", 100, 0., 1000.);
1387 meNDigisCHANBarrelCh29_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh29",
"Number of Digis Ch29", 100, 0., 1000.);
1389 meNDigisCHANBarrelCh30_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh30",
"Number of Digis Ch30", 100, 0., 1000.);
1391 meNDigisCHANBarrelCh31_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh31",
"Number of Digis Ch31", 100, 0., 1000.);
1393 meNDigisCHANBarrelCh32_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh32",
"Number of Digis Ch32", 100, 0., 1000.);
1395 meNDigisCHANBarrelCh33_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh33",
"Number of Digis Ch33", 100, 0., 1000.);
1397 meNDigisCHANBarrelCh34_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh34",
"Number of Digis Ch34", 100, 0., 1000.);
1399 meNDigisCHANBarrelCh35_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh35",
"Number of Digis Ch35", 100, 0., 1000.);
1401 meNDigisCHANBarrelCh36_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_BarrelCh36",
"Number of Digis Ch36", 100, 0., 1000.);
1404 meNDigisCOMBEndcap_ = iBooker.book1D(
"ALLMODS_ndigisCOMB_Endcap",
"Number of Digis", 200, 0., 400.);
1406 meNDigisCHANEndcap_ = iBooker.book1D(
"ALLMODS_ndigisCHAN_Endcap",
"Number of Digis", 100, 0., 1000.);
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();