CMS 3D CMS Logo

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),
37  nLumis_(nLumis),
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
float maxMisEB() const
uint32_t nEvents() const
uint64_t totHitsEE_
EcalPhiSymInfo(uint64_t hitsEB, uint64_t hitsEE, uint64_t nEvents, uint32_t nLumis, uint16_t fill, float delivLumi, float recLumi)
float delivLumi() const
void setMiscalibInfo(const int &nmis, const float &minEB, const float &maxEB, const float &minEE, const float &maxEE)
uint16_t fillNumber_
uint16_t nLumis_
float maxMisEE() const
assert(be >=bs)
uint8_t nMis() const
float minMisEB() const
~EcalPhiSymInfo()=default
float recLumi() const
uint16_t fillNumber() const
uint64_t totHitsEB_
uint16_t nLumis() const
EcalPhiSymInfo & operator+=(const EcalPhiSymInfo &rhs)
unsigned long long uint64_t
Definition: Time.h:13
float minMisEE() const
uint64_t totHitsEB() const
uint32_t nEvents_
uint64_t totHitsEE() const
uint64_t totHits() const