80 assert(!infile.fail());
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++)
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();
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");
1238 "avgBarrelFedOccvsLumi",
1239 "Average Barrel FED digi occupancy (<NDigis>) vs LumiSections;Lumi Section;Average digi occupancy per FED",
1244 "avgEndcapFedOccvsLumi",
1245 "Average Endcap FED digi occupancy (<NDigis>) vs LumiSections;Lumi Section;Average digi occupancy per FED",
1252 "averageDigiOccupancy", title7, 40, -0.5, 39.5);
1255 std::map<uint32_t, SiPixelDigiModule*>::iterator struct_iter;
1266 throw cms::Exception(
"LogicError") <<
"[SiPixelDigiSource::bookMEs] Creation of DQM folder failed";
1273 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
1281 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
1289 LogDebug(
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
1296 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
1304 LogDebug(
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
1311 LogDebug(
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
1320 std::stringstream ss1, ss2;
1323 ss1 <<
"ALLMODS_ndigisCHAN_BarrelL" <<
i;
1325 ss2 <<
"Number of Digis L" <<
i;
1408 ss1 <<
"ALLMODS_ndigisCHAN_EndcapDp" <<
i;
1410 ss2 <<
"Number of Digis Disk p" <<
i;
1416 ss1 <<
"ALLMODS_ndigisCHAN_EndcapDm" <<
i;
1418 ss2 <<
"Number of Digis Disk m" <<
i;
int plaquetteName() const
plaquetteId (in pannel)
void dqmEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
LuminosityBlockID id() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
MonitorElement * meNDigisCHANBarrelCh19_
MonitorElement * meNDigisCHANBarrelCh35_
MonitorElement * meNDigisCHANBarrelCh2_
MonitorElement * meNDigisCHANBarrelCh30_
MonitorElement * meNDigisCHANBarrelCh31_
MonitorElement * meNDigisCHANBarrelCh8_
MonitorElement * meNDigisCHANBarrelCh36_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setCurrentFolder(std::string const &fullpath)
MonitorElement * loOccROCsEndcap
MonitorElement * meNDigisCHANBarrelCh17_
MonitorElement * meNDigisCHANBarrelCh25_
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
MonitorElement * meNDigisCHANBarrelCh6_
MonitorElement * meNDigisCOMBBarrel_
constexpr uint32_t rawId() const
get the raw id
void setLumiFlag()
this ME is meant to be stored for each luminosity section
int bunchCrossing() const
std::string topFolderName_
edm::LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * meNDigisCOMBEndcap_
std::pair< int, int > getZeroLoEffROCs()
MonitorElement * meNDigisCHANBarrelCh14_
MonitorElement * meNDigisCHANBarrelCh12_
MonitorElement * meNDigisCHANBarrelCh29_
static std::string const input
MonitorElement * avgBarrelFedOccvsLumi
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > srcToken_
MonitorElement * meNDigisCHANBarrelCh27_
int bladeName() const
blade id
virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup)
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
SiPixelDigiSource(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
MonitorElement * meNDigisCHANBarrelCh3_
MonitorElement * meNDigisCHANBarrelCh9_
MonitorElement * meNDigisCHANBarrelCh4_
MonitorElement * meNDigisCHANBarrelCh34_
MonitorElement * meNDigisCHANBarrelCh26_
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
MonitorElement * noOccROCsBarrel
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
MonitorElement * meNDigisCHANEndcap_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override
MonitorElement * meNDigisCHANBarrelCh28_
~SiPixelDigiSource() override
MonitorElement * noOccROCsEndcap
MonitorElement * meNDigisCHANBarrel_
std::vector< MonitorElement * > meNDigisCHANEndcapDms_
std::map< uint32_t, SiPixelDigiModule * > thePixelStructure
MonitorElement * meNDigisCHANBarrelCh33_
MonitorElement * pixEventRate
MonitorElement * meNDigisCHANBarrelCh21_
unsigned int I_detId[1856]
MonitorElement * meNDigisCHANBarrelCh32_
MonitorElement * meNDigisCHANBarrelCh10_
MonitorElement * loOccROCsBarrel
MonitorElement * meNDigisCHANBarrelCh1_
MonitorElement * averageDigiOccupancy
MonitorElement * meNDigisCHANBarrelCh5_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meNDigisCHANBarrelCh7_
MonitorElement * meNDigisCHANBarrelCh15_
MonitorElement * meNDigisCHANBarrelCh13_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * meNDigisCHANBarrelCh23_
int layerName() const
layer id
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * meNDigisCHANBarrelCh18_
MonitorElement * bigEventRate
MonitorElement * meNDigisCHANBarrelCh20_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
MonitorElement * avgfedDigiOccvsLumi
int pannelName() const
pannel id
MonitorElement * meNDigisCHANBarrelCh22_
int diskName() const
disk id
MonitorElement * avgEndcapFedOccvsLumi
std::vector< MonitorElement * > meNDigisCHANEndcapDps_
MonitorElement * pixEvtsPerBX
void dqmBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
std::vector< MonitorElement * > meNDigisCHANBarrelLs_
HalfCylinder halfCylinder() const
MonitorElement * meNDigisCHANBarrelCh16_
MonitorElement * meNDigisCHANBarrelCh11_
T mod(const T &a, const T &b)
modOn
online/offline RawDataErrors
T const * product() const
virtual void CountZeroROCsInSubstructure(bool, bool &, SiPixelDigiModule *)
virtual void buildStructure(edm::EventSetup const &)
MonitorElement * meNDigisCHANBarrelCh24_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)