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++) {
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) {
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++) {
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);
virtual void buildStructure(edm::EventSetup const &)
Log< level::Info, true > LogVerbatim
uint32_t second(const DetId &id) const
T getParameter(std::string const &) const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopoToken_
iterator find(det_id_type id)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual void setCurrentFolder(std::string const &fullpath)
int bladeName() const
blade id
int moduleName() const
module id (index in z)
T const * product() const
std::vector< MonitorElement * > meClPosLayer
ALPAKA_FN_ACC int side(int ieta, int iphi)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomTokenBeginRun_
std::vector< MonitorElement * > meClPosDiskmz
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
data_type const * const_iterator
void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > srcToken_
MonitorElement * meZeroRocFPIX
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
SiPixelClusterSource(const edm::ParameterSet &conf)
static std::string const input
const_iterator end(bool update=false) const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
T const * product() const
bool isHalfModule() const
full or half module
int diskName() const
disk id
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
HalfCylinder halfCylinder() const
Abs< T >::type abs(const T &t)
MonitorElement * meClusBarrelProf
#define DEFINE_FWK_MODULE(type)
MonitorElement * meClusFpixMProf
void getrococcupancy(DetId detId, const edm::DetSetVector< PixelDigi > &diginp, const TrackerTopology *const tTopo, std::vector< MonitorElement *> const &meinput)
~SiPixelClusterSource() override
virtual 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)
void analyze(const edm::Event &, const edm::EventSetup &) override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
iterator end()
Return the off-the-end iterator.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin(bool update=false) const
const Plane & surface() const
The nominal surface of the GeomDet.
std::vector< MonitorElement * > meZeroRocBPIX
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
void getrococcupancye(DetId detId, const edmNew::DetSetVector< SiPixelCluster > &clustColl, const TrackerTopology *const pTT, edm::ESHandle< TrackerGeometry > pDD, MonitorElement *meinput)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopoTokenBeginRun_
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > digisrcToken_
int layerName() const
layer id
MonitorElement * meClusFpixPProf
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< MonitorElement * > meClPosDiskpz
const_iterator find(id_type i, bool update=false) const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int ladderName() const
ladder id (index in phi)
virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup)
iterator begin()
Return an iterator to the first DetSet.
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
modOn
online/offline RawDataErrors
MonitorElement * bigFpixClusterEventRate
std::string topFolderName_
int pannelName() const
pannel id
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
int plaquetteName() const
plaquetteId (in pannel)