CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalPhiSymInfo.h
Go to the documentation of this file.
1 #ifndef Calibration_EcalCalibAlgos_EcalPhiSymInfo_h
2 #define Calibration_EcalCalibAlgos_EcalPhiSymInfo_h
3 
11 #include <vector>
12 #include <cstdint>
13 #include <cassert>
14 
16 public:
17  //---ctors---
19  : totHitsEB_(0),
20  totHitsEE_(0),
21  nEvents_(0),
22  nLumis_(0),
23  fillNumber_(0),
24  delivLumi_(0),
25  recLumi_(0),
26  nMis_(0),
27  minMisEB_(0),
28  maxMisEB_(0),
29  minMisEE_(0),
30  maxMisEE_(0) {}
31 
33  uint64_t hitsEB, uint64_t hitsEE, uint64_t nEvents, uint32_t nLumis, uint16_t fill, float delivLumi, float recLumi)
34  : totHitsEB_(hitsEB),
35  totHitsEE_(hitsEE),
36  nEvents_(nEvents),
37  nLumis_(nLumis),
38  fillNumber_(fill),
39  delivLumi_(delivLumi),
40  recLumi_(recLumi),
41  nMis_(0),
42  minMisEB_(0),
43  maxMisEB_(0),
44  minMisEE_(0),
45  maxMisEE_(0) {}
46 
47  //---dtor---
48  ~EcalPhiSymInfo() = default;
49 
50  //---setters---
51  inline void setMiscalibInfo(
52  const int& nmis, const float& minEB, const float& maxEB, const float& minEE, const float& maxEE) {
53  nMis_ = nmis;
54  minMisEB_ = minEB;
55  maxMisEB_ = maxEB;
56  minMisEE_ = minEE;
57  maxMisEE_ = maxEE;
58  };
59 
60  //---getters---
61  inline uint64_t totHits() const { return totHitsEB_ + totHitsEE_; };
62  inline uint64_t totHitsEB() const { return totHitsEB_; };
63  inline uint64_t totHitsEE() const { return totHitsEE_; };
64  inline uint32_t nEvents() const { return nEvents_; };
65  inline uint16_t nLumis() const { return nLumis_; };
66  inline uint16_t fillNumber() const { return fillNumber_; };
67  inline float delivLumi() const { return delivLumi_; };
68  inline float recLumi() const { return recLumi_; };
69  inline uint8_t nMis() const { return nMis_; };
70  inline float minMisEB() const { return minMisEB_; };
71  inline float maxMisEB() const { return maxMisEB_; };
72  inline float minMisEE() const { return minMisEE_; };
73  inline float maxMisEE() const { return maxMisEE_; };
74 
75  //---operators---
77  // The class at the moment is designed to
78  // hold at most data from a single run.
79  // This implies fillNumber has to be the same,
80  // unless it was not set, in that case it is 0.
81  if (fillNumber_ != 0 && rhs.fillNumber() != 0)
82  assert(fillNumber_ == rhs.fillNumber());
83  else
85  totHitsEB_ += rhs.totHitsEB();
86  totHitsEE_ += rhs.totHitsEE();
87  nEvents_ += rhs.nEvents();
88  nLumis_ += rhs.nLumis();
89  delivLumi_ += rhs.delivLumi();
90  recLumi_ += rhs.recLumi();
91 
92  return *this;
93  }
94 
95 private:
98  uint32_t nEvents_;
99  uint16_t nLumis_;
100  uint16_t fillNumber_;
101  float delivLumi_;
102  float recLumi_;
103  uint8_t nMis_;
104  float minMisEB_;
105  float maxMisEB_;
106  float minMisEE_;
107  float maxMisEE_;
108 };
109 
110 #endif
uint64_t totHitsEB() const
uint64_t totHitsEE_
uint8_t nMis() const
float minMisEB() const
EcalPhiSymInfo(uint64_t hitsEB, uint64_t hitsEE, uint64_t nEvents, uint32_t nLumis, uint16_t fill, float delivLumi, float recLumi)
void setMiscalibInfo(const int &nmis, const float &minEB, const float &maxEB, const float &minEE, const float &maxEE)
uint16_t fillNumber_
uint16_t nLumis_
assert(be >=bs)
uint64_t totHitsEE() const
uint64_t totHits() const
~EcalPhiSymInfo()=default
float recLumi() const
uint64_t totHitsEB_
uint32_t nEvents() const
EcalPhiSymInfo & operator+=(const EcalPhiSymInfo &rhs)
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
float maxMisEE() const
unsigned long long uint64_t
Definition: Time.h:13
uint32_t nEvents_
float delivLumi() const
float minMisEE() const
float maxMisEB() const
uint16_t nLumis() const
uint16_t fillNumber() const