CMS 3D CMS Logo

SiPixelQualityPlotter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CondTools/SiPixel
4 // Class: SiPixelQualityPlotter
5 //
13 //
14 // Original Author: Marco Musich
15 // Created: Fri, 05 Jun 2020 12:28:51 GMT
16 //
17 //
18 
19 // user include files
43 
44 // system includes
45 #include <iostream>
46 #include <fstream> // std::ifstream
47 #include <memory>
48 
49 // ROOT includes
50 #include "TH2.h"
51 #include "TCanvas.h"
52 
53 namespace payloadPlotting {
54 
55  /*--------------------------------------------------------------------*/
56  std::vector<std::tuple<int, int, int>> maskedBarrelRocsToBins(
57  int layer, int ladder, int module, std::bitset<16> bad_rocs, bool isFlipped)
58  /*--------------------------------------------------------------------*/
59  {
60  std::vector<std::tuple<int, int, int>> rocsToMask;
61 
62  int nlad_list[4] = {6, 14, 22, 32};
63  int nlad = nlad_list[layer - 1];
64 
65  int start_x = module > 0 ? ((module + 4) * 8) + 1 : ((4 - (std::abs(module))) * 8) + 1;
66  int start_y = ladder > 0 ? ((ladder + nlad) * 2) + 1 : ((nlad - (std::abs(ladder))) * 2) + 1;
67 
68  int roc0_x = ((layer == 1) || (layer > 1 && module > 0)) ? start_x + 7 : start_x;
69  int roc0_y = start_y - 1;
70 
71  size_t idx = 0;
72  while (idx < bad_rocs.size()) {
73  if (bad_rocs.test(idx)) {
74  int roc_x(0), roc_y(0);
75 
76  if ((layer == 1) || (layer > 1 && module > 0)) {
77  if (!isFlipped) {
78  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
79  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
80  } else {
81  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
82  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
83  }
84  } else {
85  if (!isFlipped) {
86  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
87  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
88  } else {
89  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
90  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
91  }
92  }
93 
94  edm::LogInfo("payloadPlotting") << bad_rocs << " : (idx)= " << idx << std::endl;
95  edm::LogInfo("payloadPlotting") << " layer: " << layer << std::endl;
96  edm::LogInfo("payloadPlotting") << "module: " << module << " roc_x:" << roc_x << std::endl;
97  edm::LogInfo("payloadPlotting") << "ladder: " << ladder << " roc_y:" << roc_y << std::endl;
98  edm::LogInfo("payloadPlotting") << "=================================================================="
99  << std::endl;
100 
101  rocsToMask.push_back(std::make_tuple(roc_x, roc_y, idx));
102  }
103  ++idx;
104  }
105  return rocsToMask;
106  }
107 
108  /*--------------------------------------------------------------------*/
109  std::vector<std::tuple<int, int, int>> maskedForwardRocsToBins(
110  int ring, int blade, int panel, int disk, std::bitset<16> bad_rocs, bool isFlipped)
111  /*--------------------------------------------------------------------*/
112  {
113  std::vector<std::tuple<int, int, int>> rocsToMask;
114  int nybins_list[2] = {92, 140};
115  int nybins = nybins_list[ring - 1];
116 
117  int start_x = disk > 0 ? ((disk + 3) * 8) + 1 : ((3 - (std::abs(disk))) * 8) + 1;
118  int start_y = blade > 0 ? (nybins / 2) + (blade * 4) - (panel * 2) + 3
119  : ((nybins / 2) - (std::abs(blade) * 4) - panel * 2) + 3;
120 
121  int roc0_x = disk > 0 ? start_x + 7 : start_x;
122  int roc0_y = start_y - 1;
123 
124  size_t idx = 0;
125  while (idx < bad_rocs.size()) {
126  if (bad_rocs.test(idx)) {
127  int roc_x(0), roc_y(0);
128 
129  if (disk > 0) {
130  if (!isFlipped) {
131  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
132  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
133  } else {
134  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
135  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
136  }
137  } else {
138  if (!isFlipped) {
139  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
140  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
141  } else {
142  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
143  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
144  }
145  }
146 
147  edm::LogInfo("payloadPlotting") << bad_rocs << " : (idx)= " << idx << std::endl;
148  edm::LogInfo("payloadPlotting") << " panel: " << panel << " isFlipped: " << isFlipped << std::endl;
149  edm::LogInfo("payloadPlotting") << " disk: " << disk << " roc_x:" << roc_x << std::endl;
150  edm::LogInfo("payloadPlotting") << " blade: " << blade << " roc_y:" << roc_y << std::endl;
151  edm::LogInfo("payloadPlotting") << "===============================" << std::endl;
152 
153  rocsToMask.push_back(std::make_tuple(roc_x, roc_y, idx));
154  }
155  ++idx;
156  }
157  return rocsToMask;
158  }
159 } // namespace payloadPlotting
160 
161 //
162 // class declaration
163 //
164 
165 class SiPixelQualityPlotter : public edm::one::EDAnalyzer<edm::one::SharedResources> {
166 public:
167  explicit SiPixelQualityPlotter(const edm::ParameterSet&);
168  ~SiPixelQualityPlotter() override;
169 
170  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
171  void CMS_lumi(TPad* pad, float lumi);
172 
173 private:
174  void beginJob() override;
175  void analyze(const edm::Event&, const edm::EventSetup&) override;
176  void endJob() override;
177 
178  // ----------member data ---------------------------
181 
182  const bool useLogScale_;
183  const bool addLumiInfo_;
185  const unsigned int lastRun_;
186 
189 
192 
193  float totalLumi_;
196 
197  // actual histograms to fill
198  static const int n_layers = 4;
199  std::array<TH2D*, n_layers> h_bpix_occ;
200 
201  static const int n_rings = 2;
202  std::array<TH2D*, n_rings> h_fpix_occ;
203 
204  // cached payload
205  std::map<uint32_t, std::bitset<16>> cachedPayload_;
206 };
207 
208 //
209 // constructors and destructor
210 //
212  : topoEsToken_(esConsumes()),
213  qualEsToken_(esConsumes()),
214  useLogScale_(iConfig.getParameter<bool>("useLogScale")),
215  addLumiInfo_(iConfig.getParameter<bool>("addLumiInfo")),
216  analyzedTag_(iConfig.getParameter<std::string>("analyzedTag")),
217  lastRun_(iConfig.getUntrackedParameter<unsigned int>("maxRun", 999999)),
218  lumiInputTag_(iConfig.getUntrackedParameter<edm::InputTag>("lumiInputTag")),
219  lumiToken_(consumes<LumiInfo>(lumiInputTag_)) {
220  // initialize the counters
221 
222  IOVcount_ = 0;
223  totalLumi_ = 0.f;
224  lumiSinceLastReset_ = 0.f;
225  lastIOVtime_ = 0;
226 
227  // --------------------- BOOK HISTOGRAMS
228  // BPIX
229  int nlad_list[n_layers] = {6, 14, 22, 32};
230  int divide_roc = 1;
231 
232  for (unsigned int lay = 1; lay <= n_layers; lay++) {
233  int nlad = nlad_list[lay - 1];
234 
235  std::string name = "occ_Layer_" + std::to_string(lay);
236  std::string title = "; BPix Layer " + std::to_string(lay) + " Module # ; BPix Layer " + std::to_string(lay) +
237  " Ladder # ; fraction of bad luminosity per component (%)";
238  h_bpix_occ[lay - 1] = new TH2D(
239  name.c_str(), title.c_str(), 72 * divide_roc, -4.5, 4.5, (nlad * 4 + 2) * divide_roc, -nlad - 0.5, nlad + 0.5);
240  }
241 
242  // FPIX
243  for (unsigned int ring = 1; ring <= n_rings; ring++) {
244  int n = ring == 1 ? 92 : 140;
245  float y = ring == 1 ? 11.5 : 17.5;
246  std::string name = "occ_ring_" + std::to_string(ring);
247  std::string title = "; FPix Ring " + std::to_string(ring) + " Disk # ; FPix Ring " + std::to_string(ring) +
248  " Blade/Panel # ; fraction of bad luminosity per component (%)";
249 
250  h_fpix_occ[ring - 1] = new TH2D(name.c_str(), title.c_str(), 56 * divide_roc, -3.5, 3.5, n * divide_roc, -y, y);
251  }
252 }
253 
255  // delete the histograms
256  for (unsigned int lay = 1; lay <= n_layers; lay++) {
257  delete h_bpix_occ[lay - 1];
258  }
259 
260  for (unsigned int ring = 1; ring <= n_rings; ring++) {
261  delete h_fpix_occ[ring - 1];
262  }
263 }
264 
265 //
266 // member functions
267 //
268 
269 // ------------ method called for each event ------------
271  using namespace edm;
272 
273  unsigned int RunNumber_ = iEvent.eventAuxiliary().run();
274  unsigned int LuminosityBlockNumber_ = iEvent.eventAuxiliary().luminosityBlock();
275 
276  cond::UnpackedTime localtime = std::make_pair(RunNumber_, LuminosityBlockNumber_);
277  cond::Time_t packedtime = cond::time::pack(localtime);
278 
279  bool hasQualityIOV = SiPixelQualityWatcher_.check(iSetup);
280 
281  const auto& m_trackerTopo = iSetup.getData(topoEsToken_);
282 
283  if (hasQualityIOV || RunNumber_ > lastRun_) {
284  IOVcount_++;
285  lastIOVtime_ = packedtime;
286 
287  edm::LogVerbatim("SiPixelQualityPlotter")
288  << "New IOV, Run: " << RunNumber_ << " LS:" << LuminosityBlockNumber_ << std::endl;
289  edm::LogVerbatim("SiPixelQualityPlotter")
290  << "Accumulated Luminosity: " << lumiSinceLastReset_ << " | Total Luminosity: " << totalLumi_ << std::endl;
291 
292  for (const auto [mod, payload] : cachedPayload_) {
293  int subid = DetId(mod).subdetId();
294  if (subid == PixelSubdetector::PixelBarrel) {
295  auto layer = m_trackerTopo.pxbLayer(DetId(mod));
296  auto s_ladder = SiPixelPI::signed_ladder(DetId(mod), m_trackerTopo, true);
297  auto s_module = SiPixelPI::signed_module(DetId(mod), m_trackerTopo, true);
298 
299  bool isFlipped = !SiPixelPI::isBPixOuterLadder(DetId(mod), m_trackerTopo, false);
300  if ((layer > 1 && s_module < 0))
301  isFlipped = !isFlipped;
302 
303  auto ladder = m_trackerTopo.pxbLadder(DetId(mod));
304  auto module = m_trackerTopo.pxbModule(DetId(mod));
305  LogDebug("SiPixelQualityPlotter")
306  << "layer:" << layer << " ladder:" << ladder << " module:" << module << " signed ladder: " << s_ladder
307  << " signed module: " << s_module << std::endl;
308 
309  auto bpix_rocsToMask = payloadPlotting::maskedBarrelRocsToBins(layer, s_ladder, s_module, payload, isFlipped);
310  for (const auto& bin : bpix_rocsToMask) {
311  double x = h_bpix_occ[layer - 1]->GetXaxis()->GetBinCenter(std::get<0>(bin));
312  double y = h_bpix_occ[layer - 1]->GetYaxis()->GetBinCenter(std::get<1>(bin));
313  h_bpix_occ[layer - 1]->Fill(x, y, lumiSinceLastReset_);
314  }
315  } else if (subid == PixelSubdetector::PixelEndcap) {
316  auto ring = SiPixelPI::ring(DetId(mod), m_trackerTopo, true);
317  auto s_blade = SiPixelPI::signed_blade(DetId(mod), m_trackerTopo, true);
318  auto s_disk = SiPixelPI::signed_disk(DetId(mod), m_trackerTopo, true);
319  auto s_blade_panel = SiPixelPI::signed_blade_panel(DetId(mod), m_trackerTopo, true);
320  auto panel = m_trackerTopo.pxfPanel(mod);
321 
322  bool isFlipped = (s_disk > 0) ? (panel == 1) : (panel == 2);
323 
324  LogDebug("SiPixelQualityPlotter")
325  << "ring:" << ring << " blade: " << s_blade << " panel: " << panel
326  << " signed blade/panel: " << s_blade_panel << " disk: " << s_disk << std::endl;
327 
328  auto fpix_rocsToMask =
329  payloadPlotting::maskedForwardRocsToBins(ring, s_blade, panel, s_disk, payload, isFlipped);
330  for (const auto& bin : fpix_rocsToMask) {
331  double x = h_fpix_occ[ring - 1]->GetXaxis()->GetBinCenter(std::get<0>(bin));
332  double y = h_fpix_occ[ring - 1]->GetYaxis()->GetBinCenter(std::get<1>(bin));
333  h_fpix_occ[ring - 1]->Fill(x, y, lumiSinceLastReset_);
334  }
335  } else {
336  throw cms::Exception("LogicError") << "Unknown Pixel SubDet ID " << std::endl;
337  }
338  }
339 
340  // clear the chached payload from memory
341  cachedPayload_.clear();
342 
343  //Retrieve the pixel quality from conditions
344  const SiPixelQuality* siPixelQuality_ = &iSetup.getData(qualEsToken_);
345 
346  // cache the new payload
347  auto theDisabledModules = siPixelQuality_->getBadComponentList();
348  for (const auto& mod : theDisabledModules) {
349  int coded_badRocs = mod.BadRocs;
350  std::bitset<16> bad_rocs(coded_badRocs);
351  // cache the payload
352  cachedPayload_.insert(std::make_pair(mod.DetID, bad_rocs));
353  }
354  // reset the luminosity count to zero
356  } // if there has been a new IOV
357 
358  if (RunNumber_ > lastRun_)
359  return;
360 
361  // retrieve the luminosity
362  const LumiInfo& lumi = iEvent.get(lumiToken_);
363  totalLumi_ += (lumi.integLuminosity() * 1e-9); // convert /ub to /fb
364  lumiSinceLastReset_ += (lumi.integLuminosity() * 1e-9); // convert /ub to /fb
365 }
366 
367 // ------------ method called once each job just before starting event loop ------------
369  // please remove this method if not needed
370 }
371 
372 // ------------ method called once each job just after ending the event loop ------------
375  edm::LogVerbatim("SiPixelQualityPlotter")
376  << "\n=============================================\n"
377  << "Last Analyzed LS: " << unpackedtime.first << "," << unpackedtime.second << std::endl;
378  edm::LogVerbatim("SiPixelQualityPlotter") << "A total of " << IOVcount_ << " IOVs have been analyzed!" << std::endl;
379 
380  gStyle->SetOptStat(0);
381  //=========================
382  std::vector<TCanvas*> vCanvasBarrel(n_layers);
383  TCanvas canvasB("SummaryBarrel", "SummaryBarrel", 1400, 1200);
384  canvasB.Divide(2, 2);
385  for (unsigned int i = 1; i <= n_layers; i++) {
386  canvasB.cd(i)->SetTopMargin(0.06);
387  canvasB.cd(i)->SetBottomMargin(0.11);
388  canvasB.cd(i)->SetLeftMargin(0.12);
389  canvasB.cd(i)->SetRightMargin(0.16);
390  vCanvasBarrel[i - 1] = new TCanvas(Form("Layer_%i", i), Form("Layer_%i", i), 700, 600);
391  vCanvasBarrel[i - 1]->cd()->SetTopMargin(0.08);
392  vCanvasBarrel[i - 1]->cd()->SetBottomMargin(0.11);
393  vCanvasBarrel[i - 1]->cd()->SetLeftMargin(0.12);
394  vCanvasBarrel[i - 1]->cd()->SetRightMargin(0.16);
395  }
396 
397  for (unsigned int lay = 1; lay <= n_layers; lay++) {
398  h_bpix_occ[lay - 1]->Scale((100. / totalLumi_));
400  h_bpix_occ[lay - 1]->GetYaxis()->SetTitleOffset(1.2);
401  h_bpix_occ[lay - 1]->GetZaxis()->SetTitleOffset(1.3);
402  h_bpix_occ[lay - 1]->GetZaxis()->SetTitleSize(0.042);
403  h_bpix_occ[lay - 1]->GetZaxis()->CenterTitle();
404 
405  canvasB.cd(lay)->Modified();
406  SiPixelPI::dress_occup_plot(canvasB, h_bpix_occ[lay - 1], lay, 0, 1, true, true, true);
407 
408  if (useLogScale_) {
409  canvasB.cd(lay)->SetLogz();
410  }
411  if (addLumiInfo_) {
412  TPad* current_pad = static_cast<TPad*>(canvasB.cd(lay));
413  CMS_lumi(current_pad, totalLumi_);
414  }
415 
416  vCanvasBarrel[lay - 1]->cd()->Modified();
417  SiPixelPI::dress_occup_plot(*vCanvasBarrel[lay - 1], h_bpix_occ[lay - 1], lay, 0, 1, true, true, true);
418  if (useLogScale_) {
419  vCanvasBarrel[lay - 1]->cd()->SetLogz();
420  }
421  if (addLumiInfo_) {
422  TPad* current_pad = static_cast<TPad*>(vCanvasBarrel[lay - 1]->cd());
423  CMS_lumi(current_pad, totalLumi_);
424  }
425  }
426 
427  for (unsigned int lay = 1; lay <= n_layers; lay++) {
428  vCanvasBarrel[lay - 1]->SaveAs(("Barrel_L" + std::to_string(lay) + "_" + analyzedTag_ + ".png").c_str());
429  vCanvasBarrel[lay - 1]->SaveAs(("Barrel_L" + std::to_string(lay) + "_" + analyzedTag_ + ".pdf").c_str());
430  }
431 
432  canvasB.SaveAs(("SummaryBarrel_" + analyzedTag_ + ".png").c_str());
433  canvasB.SaveAs(("SummaryBarrel_" + analyzedTag_ + ".pdf").c_str());
434 
435  //=========================
436  std::vector<TCanvas*> vCanvasForward(2);
437  TCanvas canvasF("SummaryForward", "SummaryForward", 1400, 600);
438  canvasF.Divide(2, 1);
439  for (unsigned int i = 1; i <= n_rings; i++) {
440  canvasF.cd(i)->SetTopMargin(0.06);
441  canvasF.cd(i)->SetBottomMargin(0.11);
442  canvasF.cd(i)->SetLeftMargin(0.12);
443  canvasF.cd(i)->SetRightMargin(0.16);
444  vCanvasForward[i - 1] = new TCanvas(Form("Ring_%i", i), Form("Ring_%i", i), 700, 600);
445  vCanvasForward[i - 1]->cd()->SetTopMargin(0.08);
446  vCanvasForward[i - 1]->cd()->SetBottomMargin(0.11);
447  vCanvasForward[i - 1]->cd()->SetLeftMargin(0.12);
448  vCanvasForward[i - 1]->cd()->SetRightMargin(0.16);
449  }
450 
451  for (unsigned int ring = 1; ring <= n_rings; ring++) {
452  h_fpix_occ[ring - 1]->Scale((100. / totalLumi_));
454  h_fpix_occ[ring - 1]->GetYaxis()->SetTitleOffset(1.2);
455  h_fpix_occ[ring - 1]->GetZaxis()->SetTitleOffset(1.3);
456  h_fpix_occ[ring - 1]->GetZaxis()->SetTitleSize(0.042);
457  h_fpix_occ[ring - 1]->GetZaxis()->CenterTitle();
458 
459  canvasF.cd(ring)->Modified();
460  SiPixelPI::dress_occup_plot(canvasF, h_fpix_occ[ring - 1], 0, ring, 1, true, true, true);
461  if (useLogScale_) {
462  canvasF.cd(ring)->SetLogz();
463  }
464  if (addLumiInfo_) {
465  TPad* current_pad = static_cast<TPad*>(canvasF.cd(ring));
466  CMS_lumi(current_pad, totalLumi_);
467  }
468 
469  vCanvasForward[ring - 1]->cd()->Modified();
470  SiPixelPI::dress_occup_plot(*vCanvasForward[ring - 1], h_fpix_occ[ring - 1], 0, ring, 1, true, true, true);
471 
472  if (useLogScale_) {
473  vCanvasForward[ring - 1]->cd()->SetLogz();
474  }
475  if (addLumiInfo_) {
476  TPad* current_pad = static_cast<TPad*>(vCanvasForward[ring - 1]->cd());
477  CMS_lumi(current_pad, totalLumi_);
478  }
479  }
480 
481  for (unsigned int ring = 1; ring <= n_rings; ring++) {
482  vCanvasForward[ring - 1]->SaveAs(("Forward_R" + std::to_string(ring) + "_" + analyzedTag_ + ".png").c_str());
483  vCanvasForward[ring - 1]->SaveAs(("Forward_R" + std::to_string(ring) + "_" + analyzedTag_ + ".pdf").c_str());
484  }
485 
486  canvasF.SaveAs(("SummaryForward_" + analyzedTag_ + ".png").c_str());
487  canvasF.SaveAs(("SummaryForward_" + analyzedTag_ + ".pdf").c_str());
488 }
489 
490 // ------------ purely graphics method to embellish plots ------------
491 void SiPixelQualityPlotter::CMS_lumi(TPad* pad, float lumi) {
492  auto ltx = TLatex();
493  ltx.SetTextColor(1);
494  ltx.SetTextSize(0.045);
495  ltx.SetTextAlign(11);
496  char str[200];
497  sprintf(str, "#font[42]{L = %.3f fb^{-1}}", lumi);
498  ltx.DrawLatexNDC(gPad->GetLeftMargin(), 1 - gPad->GetTopMargin() + 0.01, str);
499 }
500 
501 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
504  desc.add<bool>("useLogScale", false);
505  desc.add<bool>("addLumiInfo", true);
506  desc.add<std::string>("analyzedTag", "");
507  desc.addUntracked<unsigned int>("maxRun", 999999);
508  desc.addUntracked<edm::InputTag>("lumiInputTag", edm::InputTag(""));
509  descriptions.add("siPixelQualityPlotter", desc);
510 }
511 
512 //define this as a plug-in
Log< level::Info, true > LogVerbatim
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
std::vector< std::tuple< int, int, int > > maskedForwardRocsToBins(int ring, int blade, int panel, int disk, std::bitset< 16 > bad_rocs, bool isFlipped)
std::vector< std::tuple< int, int, int > > maskedBarrelRocsToBins(int layer, int ladder, int module, std::bitset< 16 > bad_rocs, bool isFlipped)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
int signed_blade_panel(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
cond::Time_t pack(cond::UnpackedTime iValue)
static std::string to_string(const XMLCh *ch)
int signed_ladder(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoEsToken_
int iEvent
Definition: GenABIO.cc:224
const std::vector< disabledModuleType > getBadComponentList() const
unsigned long long Time_t
Definition: Time.h:14
int signed_disk(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
void analyze(const edm::Event &, const edm::EventSetup &) override
int signed_blade(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
const edm::EDGetTokenT< LumiInfo > lumiToken_
void CMS_lumi(TPad *pad, float lumi)
const edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > qualEsToken_
std::array< TH2D *, n_rings > h_fpix_occ
Log< level::Info, false > LogInfo
int ring(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
Definition: DetId.h:17
void makeNicePlotStyle(TH1 *hist)
int signed_module(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
std::map< uint32_t, std::bitset< 16 > > cachedPayload_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
const std::string analyzedTag_
std::array< TH2D *, n_layers > h_bpix_occ
const edm::InputTag lumiInputTag_
std::pair< unsigned int, unsigned int > UnpackedTime
Definition: Time.h:15
HLT enums.
bool isBPixOuterLadder(const DetId &detid, const TrackerTopology &tTopo, bool isPhase0)
edm::ESWatcher< SiPixelQualityFromDbRcd > SiPixelQualityWatcher_
void dress_occup_plot(TCanvas &canv, TH2 *h, int lay, int ring=0, int phase=0, bool half_shift=true, bool mark_zero=true, bool standard_palette=true)
#define str(s)
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
SiPixelQualityPlotter(const edm::ParameterSet &)
#define LogDebug(id)
cond::UnpackedTime unpack(cond::Time_t iValue)