CMS 3D CMS Logo

L1GctHtMiss.h
Go to the documentation of this file.
1 #ifndef L1GCTHTMISS_H
2 #define L1GCTHTMISS_H
3 
4 #include <ostream>
5 #include <cstdint>
6 
13 
16 class L1GctHtMiss {
17 public:
23  enum numberOfBits {
33  };
34 
35  L1GctHtMiss();
36 
38  L1GctHtMiss(uint32_t rawData);
39 
41  L1GctHtMiss(uint32_t rawData, int16_t bx);
42 
43  L1GctHtMiss(unsigned et, unsigned phi, bool oflow);
44 
45  L1GctHtMiss(unsigned et, unsigned phi, bool oflow, int16_t bx);
46 
47  virtual ~L1GctHtMiss();
48 
50  std::string name() const { return "HtMiss"; }
51 
53  bool empty() const { return false; }
54 
56  uint32_t raw() const { return m_data; }
57 
59  unsigned et() const { return (m_data >> kHtMissMagShift) & kHtMissMagMask; }
60 
62  bool overFlow() const { return (m_data & kHtMissOFlowBit) != 0; }
63 
65  unsigned phi() const { return (m_data >> kHtMissPhiShift) & kHtMissPhiMask; }
66 
68  int16_t bx() const { return m_bx; }
69 
71  int operator==(const L1GctHtMiss& e) const { return m_data == e.raw(); }
72 
74  int operator!=(const L1GctHtMiss& e) const { return !(*this == e); }
75 
76 private:
77  uint32_t m_data;
78  int16_t m_bx;
79 };
80 
82 std::ostream& operator<<(std::ostream& s, const L1GctHtMiss& c);
83 
84 #endif
uint32_t raw() const
get the data
Definition: L1GctHtMiss.h:56
int operator!=(const L1GctHtMiss &e) const
inequality operator
Definition: L1GctHtMiss.h:74
std::string name() const
name method
Definition: L1GctHtMiss.h:50
int16_t m_bx
Definition: L1GctHtMiss.h:78
bool overFlow() const
get the overflow
Definition: L1GctHtMiss.h:62
int16_t bx() const
get bunch-crossing index
Definition: L1GctHtMiss.h:68
int operator==(const L1GctHtMiss &e) const
equality operator
Definition: L1GctHtMiss.h:71
unsigned et() const
get the magnitude
Definition: L1GctHtMiss.h:59
virtual ~L1GctHtMiss()
Definition: L1GctHtMiss.cc:33
Persistable copy of missing Et measured at Level-1.
Definition: L1GctHtMiss.h:16
bool empty() const
empty method (= false; missing Et is always calculated)
Definition: L1GctHtMiss.h:53
uint32_t m_data
Definition: L1GctHtMiss.h:77
std::ostream & operator<<(std::ostream &s, const L1GctHtMiss &c)
Pretty-print operator for L1GctHtMiss.
Definition: L1GctHtMiss.cc:36
unsigned phi() const
get the Et
Definition: L1GctHtMiss.h:65