51 digisrc_(conf_.getParameter<
edm::
InputTag>(
"digisrc")),
69 LogInfo(
"PixelDQM") <<
"SiPixelClusterSource::SiPixelClusterSource: Got DQM BackEnd interface" << endl;
81 LogInfo(
"PixelDQM") <<
"SiPixelClusterSource::~SiPixelClusterSource: Destructor" << endl;
83 std::map<uint32_t, SiPixelClusterModule *>::iterator struct_iter;
85 delete struct_iter->second;
86 struct_iter->second =
nullptr;
91 LogInfo(
"PixelDQM") <<
" SiPixelClusterSource::beginJob - Initialisation ... " << std::endl;
95 LogInfo(
"PixelDQM") <<
"Smiley (Cluster sizeY vs. Cluster eta) is " <<
smileyOn <<
"\n";
114 std::stringstream ss1, ss2;
117 ss1 <<
"position_siPixelClusters_Layer_" <<
i;
119 ss2 <<
"Clusters Layer" <<
i <<
";Global Z (cm);Global #phi";
120 meClPosLayer.push_back(iBooker.
book2D(ss1.str(), ss2.str(), 200, -30., 30., 128, -3.2, 3.2));
124 ss1 <<
"position_siPixelClusters_pz_Disk_" <<
i;
126 ss2 <<
"Clusters +Z Disk" <<
i <<
";Global X (cm);Global Y (cm)";
127 meClPosDiskpz.push_back(iBooker.
book2D(ss1.str(), ss2.str(), 80, -20., 20., 80, -20., 20.));
129 ss1 <<
"position_siPixelClusters_mz_Disk_" <<
i;
131 ss2 <<
"Clusters -Z Disk" <<
i <<
";Global X (cm);Global Y (cm)";
132 meClPosDiskmz.push_back(iBooker.
book2D(ss1.str(), ss2.str(), 80, -20., 20., 80, -20., 20.));
139 ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_Barrel";
141 ss2 <<
"Total number of barrel clusters profile;Lumisection;";
148 ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_FPIX+";
150 ss2 <<
"Total number of FPIX+ clusters profile;Lumisection;";
155 ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_FPIX-";
157 ss2 <<
"Total number of FPIX- clusters profile;Lumisection;";
187 ss1 <<
"pix_bar Occ_roc_online_" +
digisrc_.
label() +
"_layer_" <<
i;
189 ss2 <<
"Pixel Barrel Occupancy, ROC level (Online): Layer " <<
i;
197 "ROC_endcap_occupancy",
"Pixel Endcap Occupancy, ROC level (Online)", 72, -4.5, 4.5, 288, -12.5, 12.5);
229 auto const &clustColl = *(
input.product());
243 int lumiSection = (
int)
iEvent.luminosityBlock();
244 int nEventFpixClusters = 0;
246 int nEventsBarrel = 0;
247 int nEventsFPIXm = 0;
248 int nEventsFPIXp = 0;
250 std::map<uint32_t, SiPixelClusterModule *>::iterator struct_iter;
252 int numberOfFpixClusters = (*struct_iter)
253 .second->fill(*
input,
272 nEventFpixClusters = nEventFpixClusters + numberOfFpixClusters;
281 float trendVar =
iEvent.orbitNumber() / 262144.0;
290 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
dets().begin(); it != pDD->
dets().end(); it++) {
291 DetId detId = (*it)->geographicalId();
313 LogInfo(
"PixelDQM") <<
" SiPixelClusterSource::buildStructure";
321 LogVerbatim(
"PixelDQM") <<
" *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl;
322 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
dets().size() <<
" detectors" << std::endl;
323 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
detTypes().size() <<
" types" << std::endl;
325 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
dets().begin(); it != pDD->
dets().end(); it++) {
326 if (dynamic_cast<PixelGeomDetUnit const *>((*it)) !=
nullptr) {
327 DetId detId = (*it)->geographicalId();
329 const PixelGeomDetUnit *pixDet = dynamic_cast<const PixelGeomDetUnit *>(geoUnit);
335 uint32_t
id = detId();
339 LogDebug(
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
346 LogDebug(
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
355 sprintf(sside,
"HalfCylinder_%i", side);
357 sprintf(sdisk,
"Disk_%i", disk);
359 sprintf(sblade,
"Blade_%02i", blade);
361 sprintf(spanel,
"Panel_%i", panel);
363 sprintf(smodule,
"Module_%i",
module);
366 bool mask = side_str.find(
"HalfCylinder_1") != string::npos ||
367 side_str.find(
"HalfCylinder_2") != string::npos ||
368 side_str.find(
"HalfCylinder_4") != string::npos || disk_str.find(
"Disk_2") != string::npos;
390 "Rate of events with >%i FPIX clusters;LumiSection;Rate of large "
391 "FPIX events per LS [Hz]",
395 std::map<uint32_t, SiPixelClusterModule *>::iterator struct_iter;
406 throw cms::Exception(
"LogicError") <<
"[SiPixelClusterSource::bookMEs] Creation of DQM folder "
414 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
421 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
428 LogDebug(
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
435 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
442 LogDebug(
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
449 LogDebug(
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
456 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BARREL-FOLDER\n";
465 std::vector<MonitorElement *>
const &meinput) {
467 if (ipxsearch != diginp.
end()) {
470 for (pxdi = ipxsearch->
begin(); pxdi != ipxsearch->
end(); pxdi++) {
478 if (DBshell == 1 || DBshell == 2) {
479 DBmodule = -DBmodule;
481 if (DBshell == 1 || DBshell == 3) {
482 DBladder = -DBladder;
485 int col = pxdi->column();
486 int row = pxdi->row();
488 float modsign = (
float)DBmodule / (
abs((
float)DBmodule));
489 float ladsign = (
float)DBladder / (
abs((
float)DBladder));
490 float rocx = ((
float)
col / (52. * 8.)) * modsign + ((
float)DBmodule - (modsign)*0.5);
491 float rocy = ((
float)row / (80. * 2.)) * ladsign + ((
float)DBladder - (ladsign)*0.5);
495 if ((DBladder % 2 == 0) && (!isHalfModule)) {
498 if ((
flip) && (DBladder > 0)) {
499 if ((((
float)DBladder - (ladsign)*0.5) <= rocy) && (rocy < (
float)DBladder)) {
500 rocy = rocy + ladsign * 0.5;
501 }
else if ((((
float)DBladder) <= rocy) && (rocy < ((
float)DBladder + (ladsign)*0.5))) {
502 rocy = rocy - ladsign * 0.5;
508 rocx = rocx - 0.0001;
511 rocy = rocy - 0.0001;
513 rocy = rocy + 0.0001;
515 if (
abs(DBladder) == 1) {
516 rocy = rocy + ladsign * 0.5;
518 meinput[DBlayer - 1]->Fill(rocx, rocy);
529 if (ipxsearch != clustColl.
end()) {
532 for (pxclust = ipxsearch->
begin(); pxclust != ipxsearch->
end(); pxclust++) {
534 const PixelGeomDetUnit *pixDet = dynamic_cast<const PixelGeomDetUnit *>(geoUnit);
539 float xclust = pxclust->x();
540 float yclust = pxclust->y();
541 float z = clustgp.
z();
549 if ((pxfside == 1) || (pxfside == 3)) {
550 pxfblade = -1. * pxfblade;
554 pxfdisk = -1. * pxfdisk;
557 int clu_sdpx = ((pxfdisk > 0) ? 1 : -1) * (2 * (
abs(pxfdisk) - 1) + pxfpanel);
558 int binselx = (pxfpanel == 1 && (pxfmodule == 1 || pxfmodule == 4))
560 : ((pxfpanel == 1 && xclust < 80.0) || (pxfpanel == 2 && xclust >= 80.0));
561 int nperpan = 2 * pxfmodule + pxfpanel - 1 + binselx;
563 ((pxfdisk > 0) ? nperpan : 9 - nperpan) + (clu_sdpx + 4) * 8 - 2 * ((
abs(pxfdisk) == 1) ? pxfdisk : 0);
565 int clu_roc_biny = -99.;
566 int nrocly = pxfmodule + pxfpanel;
567 for (
int i = 0;
i < nrocly;
i++) {
568 int j = (pxfdisk < 0) ?
i : nrocly - 1 -
i;
569 if (yclust >= (
j * 52.0) && yclust < ((
j + 1) * 52.0))
570 clu_roc_biny = 6 - nrocly + 2 *
i + ((pxfblade > 0) ? pxfblade - 1 : pxfblade + 12) * 12 + 1;
573 clu_roc_biny = clu_roc_biny + 144;
578 clu_roc_binx, clu_roc_biny + 1, meinput->
getBinContent(clu_roc_binx, clu_roc_biny + 1) + 1);