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 
15 
18 class L1GctEtMiss {
19  public:
20 
23  enum numberOfBits {
32  };
33 
34  L1GctEtMiss();
35 
37  L1GctEtMiss(uint32_t rawData);
38 
40  L1GctEtMiss(uint32_t rawData, int16_t bx);
41 
42  L1GctEtMiss(unsigned et, unsigned phi, bool oflow);
43 
44  L1GctEtMiss(unsigned et, unsigned phi, bool oflow, int16_t bx);
45 
46  virtual ~L1GctEtMiss();
47 
49  std::string name() const { return "EtMiss"; }
50 
52  bool empty() const { return false; }
53 
55  uint32_t raw() const { return m_data; }
56 
58  unsigned et() const { return m_data & kEtMissMaxValue; }
59 
61  bool overFlow() const { return (m_data & kEtMissOFlowBit)!=0; }
62 
64  unsigned phi() const { return (m_data>>kEtMissPhiShift) & kETMissPhiMask; }
65 
67  int16_t bx() const { return m_bx; }
68 
70  int operator==(const L1GctEtMiss& e) const { return m_data==e.raw(); }
71 
73  int operator!=(const L1GctEtMiss& e) const { return m_data!=e.raw(); }
74 
75  private:
76 
77  uint32_t m_data;
78  int16_t m_bx;
79 
80 };
81 
83 std::ostream& operator<<(std::ostream& s, const L1GctEtMiss& c);
84 
85 
86 #endif
std::string name() const
name method
Definition: L1GctEtMiss.h:49
std::ostream & operator<<(std::ostream &s, const L1GctEtMiss &c)
Pretty-print operator for L1GctEtMiss.
Definition: L1GctEtMiss.cc:37
Persistable copy of missing Et measured at Level-1.
Definition: L1GctEtMiss.h:18
unsigned phi() const
get the Et
Definition: L1GctEtMiss.h:64
bool overFlow() const
get the overflow
Definition: L1GctEtMiss.h:61
int operator==(const L1GctEtMiss &e) const
equality operator
Definition: L1GctEtMiss.h:70
int16_t m_bx
Definition: L1GctEtMiss.h:78
uint32_t m_data
Definition: L1GctEtMiss.h:77
virtual ~L1GctEtMiss()
Definition: L1GctEtMiss.cc:34
uint32_t raw() const
get the data
Definition: L1GctEtMiss.h:55
unsigned et() const
get the magnitude
Definition: L1GctEtMiss.h:58
bool empty() const
empty method (= false; missing Et is always calculated)
Definition: L1GctEtMiss.h:52
int16_t bx() const
get bunch-crossing index
Definition: L1GctEtMiss.h:67
int operator!=(const L1GctEtMiss &e) const
inequality operator
Definition: L1GctEtMiss.h:73