CMS 3D CMS Logo

L1GctEtMiss.h
Go to the documentation of this file.
1 #ifndef L1GCTETMISS_H
2 #define L1GCTETMISS_H
3 
4 #include <ostream>
5 #include <cstdint>
6 
14 
17 class L1GctEtMiss {
18 public:
21  enum numberOfBits {
30  };
31 
32  L1GctEtMiss();
33 
35  L1GctEtMiss(uint32_t rawData);
36 
38  L1GctEtMiss(uint32_t rawData, int16_t bx);
39 
40  L1GctEtMiss(unsigned et, unsigned phi, bool oflow);
41 
42  L1GctEtMiss(unsigned et, unsigned phi, bool oflow, int16_t bx);
43 
44  virtual ~L1GctEtMiss();
45 
47  std::string name() const { return "EtMiss"; }
48 
50  bool empty() const { return false; }
51 
53  uint32_t raw() const { return m_data; }
54 
56  unsigned et() const { return m_data & kEtMissMaxValue; }
57 
59  bool overFlow() const { return (m_data & kEtMissOFlowBit) != 0; }
60 
62  unsigned phi() const { return (m_data >> kEtMissPhiShift) & kETMissPhiMask; }
63 
65  int16_t bx() const { return m_bx; }
66 
68  int operator==(const L1GctEtMiss& e) const { return m_data == e.raw(); }
69 
71  int operator!=(const L1GctEtMiss& e) const { return m_data != e.raw(); }
72 
73 private:
74  uint32_t m_data;
75  int16_t m_bx;
76 };
77 
79 std::ostream& operator<<(std::ostream& s, const L1GctEtMiss& c);
80 
81 #endif
std::string name() const
name method
Definition: L1GctEtMiss.h:47
std::ostream & operator<<(std::ostream &s, const L1GctEtMiss &c)
Pretty-print operator for L1GctEtMiss.
Definition: L1GctEtMiss.cc:33
Persistable copy of missing Et measured at Level-1.
Definition: L1GctEtMiss.h:17
unsigned phi() const
get the Et
Definition: L1GctEtMiss.h:62
bool overFlow() const
get the overflow
Definition: L1GctEtMiss.h:59
int operator==(const L1GctEtMiss &e) const
equality operator
Definition: L1GctEtMiss.h:68
int16_t m_bx
Definition: L1GctEtMiss.h:75
uint32_t m_data
Definition: L1GctEtMiss.h:74
virtual ~L1GctEtMiss()
Definition: L1GctEtMiss.cc:30
uint32_t raw() const
get the data
Definition: L1GctEtMiss.h:53
unsigned et() const
get the magnitude
Definition: L1GctEtMiss.h:56
bool empty() const
empty method (= false; missing Et is always calculated)
Definition: L1GctEtMiss.h:50
int16_t bx() const
get bunch-crossing index
Definition: L1GctEtMiss.h:65
int operator!=(const L1GctEtMiss &e) const
inequality operator
Definition: L1GctEtMiss.h:71