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 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) {
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  }
348  dqm::impl::MonitorElement *histCurr = FindHist(key);
349  if (histCurr == nullptr)
350  return -999;
351  for (Int_t i = 1; 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  }
370  dqm::impl::MonitorElement *histCurr = FindHist(key);
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_ &&
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 
495  Float_t fMinPhi_;
496 
497  std::vector<Float_t> listRadiusEvenChamber_;
498  std::vector<Float_t> listRadiusOddChamber_;
499  };
500 
503 
504 public:
505  explicit GEMDQMBase(const edm::ParameterSet &cfg);
506  ~GEMDQMBase() override{};
507 
508  enum {
514  };
515 
516  Int_t nRunType_;
517 
519 
520 protected:
521  int initGeometry(edm::EventSetup const &iSetup);
522  int loadChambers();
523 
525  virtual int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key) { return 0; }; // must be overrided
526  virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
527  virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
528  virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
529  virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
530  virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
531 
532  int keyToRegion(ME2IdsKey key) { return std::get<0>(key); };
533  int keyToRegion(ME3IdsKey key) { return std::get<0>(key); };
534  int keyToRegion(ME4IdsKey key) { return std::get<0>(key); };
535  int keyToStation(ME2IdsKey key) { return std::get<1>(key); };
536  int keyToStation(ME3IdsKey key) { return std::get<1>(key); };
537  int keyToStation(ME4IdsKey key) { return std::get<1>(key); };
538  int keyToLayer(ME3IdsKey key) { return std::get<2>(key); };
539  int keyToLayer(ME4IdsKey key) { return std::get<2>(key); };
540  int keyToChamber(ME4IdsKey key) { return std::get<3>(key); };
541  int keyToIEta(ME3IdsKey key) { return std::get<2>(key); };
542  int keyToIEta(ME4IdsKey key) { return std::get<3>(key); };
543 
545  auto keyNew = ME2IdsKey{keyToRegion(key), keyToStation(key)};
546  return keyNew;
547  };
548 
550  auto keyNew = ME3IdsKey{keyToRegion(key), keyToStation(key), keyToLayer(key)};
551  return keyNew;
552  };
553 
554  int SortingLayers(std::vector<ME3IdsKey> &listLayers);
556 
557  template <typename T>
558  inline bool checkRefs(const std::vector<T *> &);
559 
560  int getNumEtaPartitions(const GEMStation *);
561  inline int getVFATNumber(const int, const int, const int);
562  inline int getVFATNumberGE11(const int, const int, const int);
563  inline int getVFATNumberByDigi(const int, const int, const int);
564  inline int getIEtaFromVFAT(const int station, const int vfat);
565  inline int getIEtaFromVFATGE11(const int vfat);
566  inline int getMaxVFAT(const int);
567  inline int getDetOccXBin(const int, const int, const int);
568  inline Float_t restrictAngle(const Float_t fTheta, const Float_t fStart);
570 
573 
574  std::vector<GEMChamber> gemChambers_;
575 
576  std::map<ME2IdsKey, bool> MEMap2Check_;
577  std::map<ME3IdsKey, bool> MEMap2WithEtaCheck_;
578  std::map<ME3IdsKey, bool> MEMap2AbsReWithEtaCheck_;
579  std::map<ME3IdsKey, bool> MEMap3Check_;
580  std::map<ME4IdsKey, bool> MEMap3WithChCheck_;
581  std::map<ME4IdsKey, bool> MEMap4Check_;
582 
584  std::map<ME3IdsKey, int> mapStationToIdx_;
585  std::map<ME3IdsKey, MEStationInfo> mapStationInfo_;
586 
590 };
591 
592 // Borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
593 template <typename T>
594 inline bool GEMDQMBase::checkRefs(const std::vector<T *> &refs) {
595  if (refs.empty())
596  return false;
597  if (refs.front() == nullptr)
598  return false;
599  return true;
600 }
601 
602 // The 'get...' functions in the below are borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
603 inline int GEMDQMBase::getMaxVFAT(const int station) {
604  if (station == 1)
605  return GEMeMap::maxVFatGE11_;
606  else if (station == 2)
607  return GEMeMap::maxVFatGE21_;
608  else
609  return -1;
610 }
611 
612 inline int GEMDQMBase::getVFATNumber(const int station, const int ieta, const int vfat_phi) {
613  if (station == 1)
614  return getVFATNumberGE11(station, ieta, vfat_phi);
615  return getVFATNumberGE11(station, ieta, vfat_phi); // FIXME: What about GE21 and GE0?
616 }
617 
618 inline int GEMDQMBase::getVFATNumberGE11(const int station, const int ieta, const int vfat_phi) {
619  return vfat_phi * nNumEtaPartitionGE11_ + (nNumEtaPartitionGE11_ - ieta);
620 }
621 
622 inline int GEMDQMBase::getVFATNumberByDigi(const int station, const int ieta, const int digi) {
623  const int vfat_phi = digi / GEMeMap::maxChan_;
624  return getVFATNumber(station, ieta, vfat_phi);
625 }
626 
627 inline int GEMDQMBase::getIEtaFromVFAT(const int station, const int vfat) {
628  if (station == 1)
629  return getIEtaFromVFATGE11(vfat);
630  return getIEtaFromVFATGE11(vfat); // FIXME: What about GE21 and GE0?
631 }
632 
633 inline int GEMDQMBase::getIEtaFromVFATGE11(const int vfat) { return 8 - (vfat % nNumEtaPartitionGE11_); }
634 
635 inline int GEMDQMBase::getDetOccXBin(const int chamber, const int layer, const int n_chambers) {
636  return n_chambers * (chamber - 1) + layer;
637 }
638 
639 inline Float_t GEMDQMBase::restrictAngle(const Float_t fTheta, const Float_t fStart) {
640  Float_t fLoop = (fTheta - fStart) / (2 * M_PI);
641  int nLoop = (fLoop >= 0 ? (int)fLoop : (int)fLoop - 1);
642  return fTheta - nLoop * 2 * M_PI;
643 }
644 
646  auto nStation = keyToStation(key3);
647  const char *szRegion = (keyToRegion(key3) > 0 ? "P" : "M");
648  auto nLayer = keyToLayer(key3);
649  return std::string(Form("GE%i1-%s-L%i", nStation, szRegion, nLayer));
650 }
651 
652 #endif // DQM_GEM_INTERFACE_GEMDQMBase_h
void SetName(TString strName)
Definition: GEMDQMBase.h:253
ME2IdsKey key3Tokey2(ME3IdsKey key)
Definition: GEMDQMBase.h:544
Int_t nNumEtaPartitionGE11_
Definition: GEMDQMBase.h:588
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:142
bool checkRefs(const std::vector< T * > &)
Definition: GEMDQMBase.h:594
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
tuple cfg
Definition: looper.py:296
Int_t nRunType_
Definition: GEMDQMBase.h:516
~GEMDQMBase() override
Definition: GEMDQMBase.h:506
virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key)
Definition: GEMDQMBase.h:529
virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:527
int getVFATNumber(const int, const int, const int)
Definition: GEMDQMBase.h:612
int getVFATNumberByDigi(const int, const int, const int)
Definition: GEMDQMBase.h:622
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:459
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:337
int initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMBase.cc:31
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
int readGeometryRadiusInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
Definition: GEMDQMBase.cc:241
BookingHelper(DQMStore::IBooker &ibooker, const TString &name_suffix, const TString &title_suffix)
Definition: GEMDQMBase.h:34
Bool_t bIsNoUnderOverflowBin_
Definition: GEMDQMBase.h:442
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
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:585
int keyToRegion(ME2IdsKey key)
Definition: GEMDQMBase.h:532
int readGeometryPhiInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
Definition: GEMDQMBase.cc:302
int loadChambers()
Definition: GEMDQMBase.cc:62
Double_t GetBinLowEdgeX()
Definition: GEMDQMBase.h:263
void SetBinHighEdgeX(Double_t dXH)
Definition: GEMDQMBase.h:266
std::map< ME3IdsKey, int > mapStationToIdx_
Definition: GEMDQMBase.h:584
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:538
Log< level::Error, false > LogError
std::vector< Float_t > listRadiusOddChamber_
Definition: GEMDQMBase.h:498
int keyToStation(ME3IdsKey key)
Definition: GEMDQMBase.h:536
int Fill(K key, Double_t x)
Definition: GEMDQMBase.h:380
std::string log_category_
Definition: GEMDQMBase.h:518
void SetTitleX(TString strTitleX)
Definition: GEMDQMBase.h:257
constexpr std::array< uint8_t, layerIndexSize > layer
void Fill(long long x)
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
Definition: GEMDQMBase.h:578
std::map< ME2IdsKey, bool > MEMap2Check_
Definition: GEMDQMBase.h:576
virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:528
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:174
std::vector< Float_t > listRadiusEvenChamber_
Definition: GEMDQMBase.h:497
std::map< ME3IdsKey, bool > MEMap3Check_
Definition: GEMDQMBase.h:579
int keyToRegion(ME3IdsKey key)
Definition: GEMDQMBase.h:533
int getIEtaFromVFATGE11(const int vfat)
Definition: GEMDQMBase.h:633
DQMStore::IBooker * ibooker_
Definition: GEMDQMBase.h:97
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
Definition: GEMDQMBase.h:639
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:534
int getNumEtaPartitions(const GEMStation *)
Definition: GEMDQMBase.cc:46
virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key)
Definition: GEMDQMBase.h:530
std::vector< GEMChamber > gemChambers_
Definition: GEMDQMBase.h:574
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
Definition: GEMDQMBase.h:572
tuple key
prepare the HTCondor submission files and eventually submit them
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:603
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:535
void SetTitle(TString strTitle)
Definition: GEMDQMBase.h:255
std::map< ME4IdsKey, bool > MEMap4Check_
Definition: GEMDQMBase.h:581
int keyToStation(ME4IdsKey key)
Definition: GEMDQMBase.h:537
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:571
int keyToIEta(ME4IdsKey key)
Definition: GEMDQMBase.h:542
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:635
virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key)
Definition: GEMDQMBase.h:526
DQMStore::IBooker * getBooker()
Definition: GEMDQMBase.h:94
const TString title_suffix_
Definition: GEMDQMBase.h:99
int keyToChamber(ME4IdsKey key)
Definition: GEMDQMBase.h:540
int getIEtaFromVFAT(const int station, const int vfat)
Definition: GEMDQMBase.h:627
Double_t GetBinHighEdgeY()
Definition: GEMDQMBase.h:273
int SortingLayers(std::vector< ME3IdsKey > &listLayers)
Definition: GEMDQMBase.cc:123
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:645
bool operator==(const MEStationInfo &other) const
Definition: GEMDQMBase.h:481
GEMDQMBase(const edm::ParameterSet &cfg)
Definition: GEMDQMBase.cc:7
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
Definition: GEMDQMBase.h:577
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:549
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:583
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:618
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
T w() const
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:539
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
Int_t nNumEtaPartitionGE0_
Definition: GEMDQMBase.h:587
std::map< ME4IdsKey, bool > MEMap3WithChCheck_
Definition: GEMDQMBase.h:580
Int_t nNumEtaPartitionGE21_
Definition: GEMDQMBase.h:589
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:541
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:525
GEMDQMBase * pDQMBase_
Definition: GEMDQMBase.h:433