CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 DQMOffline/Muon/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 
94  private:
96  const TString name_suffix_;
97  const TString title_suffix_;
98  }; // BookingHelper
99 
100  template <class M, class K>
101  class MEMapInfT {
102  public:
104 
106  GEMDQMBase *pDQMBase, TString strName, TString strTitle, TString strTitleX = "", TString strTitleY = "Entries")
107  : pDQMBase_(pDQMBase),
108  strName_(strName),
109  strTitle_(strTitle),
110  strTitleX_(strTitleX),
111  strTitleY_(strTitleY),
112  log_category_own_(pDQMBase->log_category_){};
113 
115  TString strName,
116  TString strTitle,
117  Int_t nBinsX,
118  Double_t dXL,
119  Double_t dXH,
120  TString strTitleX = "",
121  TString strTitleY = "Entries")
122  : pDQMBase_(pDQMBase),
123  strName_(strName),
124  strTitle_(strTitle),
125  strTitleX_(strTitleX),
126  strTitleY_(strTitleY),
127  bOperating_(true),
130  nBinsX_(nBinsX),
131  dXL_(dXL),
132  dXH_(dXH),
133  nBinsY_(-1),
134  log_category_own_(pDQMBase->log_category_){};
135 
137  TString strName,
138  TString strTitle,
139  std::vector<Double_t> &x_binning,
140  TString strTitleX = "",
141  TString strTitleY = "Entries")
142  : pDQMBase_(pDQMBase),
143  strName_(strName),
144  strTitle_(strTitle),
145  strTitleX_(strTitleX),
146  strTitleY_(strTitleY),
147  bOperating_(true),
150  nBinsX_(-1),
151  nBinsY_(-1),
152  log_category_own_(pDQMBase->log_category_) {
153  for (Int_t i = 0; i < (Int_t)x_binning.size(); i++)
154  x_binning_.push_back(x_binning[i]);
155  };
156 
158  TString strName,
159  TString strTitle,
160  Int_t nBinsX,
161  Double_t dXL,
162  Double_t dXH,
163  Int_t nBinsY,
164  Double_t dYL,
165  Double_t dYH,
166  TString strTitleX = "",
167  TString strTitleY = "")
168  : pDQMBase_(pDQMBase),
169  strName_(strName),
170  strTitle_(strTitle),
171  strTitleX_(strTitleX),
172  strTitleY_(strTitleY),
173  bOperating_(true),
176  nBinsX_(nBinsX),
177  dXL_(dXL),
178  dXH_(dXH),
179  nBinsY_(nBinsY),
180  dYL_(dYL),
181  dYH_(dYH),
182  dZL_(0),
183  dZH_(1024),
184  log_category_own_(pDQMBase->log_category_){};
185 
186  MEMapInfT(GEMDQMBase *pDQMBase, // For TProfile2D
187  TString strName,
188  TString strTitle,
189  Int_t nBinsX,
190  Double_t dXL,
191  Double_t dXH,
192  Int_t nBinsY,
193  Double_t dYL,
194  Double_t dYH,
195  Double_t dZL,
196  Double_t dZH,
197  TString strTitleX = "",
198  TString strTitleY = "")
199  : pDQMBase_(pDQMBase),
200  strName_(strName),
201  strTitle_(strTitle),
202  strTitleX_(strTitleX),
203  strTitleY_(strTitleY),
204  bOperating_(true),
205  bIsProfile_(true),
207  nBinsX_(nBinsX),
208  dXL_(dXL),
209  dXH_(dXH),
210  nBinsY_(nBinsY),
211  dYL_(dYL),
212  dYH_(dYH),
213  dZL_(dZL),
214  dZH_(dZH),
215  log_category_own_(pDQMBase->log_category_){};
216 
217  //MEMapInfT(GEMDQMBase *pDQMBase,
218  // TString strName,
219  // TString strTitle,
220  // std::vector<Double_t> &x_binning,
221  // std::vector<Double_t> &y_binning,
222  // TString strTitleX = "",
223  // TString strTitleY = "")
224  // : pDQMBase_(pDQMBase),
225  // strName_(strName),
226  // strTitle_(strTitle),
227  // strTitleX_(strTitleX),
228  // strTitleY_(strTitleY),
229  // bOperating_(true),
230  // bIsNoUnderOverflowBin_(false),
231  // nBinsX_(nBinsX),
232  // dXL_(dXL),
233  // dXH_(dXH),
234  // nBinsY_(nBinsY),
235  // dYL_(dYL),
236  // dYH_(dYH),
237  // log_category_own_(pDQMBase->log_category_){};
238 
240 
241  Bool_t isOperating() { return bOperating_; };
242  void SetOperating(Bool_t bOperating) { bOperating_ = bOperating; };
243  void TurnOn() { bOperating_ = true; };
244  void TurnOff() { bOperating_ = false; };
246 
247  Bool_t isProfile() { return bIsProfile_; };
248  void SetProfile(Bool_t bIsProfile) { bIsProfile_ = bIsProfile; };
249 
250  TString GetName() { return strName_; };
251  void SetName(TString strName) { strName_ = strName; };
252  TString GetTitle() { return strTitle_; };
253  void SetTitle(TString strTitle) { strTitle_ = strTitle; };
254  TString GetTitleX() { return strTitleX_; };
255  void SetTitleX(TString strTitleX) { strTitleX_ = strTitleX; };
256  TString GetTitleY() { return strTitleY_; };
257  void SetTitleY(TString strTitleY) { strTitleY_ = strTitleY; };
258 
259  Int_t GetNbinsX() { return nBinsX_; };
260  void SetNbinsX(Int_t nBinsX) { nBinsX_ = nBinsX; };
261  Double_t GetBinLowEdgeX() { return dXL_; };
262  void SetBinLowEdgeX(Double_t dXL) { dXL_ = dXL; };
263  Double_t GetBinHighEdgeX() { return dXH_; };
264  void SetBinHighEdgeX(Double_t dXH) { dXH_ = dXH; };
265  // FIXME: x_binning_
266 
267  Int_t GetNbinsY() { return nBinsY_; };
268  void SetNbinsY(Int_t nBinsY) { nBinsY_ = nBinsY; };
269  Double_t GetBinLowEdgeY() { return dYL_; };
270  void SetBinLowEdgeY(Double_t dYL) { dYL_ = dYL; };
271  Double_t GetBinHighEdgeY() { return dYH_; };
272  void SetBinHighEdgeY(Double_t dYH) { dYH_ = dYH; };
273 
274  Double_t GetBinLowEdgeZ() { return dZL_; };
275  void SetBinLowEdgeZ(Double_t dZL) { dZL_ = dZL; };
276  Double_t GetBinHighEdgeZ() { return dZH_; };
277  void SetBinHighEdgeZ(Double_t dZH) { dZH_ = dZH; };
278 
279  void SetBinConfX(Int_t nBins, Double_t dL = 0.5, Double_t dH = -1048576.0) {
280  nBinsX_ = nBins;
281  dXL_ = dL;
282  if (dH <= dL)
283  dH = dL + nBins;
284  dXH_ = dH;
285  };
286 
287  void SetBinConfY(Int_t nBins, Double_t dL = 0.5, Double_t dH = -1048576.0) {
288  nBinsY_ = nBins;
289  dYL_ = dL;
290  if (dH <= dL)
291  dH = dL + nBins;
292  dYH_ = dH;
293  };
294 
295  void SetPointUOFlow() {
296  dXU_ = dXL_ + (dXH_ - dXL_) / nBinsX_ * 0.5;
297  dXO_ = dXL_ + (dXH_ - dXL_) / nBinsX_ * (nBinsX_ - 0.5);
298  dYU_ = dYL_ + (dYH_ - dYL_) / nBinsY_ * 0.5;
299  dYO_ = dYL_ + (dYH_ - dYL_) / nBinsY_ * (nBinsY_ - 0.5);
300  dZU_ = dZL_ + (dZH_ - dZL_) / nBinsZ_ * 0.5;
301  dZO_ = dZL_ + (dZH_ - dZL_) / nBinsZ_ * (nBinsZ_ - 0.5);
302  };
303 
304  M &map() { return mapHist; }
305  int bookND(BookingHelper &bh, K key) {
306  if (!bOperating_)
307  return 0;
308  SetPointUOFlow();
309  if (bIsProfile_) {
310  mapHist[key] = bh.bookProfile2D(
312  } else if (nBinsY_ > 0 && nBinsX_ > 0) {
314  return 0;
315  } else if (!x_binning_.empty()) {
317  return 0;
318  } else if (nBinsX_ > 0) {
320  return 0;
321  }
322 
323  return -1;
324  };
325 
327  if (mapHist.find(key) == mapHist.end()) {
329  << "WARNING: Cannot find the histogram corresponing to the given key\n"; // FIXME: It's about sending a message
330  }
331  return mapHist[key];
332  };
333 
334  int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin = -1) {
335  if (!bOperating_)
336  return 0;
337  if (nNumBin <= 0) {
338  if (nAxis == 1)
339  nNumBin = nBinsX_;
340  else if (nAxis == 2)
341  nNumBin = nBinsY_;
342  else
343  return -1;
344  }
345  dqm::impl::MonitorElement *histCurr = FindHist(key);
346  if (histCurr == nullptr)
347  return -999;
348  for (Int_t i = 1; i <= nNumBin; i++) {
349  histCurr->setBinLabel(i, Form("%i", i), nAxis);
350  }
351  return 0;
352  };
353 
354  int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin = -1) { return SetLabelForChambers(key, nAxis, nNumBin); };
355 
356  int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin = -1) {
357  if (!bOperating_)
358  return 0;
359  if (nNumBin <= 0) {
360  if (nAxis == 1)
361  nNumBin = nBinsX_;
362  else if (nAxis == 2)
363  nNumBin = nBinsY_;
364  else
365  return -1;
366  }
367  dqm::impl::MonitorElement *histCurr = FindHist(key);
368  if (histCurr == nullptr)
369  return -999;
370  for (Int_t i = 0; i < nNumBin; i++) {
371  Int_t nIEta = pDQMBase_->getIEtaFromVFAT(std::get<1>(key), i);
372  histCurr->setBinLabel(i + 1, Form("%i (%i)", i, nIEta), nAxis);
373  }
374  return 0;
375  };
376 
377  int Fill(K key, Double_t x) {
378  if (!bOperating_)
379  return 0;
381  if (hist == nullptr)
382  return -999;
384  if (x <= dXL_)
385  x = dXU_;
386  else if (x >= dXH_)
387  x = dXO_;
388  }
389  hist->Fill(x);
390  return 1;
391  };
392 
393  int Fill(K key, Double_t x, Double_t y, Double_t w = 1.0) {
394  if (!bOperating_)
395  return 0;
397  if (hist == nullptr)
398  return -999;
400  if (x <= dXL_)
401  x = dXU_;
402  else if (x >= dXH_)
403  x = dXO_;
404  if (y <= dYL_)
405  y = dYU_;
406  else if (y >= dYH_)
407  y = dYO_;
408  }
409  hist->Fill(x, y, w);
410  return 1;
411  };
412 
413  int FillBits(K key, Double_t x, UInt_t bits, Double_t w = 1.0) {
414  if (!bOperating_)
415  return 0;
417  if (hist == nullptr)
418  return -999;
419 
420  if (nBinsY_ <= 0)
421  return -888;
422  UInt_t unMask = 0x1;
423  for (Int_t i = 1; i <= nBinsY_; i++) {
424  if ((unMask & bits) != 0)
425  hist->Fill(x, i, w);
426  unMask <<= 1;
427  }
428 
429  return 1;
430  };
431 
432  private:
434 
437  Bool_t bOperating_;
438  Bool_t bIsProfile_;
440 
441  std::vector<double> x_binning_;
442  Int_t nBinsX_;
443  Double_t dXL_, dXH_;
444  Int_t nBinsY_;
445  Double_t dYL_, dYH_;
446  Int_t nBinsZ_;
447  Double_t dZL_, dZH_;
448  Double_t dXU_, dXO_;
449  Double_t dYU_, dYO_;
450  Double_t dZU_, dZO_;
451 
453  };
454 
458 
460  public:
462  MEStationInfo(Int_t nRegion,
463  Int_t nStation,
464  Int_t nLayer,
465  Int_t nNumChambers,
466  Int_t nNumEtaPartitions,
467  Int_t nMaxVFAT,
468  Int_t nNumDigi)
469  : nRegion_(nRegion),
470  nStation_(nStation),
471  nLayer_(nLayer),
472  nNumChambers_(nNumChambers),
473  nNumEtaPartitions_(nNumEtaPartitions),
474  nMaxVFAT_(nMaxVFAT),
475  nNumDigi_(nNumDigi){};
476 
477  bool operator==(const MEStationInfo &other) const {
478  return (nRegion_ == other.nRegion_ && nStation_ == other.nStation_ && nLayer_ == other.nLayer_ &&
480  nMaxVFAT_ == other.nMaxVFAT_ && nNumDigi_ == other.nNumDigi_);
481  };
482 
483  Int_t nRegion_; // the region index
484  Int_t nStation_; // the station index
485  Int_t nLayer_; // the layer
486  Int_t nNumChambers_; // the number of chambers in the current station
487  Int_t nNumEtaPartitions_; // the number of eta partitions of the chambers
488  Int_t nMaxVFAT_; // the number of all VFATs in each chamber (= # of VFATs in eta partition * nNumEtaPartitions_)
489  Int_t nNumDigi_; // the number of digis of each VFAT
490 
491  Float_t fMinPhi_;
492  };
493 
494 public:
495  explicit GEMDQMBase(const edm::ParameterSet &cfg);
496  ~GEMDQMBase() override{};
497 
499 
500 protected:
501  int initGeometry(edm::EventSetup const &iSetup);
502  int loadChambers();
503 
505  virtual int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key) { return 0; }; // must be overrided
506  virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
507  virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
508  virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
509  virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
510  virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
511 
512  int keyToRegion(ME2IdsKey key) { return std::get<0>(key); };
513  int keyToRegion(ME3IdsKey key) { return std::get<0>(key); };
514  int keyToRegion(ME4IdsKey key) { return std::get<0>(key); };
515  int keyToStation(ME2IdsKey key) { return std::get<1>(key); };
516  int keyToStation(ME3IdsKey key) { return std::get<1>(key); };
517  int keyToStation(ME4IdsKey key) { return std::get<1>(key); };
518  int keyToLayer(ME3IdsKey key) { return std::get<2>(key); };
519  int keyToLayer(ME4IdsKey key) { return std::get<2>(key); };
520  int keyToChamber(ME4IdsKey key) { return std::get<3>(key); };
521  int keyToIEta(ME3IdsKey key) { return std::get<2>(key); };
522  int keyToIEta(ME4IdsKey key) { return std::get<3>(key); };
523 
525  auto keyNew = ME2IdsKey{keyToRegion(key), keyToStation(key)};
526  return keyNew;
527  };
528 
530  auto keyNew = ME3IdsKey{keyToRegion(key), keyToStation(key), keyToLayer(key)};
531  return keyNew;
532  };
533 
534  int SortingLayers(std::vector<ME3IdsKey> &listLayers);
536 
537  template <typename T>
538  inline bool checkRefs(const std::vector<T *> &);
539 
540  int getNumEtaPartitions(const GEMStation *);
541  inline int getVFATNumber(const int, const int, const int);
542  inline int getVFATNumberGE11(const int, const int, const int);
543  inline int getVFATNumberByDigi(const int, const int, const int);
544  inline int getIEtaFromVFAT(const int station, const int vfat);
545  inline int getIEtaFromVFATGE11(const int vfat);
546  inline int getMaxVFAT(const int);
547  inline int getDetOccXBin(const int, const int, const int);
548  inline Float_t restrictAngle(const Float_t fTheta, const Float_t fStart);
549 
552 
553  std::vector<GEMChamber> gemChambers_;
554 
555  std::map<ME2IdsKey, bool> MEMap2Check_;
556  std::map<ME3IdsKey, bool> MEMap2WithEtaCheck_;
557  std::map<ME3IdsKey, bool> MEMap2AbsReWithEtaCheck_;
558  std::map<ME3IdsKey, bool> MEMap3Check_;
559  std::map<ME4IdsKey, bool> MEMap3WithChCheck_;
560  std::map<ME4IdsKey, bool> MEMap4Check_;
561 
563  std::map<ME3IdsKey, int> mapStationToIdx_;
564  std::map<ME3IdsKey, MEStationInfo> mapStationInfo_;
565 
569 };
570 
571 // Borrwed from DQMOffline/Muon/interface/GEMOfflineDQMBase.h
572 template <typename T>
573 inline bool GEMDQMBase::checkRefs(const std::vector<T *> &refs) {
574  if (refs.empty())
575  return false;
576  if (refs.front() == nullptr)
577  return false;
578  return true;
579 }
580 
581 // The 'get...' functions in the below are borrwed from DQMOffline/Muon/interface/GEMOfflineDQMBase.h
582 inline int GEMDQMBase::getMaxVFAT(const int station) {
583  if (station == 1)
584  return GEMeMap::maxVFatGE11_;
585  else if (station == 2)
586  return GEMeMap::maxVFatGE21_;
587  else
588  return -1;
589 }
590 
591 inline int GEMDQMBase::getVFATNumber(const int station, const int ieta, const int vfat_phi) {
592  if (station == 1)
593  return getVFATNumberGE11(station, ieta, vfat_phi);
594  return getVFATNumberGE11(station, ieta, vfat_phi); // FIXME: What about GE21 and GE0?
595 }
596 
597 inline int GEMDQMBase::getVFATNumberGE11(const int station, const int ieta, const int vfat_phi) {
598  return vfat_phi * nNumEtaPartitionGE11_ + (nNumEtaPartitionGE11_ - ieta);
599 }
600 
601 inline int GEMDQMBase::getVFATNumberByDigi(const int station, const int ieta, const int digi) {
602  const int vfat_phi = digi / GEMeMap::maxChan_;
603  return getVFATNumber(station, ieta, vfat_phi);
604 }
605 
606 inline int GEMDQMBase::getIEtaFromVFAT(const int station, const int vfat) {
607  if (station == 1)
608  return getIEtaFromVFATGE11(vfat);
609  return getIEtaFromVFATGE11(vfat); // FIXME: What about GE21 and GE0?
610 }
611 
612 inline int GEMDQMBase::getIEtaFromVFATGE11(const int vfat) { return 8 - (vfat % nNumEtaPartitionGE11_); }
613 
614 inline int GEMDQMBase::getDetOccXBin(const int chamber, const int layer, const int n_chambers) {
615  return n_chambers * (chamber - 1) + layer;
616 }
617 
618 inline Float_t GEMDQMBase::restrictAngle(const Float_t fTheta, const Float_t fStart) {
619  Float_t fLoop = (fTheta - fStart) / (2 * M_PI);
620  int nLoop = (fLoop >= 0 ? (int)fLoop : (int)fLoop - 1);
621  return fTheta - nLoop * 2 * M_PI;
622 }
623 
624 #endif // DQM_GEM_INTERFACE_GEMDQMBase_h
void SetName(TString strName)
Definition: GEMDQMBase.h:251
ME2IdsKey key3Tokey2(ME3IdsKey key)
Definition: GEMDQMBase.h:524
Int_t nNumEtaPartitionGE11_
Definition: GEMDQMBase.h:567
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
Definition: GEMDQMBase.h:457
void SetBinLowEdgeZ(Double_t dZL)
Definition: GEMDQMBase.h:275
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
Definition: GEMDQMBase.cc:125
bool checkRefs(const std::vector< T * > &)
Definition: GEMDQMBase.h:573
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:399
tuple cfg
Definition: looper.py:296
~GEMDQMBase() override
Definition: GEMDQMBase.h:496
virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key)
Definition: GEMDQMBase.h:509
const double w
Definition: UKUtility.cc:23
virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:507
int getVFATNumber(const int, const int, const int)
Definition: GEMDQMBase.h:591
int getVFATNumberByDigi(const int, const int, const int)
Definition: GEMDQMBase.h:601
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:456
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:334
int initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMBase.cc:15
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
BookingHelper(DQMStore::IBooker &ibooker, const TString &name_suffix, const TString &title_suffix)
Definition: GEMDQMBase.h:34
Bool_t bIsNoUnderOverflowBin_
Definition: GEMDQMBase.h:439
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:157
const TString name_suffix_
Definition: GEMDQMBase.h:96
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:356
void SetBinHighEdgeZ(Double_t dZH)
Definition: GEMDQMBase.h:277
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:564
int keyToRegion(ME2IdsKey key)
Definition: GEMDQMBase.h:512
int loadChambers()
Definition: GEMDQMBase.cc:46
Double_t GetBinLowEdgeX()
Definition: GEMDQMBase.h:261
void SetBinHighEdgeX(Double_t dXH)
Definition: GEMDQMBase.h:264
std::map< ME3IdsKey, int > mapStationToIdx_
Definition: GEMDQMBase.h:563
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, TString strTitleX="", TString strTitleY="Entries")
Definition: GEMDQMBase.h:105
static const int maxChan_
Definition: GEMeMap.h:72
int keyToLayer(ME3IdsKey key)
Definition: GEMDQMBase.h:518
Log< level::Error, false > LogError
int keyToStation(ME3IdsKey key)
Definition: GEMDQMBase.h:516
int Fill(K key, Double_t x)
Definition: GEMDQMBase.h:377
std::string log_category_
Definition: GEMDQMBase.h:496
void SetTitleX(TString strTitleX)
Definition: GEMDQMBase.h:255
constexpr std::array< uint8_t, layerIndexSize > layer
void Fill(long long x)
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
Definition: GEMDQMBase.h:557
std::map< ME2IdsKey, bool > MEMap2Check_
Definition: GEMDQMBase.h:555
virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:508
Double_t GetBinLowEdgeY()
Definition: GEMDQMBase.h:269
std::string log_category_own_
Definition: GEMDQMBase.h:452
Double_t GetBinHighEdgeZ()
Definition: GEMDQMBase.h:276
void SetBinLowEdgeX(Double_t dXL)
Definition: GEMDQMBase.h:262
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Definition: GEMDQMBase.cc:161
std::map< ME3IdsKey, bool > MEMap3Check_
Definition: GEMDQMBase.h:558
int keyToRegion(ME3IdsKey key)
Definition: GEMDQMBase.h:513
int getIEtaFromVFATGE11(const int vfat)
Definition: GEMDQMBase.h:612
DQMStore::IBooker * ibooker_
Definition: GEMDQMBase.h:95
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
Definition: GEMDQMBase.h:618
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, std::vector< Double_t > &x_binning, TString strTitleX="", TString strTitleY="Entries")
Definition: GEMDQMBase.h:136
int keyToRegion(ME4IdsKey key)
Definition: GEMDQMBase.h:514
int getNumEtaPartitions(const GEMStation *)
Definition: GEMDQMBase.cc:30
virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key)
Definition: GEMDQMBase.h:510
std::vector< GEMChamber > gemChambers_
Definition: GEMDQMBase.h:553
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
Definition: GEMDQMBase.h:551
tuple key
prepare the HTCondor submission files and eventually submit them
void SetBinHighEdgeY(Double_t dYH)
Definition: GEMDQMBase.h:272
MEMapInfT< MEMap2Ids, ME2IdsKey > MEMap2Inf
Definition: GEMDQMBase.h:455
void SetNbinsY(Int_t nBinsY)
Definition: GEMDQMBase.h:268
std::vector< double > x_binning_
Definition: GEMDQMBase.h:441
int getMaxVFAT(const int)
Definition: GEMDQMBase.h:582
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:515
void SetTitle(TString strTitle)
Definition: GEMDQMBase.h:253
std::map< ME4IdsKey, bool > MEMap4Check_
Definition: GEMDQMBase.h:560
int keyToStation(ME4IdsKey key)
Definition: GEMDQMBase.h:517
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:462
#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:114
Double_t GetBinHighEdgeX()
Definition: GEMDQMBase.h:263
__shared__ Hist hist
void SetOperating(Bool_t bOperating)
Definition: GEMDQMBase.h:242
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:550
int keyToIEta(ME4IdsKey key)
Definition: GEMDQMBase.h:522
void SetNoUnderOverflowBin()
Definition: GEMDQMBase.h:245
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:354
void SetTitleY(TString strTitleY)
Definition: GEMDQMBase.h:257
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:177
int getDetOccXBin(const int, const int, const int)
Definition: GEMDQMBase.h:614
virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:506
const TString title_suffix_
Definition: GEMDQMBase.h:97
int keyToChamber(ME4IdsKey key)
Definition: GEMDQMBase.h:520
int getIEtaFromVFAT(const int station, const int vfat)
Definition: GEMDQMBase.h:606
Double_t GetBinHighEdgeY()
Definition: GEMDQMBase.h:271
int SortingLayers(std::vector< ME3IdsKey > &listLayers)
Definition: GEMDQMBase.cc:106
int Fill(K key, Double_t x, Double_t y, Double_t w=1.0)
Definition: GEMDQMBase.h:393
bool operator==(const MEStationInfo &other) const
Definition: GEMDQMBase.h:477
GEMDQMBase(const edm::ParameterSet &cfg)
Definition: GEMDQMBase.cc:7
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
Definition: GEMDQMBase.h:556
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:305
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:529
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
int nMaxNumCh_
Definition: GEMDQMBase.h:562
void SetNbinsX(Int_t nBinsX)
Definition: GEMDQMBase.h:260
static const int maxVFatGE21_
Definition: GEMeMap.h:68
int getVFATNumberGE11(const int, const int, const int)
Definition: GEMDQMBase.h:597
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:279
void SetProfile(Bool_t bIsProfile)
Definition: GEMDQMBase.h:248
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:519
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:413
Int_t nNumEtaPartitionGE0_
Definition: GEMDQMBase.h:566
std::map< ME4IdsKey, bool > MEMap3WithChCheck_
Definition: GEMDQMBase.h:559
Int_t nNumEtaPartitionGE21_
Definition: GEMDQMBase.h:568
Double_t GetBinLowEdgeZ()
Definition: GEMDQMBase.h:274
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:287
int keyToIEta(ME3IdsKey key)
Definition: GEMDQMBase.h:521
dqm::impl::MonitorElement * FindHist(K key)
Definition: GEMDQMBase.h:326
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:186
void SetBinLowEdgeY(Double_t dYL)
Definition: GEMDQMBase.h:270
virtual int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key)
Definition: GEMDQMBase.h:505
GEMDQMBase * pDQMBase_
Definition: GEMDQMBase.h:430