CMS 3D CMS Logo

GEMDQMBase.h
Go to the documentation of this file.
1 #ifndef DQM_GEM_INTERFACE_GEMDQMBase_h
2 #define DQM_GEM_INTERFACE_GEMDQMBase_h
3 
4 #include <map>
5 #include <tuple>
6 
15 
20 
23 
25 
28 
29 class GEMDQMBase : public DQMEDAnalyzer {
30 public:
31  // Borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
32  class BookingHelper {
33  public:
34  BookingHelper(DQMStore::IBooker &ibooker, const TString &name_suffix, const TString &title_suffix)
35  : ibooker_(&ibooker), name_suffix_(name_suffix), title_suffix_(title_suffix) {}
36 
38 
40  TString title,
41  int nbinsx,
42  double xlow,
43  double xup,
44  TString x_title = "",
45  TString y_title = "Entries") {
46  name += name_suffix_;
47  title += title_suffix_ + ";" + x_title + ";" + y_title;
48  return ibooker_->book1D(name, title, nbinsx, xlow, xup);
49  }
50 
52  TString title,
53  std::vector<double> &x_binning,
54  TString x_title = "",
55  TString y_title = "Entries") {
56  name += name_suffix_;
57  title += title_suffix_ + ";" + x_title + ";" + y_title;
58  TH1F *h_obj = new TH1F(name, title, x_binning.size() - 1, &x_binning[0]);
59  return ibooker_->book1D(name, h_obj);
60  }
61 
63  TString title,
64  int nbinsx,
65  double xlow,
66  double xup,
67  int nbinsy,
68  double ylow,
69  double yup,
70  TString x_title = "",
71  TString y_title = "") {
72  name += name_suffix_;
73  title += title_suffix_ + ";" + x_title + ";" + y_title;
74  return ibooker_->book2D(name, title, nbinsx, xlow, xup, nbinsy, ylow, yup);
75  }
76 
78  TString title,
79  int nbinsx,
80  double xlow,
81  double xup,
82  int nbinsy,
83  double ylow,
84  double yup,
85  double zlow,
86  double zup,
87  TString x_title = "",
88  TString y_title = "") {
89  name += name_suffix_;
90  title += title_suffix_ + ";" + x_title + ";" + y_title;
91  return ibooker_->bookProfile2D(name, title, nbinsx, xlow, xup, nbinsy, ylow, yup, zlow, zup);
92  }
93 
95 
96  private:
98  const TString name_suffix_;
99  const TString title_suffix_;
100  }; // BookingHelper
101 
102  template <class M, class K>
103  class MEMapInfT {
104  public:
106 
108  GEMDQMBase *pDQMBase, TString strName, TString strTitle, TString strTitleX = "", TString strTitleY = "Entries")
109  : pDQMBase_(pDQMBase),
110  strName_(strName),
111  strTitle_(strTitle),
112  strTitleX_(strTitleX),
113  strTitleY_(strTitleY),
114  log_category_own_(pDQMBase->log_category_){};
115 
117  TString strName,
118  TString strTitle,
119  Int_t nBinsX,
120  Double_t dXL,
121  Double_t dXH,
122  TString strTitleX = "",
123  TString strTitleY = "Entries")
124  : pDQMBase_(pDQMBase),
125  strName_(strName),
126  strTitle_(strTitle),
127  strTitleX_(strTitleX),
128  strTitleY_(strTitleY),
129  bOperating_(true),
132  nBinsX_(nBinsX),
133  dXL_(dXL),
134  dXH_(dXH),
135  nBinsY_(-1),
136  log_category_own_(pDQMBase->log_category_){};
137 
139  TString strName,
140  TString strTitle,
141  std::vector<Double_t> &x_binning,
142  TString strTitleX = "",
143  TString strTitleY = "Entries")
144  : pDQMBase_(pDQMBase),
145  strName_(strName),
146  strTitle_(strTitle),
147  strTitleX_(strTitleX),
148  strTitleY_(strTitleY),
149  bOperating_(true),
152  nBinsX_(-1),
153  nBinsY_(-1),
154  log_category_own_(pDQMBase->log_category_) {
155  for (Int_t i = 0; i < (Int_t)x_binning.size(); i++)
156  x_binning_.push_back(x_binning[i]);
157  };
158 
160  TString strName,
161  TString strTitle,
162  Int_t nBinsX,
163  Double_t dXL,
164  Double_t dXH,
165  Int_t nBinsY,
166  Double_t dYL,
167  Double_t dYH,
168  TString strTitleX = "",
169  TString strTitleY = "")
170  : pDQMBase_(pDQMBase),
171  strName_(strName),
172  strTitle_(strTitle),
173  strTitleX_(strTitleX),
174  strTitleY_(strTitleY),
175  bOperating_(true),
178  nBinsX_(nBinsX),
179  dXL_(dXL),
180  dXH_(dXH),
181  nBinsY_(nBinsY),
182  dYL_(dYL),
183  dYH_(dYH),
184  dZL_(0),
185  dZH_(1024),
186  log_category_own_(pDQMBase->log_category_){};
187 
188  MEMapInfT(GEMDQMBase *pDQMBase, // For TProfile2D
189  TString strName,
190  TString strTitle,
191  Int_t nBinsX,
192  Double_t dXL,
193  Double_t dXH,
194  Int_t nBinsY,
195  Double_t dYL,
196  Double_t dYH,
197  Double_t dZL,
198  Double_t dZH,
199  TString strTitleX = "",
200  TString strTitleY = "")
201  : pDQMBase_(pDQMBase),
202  strName_(strName),
203  strTitle_(strTitle),
204  strTitleX_(strTitleX),
205  strTitleY_(strTitleY),
206  bOperating_(true),
207  bIsProfile_(true),
209  nBinsX_(nBinsX),
210  dXL_(dXL),
211  dXH_(dXH),
212  nBinsY_(nBinsY),
213  dYL_(dYL),
214  dYH_(dYH),
215  dZL_(dZL),
216  dZH_(dZH),
217  log_category_own_(pDQMBase->log_category_){};
218 
219  //MEMapInfT(GEMDQMBase *pDQMBase,
220  // TString strName,
221  // TString strTitle,
222  // std::vector<Double_t> &x_binning,
223  // std::vector<Double_t> &y_binning,
224  // TString strTitleX = "",
225  // TString strTitleY = "")
226  // : pDQMBase_(pDQMBase),
227  // strName_(strName),
228  // strTitle_(strTitle),
229  // strTitleX_(strTitleX),
230  // strTitleY_(strTitleY),
231  // bOperating_(true),
232  // bIsNoUnderOverflowBin_(false),
233  // nBinsX_(nBinsX),
234  // dXL_(dXL),
235  // dXH_(dXH),
236  // nBinsY_(nBinsY),
237  // dYL_(dYL),
238  // dYH_(dYH),
239  // log_category_own_(pDQMBase->log_category_){};
240 
242 
243  Bool_t isOperating() { return bOperating_; };
244  void SetOperating(Bool_t bOperating) { bOperating_ = bOperating; };
245  void TurnOn() { bOperating_ = true; };
246  void TurnOff() { bOperating_ = false; };
248 
249  Bool_t isProfile() { return bIsProfile_; };
250  void SetProfile(Bool_t bIsProfile) { bIsProfile_ = bIsProfile; };
251 
252  TString GetName() { return strName_; };
253  void SetName(TString strName) { strName_ = strName; };
254  TString GetTitle() { return strTitle_; };
255  void SetTitle(TString strTitle) { strTitle_ = strTitle; };
256  TString GetTitleX() { return strTitleX_; };
257  void SetTitleX(TString strTitleX) { strTitleX_ = strTitleX; };
258  TString GetTitleY() { return strTitleY_; };
259  void SetTitleY(TString strTitleY) { strTitleY_ = strTitleY; };
260 
261  Int_t GetNbinsX() { return nBinsX_; };
262  void SetNbinsX(Int_t nBinsX) { nBinsX_ = nBinsX; };
263  Double_t GetBinLowEdgeX() { return dXL_; };
264  void SetBinLowEdgeX(Double_t dXL) { dXL_ = dXL; };
265  Double_t GetBinHighEdgeX() { return dXH_; };
266  void SetBinHighEdgeX(Double_t dXH) { dXH_ = dXH; };
267  // FIXME: x_binning_
268 
269  Int_t GetNbinsY() { return nBinsY_; };
270  void SetNbinsY(Int_t nBinsY) { nBinsY_ = nBinsY; };
271  Double_t GetBinLowEdgeY() { return dYL_; };
272  void SetBinLowEdgeY(Double_t dYL) { dYL_ = dYL; };
273  Double_t GetBinHighEdgeY() { return dYH_; };
274  void SetBinHighEdgeY(Double_t dYH) { dYH_ = dYH; };
275 
276  Double_t GetBinLowEdgeZ() { return dZL_; };
277  void SetBinLowEdgeZ(Double_t dZL) { dZL_ = dZL; };
278  Double_t GetBinHighEdgeZ() { return dZH_; };
279  void SetBinHighEdgeZ(Double_t dZH) { dZH_ = dZH; };
280 
281  void SetBinConfX(Int_t nBins, Double_t dL = 0.5, Double_t dH = -1048576.0) {
282  nBinsX_ = nBins;
283  dXL_ = dL;
284  if (dH <= dL)
285  dH = dL + nBins;
286  dXH_ = dH;
287  };
288 
289  void SetBinConfY(Int_t nBins, Double_t dL = 0.5, Double_t dH = -1048576.0) {
290  nBinsY_ = nBins;
291  dYL_ = dL;
292  if (dH <= dL)
293  dH = dL + nBins;
294  dYH_ = dH;
295  };
296 
297  void SetPointUOFlow() {
298  dXU_ = dXL_ + (dXH_ - dXL_) / nBinsX_ * 0.5;
299  dXO_ = dXL_ + (dXH_ - dXL_) / nBinsX_ * (nBinsX_ - 0.5);
300  dYU_ = dYL_ + (dYH_ - dYL_) / nBinsY_ * 0.5;
301  dYO_ = dYL_ + (dYH_ - dYL_) / nBinsY_ * (nBinsY_ - 0.5);
302  dZU_ = dZL_ + (dZH_ - dZL_) / nBinsZ_ * 0.5;
303  dZO_ = dZL_ + (dZH_ - dZL_) / nBinsZ_ * (nBinsZ_ - 0.5);
304  };
305 
306  M &map() { return mapHist; }
307  int bookND(BookingHelper &bh, K key) {
308  if (!bOperating_)
309  return 0;
310  SetPointUOFlow();
311  if (bIsProfile_) {
312  mapHist[key] = bh.bookProfile2D(
314  } else if (nBinsY_ > 0 && nBinsX_ > 0) {
316  return 0;
317  } else if (!x_binning_.empty()) {
319  return 0;
320  } else if (nBinsX_ > 0) {
322  return 0;
323  }
324 
325  return -1;
326  };
327 
329  if (mapHist.find(key) == mapHist.end()) {
331  << "WARNING: Cannot find the histogram corresponing to the given key\n"; // FIXME: It's about sending a message
332  return nullptr;
333  }
334  return mapHist[key];
335  };
336 
337  int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin = -1, Int_t nIdxStart = 1) {
338  if (!bOperating_)
339  return 0;
340  if (nNumBin <= 0) {
341  if (nAxis == 1)
342  nNumBin = nBinsX_;
343  else if (nAxis == 2)
344  nNumBin = nBinsY_;
345  else
346  return -1;
347  }
349  if (histCurr == nullptr)
350  return -999;
351  for (Int_t i = nIdxStart; i <= nNumBin; i++) {
352  histCurr->setBinLabel(i, Form("%i", i), nAxis);
353  }
354  return 0;
355  };
356 
357  int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin = -1) { return SetLabelForChambers(key, nAxis, nNumBin); };
358 
359  int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin = -1) {
360  if (!bOperating_)
361  return 0;
362  if (nNumBin <= 0) {
363  if (nAxis == 1)
364  nNumBin = nBinsX_;
365  else if (nAxis == 2)
366  nNumBin = nBinsY_;
367  else
368  return -1;
369  }
371  if (histCurr == nullptr)
372  return -999;
373  for (Int_t i = 0; i < nNumBin; i++) {
374  Int_t nIEta = pDQMBase_->getIEtaFromVFAT(std::get<1>(key), i);
375  histCurr->setBinLabel(i + 1, Form("%i (%i)", i, nIEta), nAxis);
376  }
377  return 0;
378  };
379 
380  int Fill(K key, Double_t x) {
381  if (!bOperating_)
382  return 0;
384  if (hist == nullptr)
385  return -999;
387  if (x <= dXL_)
388  x = dXU_;
389  else if (x >= dXH_)
390  x = dXO_;
391  }
392  hist->Fill(x);
393  return 1;
394  };
395 
396  int Fill(K key, Double_t x, Double_t y, Double_t w = 1.0) {
397  if (!bOperating_)
398  return 0;
400  if (hist == nullptr)
401  return -999;
403  if (x <= dXL_)
404  x = dXU_;
405  else if (x >= dXH_)
406  x = dXO_;
407  if (y <= dYL_)
408  y = dYU_;
409  else if (y >= dYH_)
410  y = dYO_;
411  }
412  hist->Fill(x, y, w);
413  return 1;
414  };
415 
416  int FillBits(K key, Double_t x, UInt_t bits, Double_t w = 1.0) {
417  if (!bOperating_)
418  return 0;
420  if (hist == nullptr)
421  return -999;
422 
423  if (nBinsY_ <= 0)
424  return -888;
425  UInt_t unMask = 0x1;
426  for (Int_t i = 1; i <= nBinsY_; i++) {
427  if ((unMask & bits) != 0)
428  hist->Fill(x, i, w);
429  unMask <<= 1;
430  }
431 
432  return 1;
433  };
434 
435  private:
437 
440  Bool_t bOperating_;
441  Bool_t bIsProfile_;
443 
444  std::vector<double> x_binning_;
445  Int_t nBinsX_;
446  Double_t dXL_, dXH_;
447  Int_t nBinsY_;
448  Double_t dYL_, dYH_;
449  Int_t nBinsZ_;
450  Double_t dZL_, dZH_;
451  Double_t dXU_, dXO_;
452  Double_t dYU_, dYO_;
453  Double_t dZU_, dZO_;
454 
456  };
457 
461 
463  public:
465  MEStationInfo(Int_t nRegion,
466  Int_t nStation,
467  Int_t nLayer,
468  Int_t nNumChambers,
469  Int_t nNumEtaPartitions,
470  Int_t nMaxVFAT,
471  Int_t nNumDigi)
472  : nRegion_(nRegion),
473  nStation_(nStation),
474  nLayer_(nLayer),
475  nNumChambers_(nNumChambers),
476  nNumEtaPartitions_(nNumEtaPartitions),
477  nMaxVFAT_(nMaxVFAT),
478  nNumDigi_(nNumDigi),
479  fMinPhi_(0){};
480 
481  bool operator==(const MEStationInfo &other) const {
482  return (nRegion_ == other.nRegion_ && nStation_ == other.nStation_ && nLayer_ == other.nLayer_ &&
483  nNumChambers_ == other.nNumChambers_ && nNumEtaPartitions_ == other.nNumEtaPartitions_ &&
484  nMaxVFAT_ == other.nMaxVFAT_ && nNumDigi_ == other.nNumDigi_);
485  };
486 
487  Int_t nRegion_; // the region index
488  Int_t nStation_; // the station index
489  Int_t nLayer_; // the layer
490  Int_t nNumChambers_; // the number of chambers in the current station
491  Int_t nNumEtaPartitions_; // the number of eta partitions of the chambers
492  Int_t nMaxVFAT_; // the number of all VFATs in each chamber (= # of VFATs in eta partition * nNumEtaPartitions_)
493  Int_t nNumDigi_; // the number of digis of each VFAT
494 
497  Float_t fMinPhi_;
498 
499  std::vector<Float_t> listRadiusEvenChamber_;
500  std::vector<Float_t> listRadiusOddChamber_;
501  };
502 
505 
506 public:
507  explicit GEMDQMBase(const edm::ParameterSet &cfg);
508  ~GEMDQMBase() override{};
509 
510  enum {
516  };
517 
518  Int_t nRunType_;
519 
521 
522 protected:
523  int initGeometry(edm::EventSetup const &iSetup);
524  int loadChambers();
525 
527  virtual int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key) { return 0; }; // must be overrided
528  virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
529  virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
530  virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
531  virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
532  virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
533 
534  int keyToRegion(ME2IdsKey key) { return std::get<0>(key); };
535  int keyToRegion(ME3IdsKey key) { return std::get<0>(key); };
536  int keyToRegion(ME4IdsKey key) { return std::get<0>(key); };
537  int keyToStation(ME2IdsKey key) { return std::get<1>(key); };
538  int keyToStation(ME3IdsKey key) { return std::get<1>(key); };
539  int keyToStation(ME4IdsKey key) { return std::get<1>(key); };
540  int keyToLayer(ME3IdsKey key) { return std::get<2>(key); };
541  int keyToLayer(ME4IdsKey key) { return std::get<2>(key); };
542  int keyToChamber(ME4IdsKey key) { return std::get<3>(key); };
543  int keyToIEta(ME3IdsKey key) { return std::get<2>(key); };
544  int keyToIEta(ME4IdsKey key) { return std::get<3>(key); };
545 
547  auto keyNew = ME2IdsKey{keyToRegion(key), keyToStation(key)};
548  return keyNew;
549  };
550 
552  auto keyNew = ME3IdsKey{keyToRegion(key), keyToStation(key), keyToLayer(key)};
553  return keyNew;
554  };
555 
556  int SortingLayers(std::vector<ME3IdsKey> &listLayers);
558 
559  template <typename T>
560  inline bool checkRefs(const std::vector<T *> &);
561 
562  int getNumEtaPartitions(const GEMStation *);
563  inline int getVFATNumber(const int, const int, const int);
564  inline int getVFATNumberGE11(const int, const int, const int);
565  inline int getVFATNumberByDigi(const int, const int, const int);
566  inline int getIEtaFromVFAT(const int station, const int vfat);
567  inline int getIEtaFromVFATGE0(const int vfat);
568  inline int getIEtaFromVFATGE11(const int vfat);
569  inline int getIEtaFromVFATGE21(const int vfat);
570  inline int getMaxVFAT(const int);
571  inline int getDetOccXBin(const int, const int, const int);
572  inline Float_t restrictAngle(const Float_t fTheta, const Float_t fStart);
574 
577 
578  std::vector<GEMDetId> listChamberId_;
579  std::map<GEMDetId, std::vector<const GEMEtaPartition *>> mapEtaPartition_;
580 
581  std::map<ME2IdsKey, bool> MEMap2Check_;
582  std::map<ME3IdsKey, bool> MEMap2WithEtaCheck_;
583  std::map<ME3IdsKey, bool> MEMap2AbsReWithEtaCheck_;
584  std::map<ME3IdsKey, bool> MEMap3Check_;
585  std::map<ME4IdsKey, bool> MEMap3WithChCheck_;
586  std::map<ME4IdsKey, bool> MEMap4Check_;
587 
589  std::map<ME3IdsKey, int> mapStationToIdx_;
590  std::map<ME3IdsKey, MEStationInfo> mapStationInfo_;
591 };
592 
593 // Borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
594 template <typename T>
595 inline bool GEMDQMBase::checkRefs(const std::vector<T *> &refs) {
596  if (refs.empty())
597  return false;
598  if (refs.front() == nullptr)
599  return false;
600  return true;
601 }
602 
603 // The 'get...' functions in the below are borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
604 inline int GEMDQMBase::getMaxVFAT(const int station) {
605  if (station == 0)
606  return GEMeMap::maxVFatGE0_;
607  if (station == 1)
608  return GEMeMap::maxVFatGE11_;
609  else if (station == 2)
610  return GEMeMap::maxVFatGE21_;
611  else
612  return -1;
613 }
614 
615 inline int GEMDQMBase::getVFATNumber(const int station, const int ieta, const int vfat_phi) {
616  if (station == 1)
617  return getVFATNumberGE11(station, ieta, vfat_phi);
618  return getVFATNumberGE11(station, ieta, vfat_phi); // FIXME: What about GE21 and GE0?
619 }
620 
621 inline int GEMDQMBase::getVFATNumberGE11(const int station, const int ieta, const int vfat_phi) {
622  return vfat_phi * GEMeMap::maxiEtaIdGE11_ + (GEMeMap::maxiEtaIdGE11_ - ieta);
623 }
624 
625 inline int GEMDQMBase::getVFATNumberByDigi(const int station, const int ieta, const int digi) {
626  const int vfat_phi = digi / GEMeMap::maxChan_;
627  return getVFATNumber(station, ieta, vfat_phi);
628 }
629 
630 inline int GEMDQMBase::getIEtaFromVFAT(const int station, const int vfat) {
631  if (station == 0)
632  return getIEtaFromVFATGE0(vfat);
633  if (station == 1)
634  return getIEtaFromVFATGE11(vfat);
635  if (station == 2)
636  return getIEtaFromVFATGE21(vfat);
637  return getIEtaFromVFATGE11(vfat); // FIXME: What about GE21 and GE0?
638 }
639 
640 inline int GEMDQMBase::getIEtaFromVFATGE0(const int vfat) {
642 }
643 
644 inline int GEMDQMBase::getIEtaFromVFATGE11(const int vfat) {
646 }
647 
648 inline int GEMDQMBase::getIEtaFromVFATGE21(const int vfat) {
650 }
651 
652 inline int GEMDQMBase::getDetOccXBin(const int chamber, const int layer, const int n_chambers) {
653  return n_chambers * (chamber - 1) + layer;
654 }
655 
656 inline Float_t GEMDQMBase::restrictAngle(const Float_t fTheta, const Float_t fStart) {
657  Float_t fLoop = (fTheta - fStart) / (2 * M_PI);
658  int nLoop = (fLoop >= 0 ? (int)fLoop : (int)fLoop - 1);
659  return fTheta - nLoop * 2 * M_PI;
660 }
661 
663  auto nStation = keyToStation(key3);
664  char cRegion = (keyToRegion(key3) > 0 ? 'P' : 'M');
665  auto nLayer = keyToLayer(key3);
666  return std::string(Form("GE%i1-%c-L%i", nStation, cRegion, nLayer));
667 }
668 
669 #endif // DQM_GEM_INTERFACE_GEMDQMBase_h
void SetName(TString strName)
Definition: GEMDQMBase.h:253
ME2IdsKey key3Tokey2(ME3IdsKey key)
Definition: GEMDQMBase.h:546
bool checkRefs(const std::vector< T *> &)
Definition: GEMDQMBase.h:595
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
Definition: GEMDQMBase.h:460
void SetBinLowEdgeZ(Double_t dZL)
Definition: GEMDQMBase.h:277
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
Definition: GEMDQMBase.cc:139
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:476
Int_t nRunType_
Definition: GEMDQMBase.h:518
~GEMDQMBase() override
Definition: GEMDQMBase.h:508
virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key)
Definition: GEMDQMBase.h:531
int getIEtaFromVFATGE0(const int vfat)
Definition: GEMDQMBase.h:640
std::vector< GEMDetId > listChamberId_
Definition: GEMDQMBase.h:578
virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:529
int getVFATNumber(const int, const int, const int)
Definition: GEMDQMBase.h:615
T w() const
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1, Int_t nIdxStart=1)
Definition: GEMDQMBase.h:337
int getVFATNumberByDigi(const int, const int, const int)
Definition: GEMDQMBase.h:625
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:459
int getIEtaFromVFATGE21(const int vfat)
Definition: GEMDQMBase.h:648
int initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMBase.cc:27
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
int readGeometryRadiusInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
Definition: GEMDQMBase.cc:237
static const int maxVFatGE0_
Definition: GEMeMap.h:66
BookingHelper(DQMStore::IBooker &ibooker, const TString &name_suffix, const TString &title_suffix)
Definition: GEMDQMBase.h:34
Bool_t bIsNoUnderOverflowBin_
Definition: GEMDQMBase.h:442
constexpr uint32_t bits
Definition: gpuClustering.h:23
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, Int_t nBinsX, Double_t dXL, Double_t dXH, Int_t nBinsY, Double_t dYL, Double_t dYH, TString strTitleX="", TString strTitleY="")
Definition: GEMDQMBase.h:159
static const int maxiEtaIdGE0_
Definition: GEMeMap.h:69
const TString name_suffix_
Definition: GEMDQMBase.h:98
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:359
void SetBinHighEdgeZ(Double_t dZH)
Definition: GEMDQMBase.h:279
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:590
int keyToRegion(ME2IdsKey key)
Definition: GEMDQMBase.h:534
int readGeometryPhiInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
Definition: GEMDQMBase.cc:298
int loadChambers()
Definition: GEMDQMBase.cc:56
Double_t GetBinLowEdgeX()
Definition: GEMDQMBase.h:263
void SetBinHighEdgeX(Double_t dXH)
Definition: GEMDQMBase.h:266
std::map< ME3IdsKey, int > mapStationToIdx_
Definition: GEMDQMBase.h:589
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, TString strTitleX="", TString strTitleY="Entries")
Definition: GEMDQMBase.h:107
static const int maxChan_
Definition: GEMeMap.h:72
int keyToLayer(ME3IdsKey key)
Definition: GEMDQMBase.h:540
Log< level::Error, false > LogError
std::vector< Float_t > listRadiusOddChamber_
Definition: GEMDQMBase.h:500
int keyToStation(ME3IdsKey key)
Definition: GEMDQMBase.h:538
int Fill(K key, Double_t x)
Definition: GEMDQMBase.h:380
std::string log_category_
Definition: GEMDQMBase.h:520
void SetTitleX(TString strTitleX)
Definition: GEMDQMBase.h:257
constexpr std::array< uint8_t, layerIndexSize > layer
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
Definition: GEMDQMBase.h:583
std::map< ME2IdsKey, bool > MEMap2Check_
Definition: GEMDQMBase.h:581
virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:530
Double_t GetBinLowEdgeY()
Definition: GEMDQMBase.h:271
std::string log_category_own_
Definition: GEMDQMBase.h:455
Double_t GetBinHighEdgeZ()
Definition: GEMDQMBase.h:278
void SetBinLowEdgeX(Double_t dXL)
Definition: GEMDQMBase.h:264
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Definition: GEMDQMBase.cc:171
std::vector< Float_t > listRadiusEvenChamber_
Definition: GEMDQMBase.h:499
std::map< ME3IdsKey, bool > MEMap3Check_
Definition: GEMDQMBase.h:584
int keyToRegion(ME3IdsKey key)
Definition: GEMDQMBase.h:535
int getIEtaFromVFATGE11(const int vfat)
Definition: GEMDQMBase.h:644
DQMStore::IBooker * ibooker_
Definition: GEMDQMBase.h:97
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
Definition: GEMDQMBase.h:656
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, std::vector< Double_t > &x_binning, TString strTitleX="", TString strTitleY="Entries")
Definition: GEMDQMBase.h:138
int keyToRegion(ME4IdsKey key)
Definition: GEMDQMBase.h:536
int getNumEtaPartitions(const GEMStation *)
Definition: GEMDQMBase.cc:40
static const int maxiEtaIdGE21_
Definition: GEMeMap.h:71
virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key)
Definition: GEMDQMBase.h:532
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
Definition: GEMDQMBase.h:576
void SetBinHighEdgeY(Double_t dYH)
Definition: GEMDQMBase.h:274
MEMapInfT< MEMap2Ids, ME2IdsKey > MEMap2Inf
Definition: GEMDQMBase.h:458
void SetNbinsY(Int_t nBinsY)
Definition: GEMDQMBase.h:270
std::vector< double > x_binning_
Definition: GEMDQMBase.h:444
int getMaxVFAT(const int)
Definition: GEMDQMBase.h:604
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)
int keyToStation(ME2IdsKey key)
Definition: GEMDQMBase.h:537
void SetTitle(TString strTitle)
Definition: GEMDQMBase.h:255
std::map< ME4IdsKey, bool > MEMap4Check_
Definition: GEMDQMBase.h:586
int keyToStation(ME4IdsKey key)
Definition: GEMDQMBase.h:539
MEStationInfo(Int_t nRegion, Int_t nStation, Int_t nLayer, Int_t nNumChambers, Int_t nNumEtaPartitions, Int_t nMaxVFAT, Int_t nNumDigi)
Definition: GEMDQMBase.h:465
#define M_PI
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, Int_t nBinsX, Double_t dXL, Double_t dXH, TString strTitleX="", TString strTitleY="Entries")
Definition: GEMDQMBase.h:116
Double_t GetBinHighEdgeX()
Definition: GEMDQMBase.h:265
__shared__ Hist hist
void SetOperating(Bool_t bOperating)
Definition: GEMDQMBase.h:244
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:575
int keyToIEta(ME4IdsKey key)
Definition: GEMDQMBase.h:544
bool operator==(const MEStationInfo &other) const
Definition: GEMDQMBase.h:481
void SetNoUnderOverflowBin()
Definition: GEMDQMBase.h:247
MonitorElement * book1D(TString name, TString title, std::vector< double > &x_binning, TString x_title="", TString y_title="Entries")
Definition: GEMDQMBase.h:51
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:357
void SetTitleY(TString strTitleY)
Definition: GEMDQMBase.h:259
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
int getDetOccXBin(const int, const int, const int)
Definition: GEMDQMBase.h:652
virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:528
DQMStore::IBooker * getBooker()
Definition: GEMDQMBase.h:94
const TString title_suffix_
Definition: GEMDQMBase.h:99
int keyToChamber(ME4IdsKey key)
Definition: GEMDQMBase.h:542
int getIEtaFromVFAT(const int station, const int vfat)
Definition: GEMDQMBase.h:630
Double_t GetBinHighEdgeY()
Definition: GEMDQMBase.h:273
int SortingLayers(std::vector< ME3IdsKey > &listLayers)
Definition: GEMDQMBase.cc:120
int Fill(K key, Double_t x, Double_t y, Double_t w=1.0)
Definition: GEMDQMBase.h:396
std::string getNameDirLayer(ME3IdsKey key3)
Definition: GEMDQMBase.h:662
GEMDQMBase(const edm::ParameterSet &cfg)
Definition: GEMDQMBase.cc:7
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
Definition: GEMDQMBase.h:582
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:551
std::map< GEMDetId, std::vector< const GEMEtaPartition * > > mapEtaPartition_
Definition: GEMDQMBase.h:579
MonitorElement * bookProfile2D(TString name, TString title, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, double zlow, double zup, TString x_title="", TString y_title="")
Definition: GEMDQMBase.h:77
MonitorElement * book1D(TString name, TString title, int nbinsx, double xlow, double xup, TString x_title="", TString y_title="Entries")
Definition: GEMDQMBase.h:39
static const int maxiEtaIdGE11_
Definition: GEMeMap.h:70
int nMaxNumCh_
Definition: GEMDQMBase.h:588
void SetNbinsX(Int_t nBinsX)
Definition: GEMDQMBase.h:262
static const int maxVFatGE21_
Definition: GEMeMap.h:68
int getVFATNumberGE11(const int, const int, const int)
Definition: GEMDQMBase.h:621
std::tuple< Int_t, Int_t > ME2IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:281
void SetProfile(Bool_t bIsProfile)
Definition: GEMDQMBase.h:250
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
int keyToLayer(ME4IdsKey key)
Definition: GEMDQMBase.h:541
MonitorElement * book2D(TString name, TString title, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, TString x_title="", TString y_title="")
Definition: GEMDQMBase.h:62
int FillBits(K key, Double_t x, UInt_t bits, Double_t w=1.0)
Definition: GEMDQMBase.h:416
std::map< ME4IdsKey, bool > MEMap3WithChCheck_
Definition: GEMDQMBase.h:585
Double_t GetBinLowEdgeZ()
Definition: GEMDQMBase.h:276
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:289
int keyToIEta(ME3IdsKey key)
Definition: GEMDQMBase.h:543
dqm::impl::MonitorElement * FindHist(K key)
Definition: GEMDQMBase.h:328
static const int maxVFatGE11_
Definition: GEMeMap.h:67
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, Int_t nBinsX, Double_t dXL, Double_t dXH, Int_t nBinsY, Double_t dYL, Double_t dYH, Double_t dZL, Double_t dZH, TString strTitleX="", TString strTitleY="")
Definition: GEMDQMBase.h:188
void SetBinLowEdgeY(Double_t dYL)
Definition: GEMDQMBase.h:272
virtual int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key)
Definition: GEMDQMBase.h:527
GEMDQMBase * pDQMBase_
Definition: GEMDQMBase.h:433