CMS 3D CMS Logo

L1GctHtMiss.cc
Go to the documentation of this file.
1 
3 
4 L1GctHtMiss::L1GctHtMiss() : m_data(0), m_bx(0) {}
5 
6 // The raw data is masked off so as only the MHT magnitude, overflow + phi bits are stored.
7 // This is because the raw data stream also contains a BC0 flag on bit 31, bit 15 is always
8 // set to 1, bits 14:13 are always '10', and bits 30:16 are always '101010...'.
9 // This data is masked off so as to match an L1GctHtMiss object constructed using
10 // the L1GctHtMiss(unsigned et, unsigned phi, bool oflow) constructor.
11 L1GctHtMiss::L1GctHtMiss(uint32_t rawData) : m_data(rawData & kRawCtorMask), m_bx(0) {}
12 
13 L1GctHtMiss::L1GctHtMiss(uint32_t rawData, int16_t bx) : m_data(rawData & kRawCtorMask), m_bx(bx) {}
14 
15 L1GctHtMiss::L1GctHtMiss(unsigned et, unsigned phi, bool oflow) : m_data(0), m_bx(0) {
16  if ((et <= kHtMissMagMask) && (phi < kHtMissPhiNBins)) {
17  m_data = (oflow ? kHtMissOFlowBit : 0) | ((et & kHtMissMagMask) << kHtMissMagShift) |
19  } else {
21  }
22 }
23 
24 L1GctHtMiss::L1GctHtMiss(unsigned et, unsigned phi, bool oflow, int16_t bx) : m_data(0), m_bx(bx) {
25  if ((et <= kHtMissMagMask) && (phi < kHtMissPhiNBins)) {
26  m_data = (oflow ? kHtMissOFlowBit : 0) | ((et & kHtMissMagMask) << kHtMissMagShift) |
28  } else {
30  }
31 }
32 
34 
36 std::ostream& operator<<(std::ostream& s, const L1GctHtMiss& c) {
37  s << " L1GctHtMiss: ";
38  s << " mag=" << c.et() << ", phi=" << c.phi();
39  if (c.overFlow()) {
40  s << "; overflow set";
41  }
42  return s;
43 }
std::ostream & operator<<(std::ostream &s, const L1GctHtMiss &c)
Pretty-print operator for L1GctHtMiss.
Definition: L1GctHtMiss.cc:36
virtual ~L1GctHtMiss()
Definition: L1GctHtMiss.cc:33
Persistable copy of missing Et measured at Level-1.
Definition: L1GctHtMiss.h:16
uint32_t m_data
Definition: L1GctHtMiss.h:77
unsigned phi() const
get the Et
Definition: L1GctHtMiss.h:65
unsigned et() const
get the magnitude
Definition: L1GctHtMiss.h:59