51 digisrc_(conf_.getParameter<
edm::
InputTag>(
"digisrc")),
52 saveFile(conf_.getUntrackedParameter<
bool>(
"saveFile",
false)),
53 isPIB(conf_.getUntrackedParameter<
bool>(
"isPIB",
false)),
54 slowDown(conf_.getUntrackedParameter<
bool>(
"slowDown",
false)),
55 modOn(conf_.getUntrackedParameter<
bool>(
"modOn",
true)),
56 twoDimOn(conf_.getUntrackedParameter<
bool>(
"twoDimOn",
true)),
57 reducedSet(conf_.getUntrackedParameter<
bool>(
"reducedSet",
false)),
58 ladOn(conf_.getUntrackedParameter<
bool>(
"ladOn",
false)),
59 layOn(conf_.getUntrackedParameter<
bool>(
"layOn",
false)),
60 phiOn(conf_.getUntrackedParameter<
bool>(
"phiOn",
false)),
61 ringOn(conf_.getUntrackedParameter<
bool>(
"ringOn",
false)),
62 bladeOn(conf_.getUntrackedParameter<
bool>(
"bladeOn",
false)),
63 diskOn(conf_.getUntrackedParameter<
bool>(
"diskOn",
false)),
64 smileyOn(conf_.getUntrackedParameter<
bool>(
"smileyOn",
false)),
65 bigEventSize(conf_.getUntrackedParameter<
int>(
"bigEventSize", 100)),
66 isUpgrade(conf_.getUntrackedParameter<
bool>(
"isUpgrade",
false)),
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());
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;
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();
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++) {
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);
int plaquetteName() const
plaquetteId (in pannel)
virtual void buildStructure(edm::EventSetup const &)
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
void setBinContent(int binx, double content)
set content of bin (1-D)
const_iterator end(bool update=false) const
iterator find(det_id_type id)
int moduleName() const
module id (index in z)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
std::vector< MonitorElement * > meClPosLayer
constexpr uint32_t rawId() const
get the raw id
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::LuminosityBlockNumber_t luminosityBlock() const
void getrococcupancy(DetId detId, const edm::DetSetVector< PixelDigi > &diginp, const TrackerTopology *const tTopo, std::vector< MonitorElement * > const &meinput)
std::vector< MonitorElement * > meClPosDiskmz
data_type const * const_iterator
void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > srcToken_
MonitorElement * meZeroRocFPIX
const Plane & surface() const
The nominal surface of the GeomDet.
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
SiPixelClusterSource(const edm::ParameterSet &conf)
static std::string const input
int bladeName() const
blade id
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.
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
bool isHalfModule() const
full or half module
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
MonitorElement * meClusBarrelProf
MonitorElement * meClusFpixMProf
~SiPixelClusterSource() override
void analyze(const edm::Event &, const edm::EventSetup &) override
iterator end()
Return the off-the-end iterator.
int ladderName() const
ladder id (index in phi)
std::vector< MonitorElement * > meZeroRocBPIX
T const * product() const
MonitorElement * book2D(Args &&...args)
void getrococcupancye(DetId detId, const edmNew::DetSetVector< SiPixelCluster > &clustColl, const TrackerTopology *const pTT, edm::ESHandle< TrackerGeometry > pDD, MonitorElement *meinput)
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > digisrcToken_
MonitorElement * meClusFpixPProf
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int layerName() const
layer id
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
std::vector< MonitorElement * > meClPosDiskpz
const_iterator find(id_type i, bool update=false) const
double getBinContent(int binx) const
get content of bin (1-D)
int pannelName() const
pannel id
virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup)
int diskName() const
disk id
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
HalfCylinder halfCylinder() const
collection_type::const_iterator const_iterator
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
T const * product() const
MonitorElement * bigFpixClusterEventRate
std::string topFolderName_
const_iterator begin(bool update=false) const