48 digisrc_(conf_.getParameter<
edm::
InputTag>(
"digisrc")),
66 LogInfo(
"PixelDQM") <<
"SiPixelClusterSource::SiPixelClusterSource: Got DQM BackEnd interface" << endl;
84 LogInfo(
"PixelDQM") <<
"SiPixelClusterSource::~SiPixelClusterSource: Destructor" << endl;
86 std::map<uint32_t, SiPixelClusterModule *>::iterator struct_iter;
88 delete struct_iter->second;
89 struct_iter->second =
nullptr;
94 LogInfo(
"PixelDQM") <<
" SiPixelClusterSource::beginJob - Initialisation ... " << std::endl;
98 LogInfo(
"PixelDQM") <<
"Smiley (Cluster sizeY vs. Cluster eta) is " <<
smileyOn <<
"\n";
117 std::stringstream ss1, ss2;
120 ss1 <<
"position_siPixelClusters_Layer_" <<
i;
122 ss2 <<
"Clusters Layer" <<
i <<
";Global Z (cm);Global #phi";
123 meClPosLayer.push_back(iBooker.
book2D(ss1.str(), ss2.str(), 200, -30., 30., 128, -3.2, 3.2));
127 ss1 <<
"position_siPixelClusters_pz_Disk_" <<
i;
129 ss2 <<
"Clusters +Z Disk" <<
i <<
";Global X (cm);Global Y (cm)";
130 meClPosDiskpz.push_back(iBooker.
book2D(ss1.str(), ss2.str(), 80, -20., 20., 80, -20., 20.));
132 ss1 <<
"position_siPixelClusters_mz_Disk_" <<
i;
134 ss2 <<
"Clusters -Z Disk" <<
i <<
";Global X (cm);Global Y (cm)";
135 meClPosDiskmz.push_back(iBooker.
book2D(ss1.str(), ss2.str(), 80, -20., 20., 80, -20., 20.));
142 ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_Barrel";
144 ss2 <<
"Total number of barrel clusters profile;Lumisection;";
151 ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_FPIX+";
153 ss2 <<
"Total number of FPIX+ clusters profile;Lumisection;";
158 ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_FPIX-";
160 ss2 <<
"Total number of FPIX- clusters profile;Lumisection;";
190 ss1 <<
"pix_bar Occ_roc_online_" +
digisrc_.
label() +
"_layer_" <<
i;
192 ss2 <<
"Pixel Barrel Occupancy, ROC level (Online): Layer " <<
i;
200 "ROC_endcap_occupancy",
"Pixel Endcap Occupancy, ROC level (Online)", 72, -4.5, 4.5, 288, -12.5, 12.5);
232 auto const &clustColl = *(
input.product());
244 int lumiSection = (
int)
iEvent.luminosityBlock();
245 int nEventFpixClusters = 0;
247 int nEventsBarrel = 0;
248 int nEventsFPIXm = 0;
249 int nEventsFPIXp = 0;
251 std::map<uint32_t, SiPixelClusterModule *>::iterator struct_iter;
253 int numberOfFpixClusters = (*struct_iter)
254 .second->fill(*
input,
274 nEventFpixClusters = nEventFpixClusters + numberOfFpixClusters;
283 float trendVar =
iEvent.orbitNumber() / 262144.0;
292 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
dets().begin(); it != pDD->
dets().end(); it++) {
293 DetId detId = (*it)->geographicalId();
315 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;
409 throw cms::Exception(
"LogicError") <<
"[SiPixelClusterSource::bookMEs] Creation of DQM folder "
417 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
424 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
431 LogDebug(
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
438 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
445 LogDebug(
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
452 LogDebug(
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
459 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BARREL-FOLDER\n";
468 std::vector<MonitorElement *>
const &meinput) {
470 if (ipxsearch != diginp.
end()) {
473 for (pxdi = ipxsearch->
begin(); pxdi != ipxsearch->
end(); pxdi++) {
481 if (DBshell == 1 || DBshell == 2) {
482 DBmodule = -DBmodule;
484 if (DBshell == 1 || DBshell == 3) {
485 DBladder = -DBladder;
488 int col = pxdi->column();
489 int row = pxdi->row();
491 float modsign = (
float)DBmodule / (
abs((
float)DBmodule));
492 float ladsign = (
float)DBladder / (
abs((
float)DBladder));
493 float rocx = ((
float)
col / (52. * 8.)) * modsign + ((
float)DBmodule - (modsign)*0.5);
494 float rocy = ((
float)row / (80. * 2.)) * ladsign + ((
float)DBladder - (ladsign)*0.5);
498 if ((DBladder % 2 == 0) && (!isHalfModule)) {
501 if ((
flip) && (DBladder > 0)) {
502 if ((((
float)DBladder - (ladsign)*0.5) <= rocy) && (rocy < (
float)DBladder)) {
503 rocy = rocy + ladsign * 0.5;
504 }
else if ((((
float)DBladder) <= rocy) && (rocy < ((
float)DBladder + (ladsign)*0.5))) {
505 rocy = rocy - ladsign * 0.5;
511 rocx = rocx - 0.0001;
514 rocy = rocy - 0.0001;
516 rocy = rocy + 0.0001;
518 if (
abs(DBladder) == 1) {
519 rocy = rocy + ladsign * 0.5;
521 meinput[DBlayer - 1]->Fill(rocx, rocy);
532 if (ipxsearch != clustColl.
end()) {
535 for (pxclust = ipxsearch->
begin(); pxclust != ipxsearch->
end(); pxclust++) {
537 const PixelGeomDetUnit *pixDet = dynamic_cast<const PixelGeomDetUnit *>(geoUnit);
542 float xclust = pxclust->x();
543 float yclust = pxclust->y();
544 float z = clustgp.
z();
552 if ((pxfside == 1) || (pxfside == 3)) {
553 pxfblade = -1. * pxfblade;
557 pxfdisk = -1. * pxfdisk;
560 int clu_sdpx = ((pxfdisk > 0) ? 1 : -1) * (2 * (
abs(pxfdisk) - 1) + pxfpanel);
561 int binselx = (pxfpanel == 1 && (pxfmodule == 1 || pxfmodule == 4))
563 : ((pxfpanel == 1 && xclust < 80.0) || (pxfpanel == 2 && xclust >= 80.0));
564 int nperpan = 2 * pxfmodule + pxfpanel - 1 + binselx;
566 ((pxfdisk > 0) ? nperpan : 9 - nperpan) + (clu_sdpx + 4) * 8 - 2 * ((
abs(pxfdisk) == 1) ? pxfdisk : 0);
568 int clu_roc_biny = -99.;
569 int nrocly = pxfmodule + pxfpanel;
570 for (
int i = 0;
i < nrocly;
i++) {
571 int j = (pxfdisk < 0) ?
i : nrocly - 1 -
i;
572 if (yclust >= (
j * 52.0) && yclust < ((
j + 1) * 52.0))
573 clu_roc_biny = 6 - nrocly + 2 *
i + ((pxfblade > 0) ? pxfblade - 1 : pxfblade + 12) * 12 + 1;
576 clu_roc_biny = clu_roc_biny + 144;
581 clu_roc_binx, clu_roc_biny + 1, meinput->
getBinContent(clu_roc_binx, clu_roc_biny + 1) + 1);