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),
16  m_bx(0)
17 {
18  if ((et <= kHtMissMagMask) && (phi < kHtMissPhiNBins)) {
19  m_data = (oflow ? kHtMissOFlowBit : 0) |
20  ((et & kHtMissMagMask) << kHtMissMagShift) |
21  ((phi & kHtMissPhiMask) << kHtMissPhiShift);
22  }
23  else {
25  }
26 }
27 
28 L1GctHtMiss::L1GctHtMiss(unsigned et, unsigned phi, bool oflow, int16_t bx) : m_data(0),
29  m_bx(bx)
30 {
31  if ((et <= kHtMissMagMask) && (phi < kHtMissPhiNBins)) {
32  m_data = (oflow ? kHtMissOFlowBit : 0) |
33  ((et & kHtMissMagMask) << kHtMissMagShift) |
34  ((phi & kHtMissPhiMask) << kHtMissPhiShift);
35  }
36  else {
38  }
39 }
40 
42 
44 std::ostream& operator<<(std::ostream& s, const L1GctHtMiss& c) {
45  s << " L1GctHtMiss: ";
46  s << " mag=" << c.et() << ", phi=" << c.phi();
47  if (c.overFlow()) { s << "; overflow set"; }
48  return s;
49 }
50 
int16_t m_bx
Definition: L1GctHtMiss.h:80
bool overFlow() const
get the overflow
Definition: L1GctHtMiss.h:63
int16_t bx() const
get bunch-crossing index
Definition: L1GctHtMiss.h:69
std::ostream & operator<<(std::ostream &s, const L1GctHtMiss &c)
Pretty-print operator for L1GctHtMiss.
Definition: L1GctHtMiss.cc:44
unsigned et() const
get the magnitude
Definition: L1GctHtMiss.h:60
virtual ~L1GctHtMiss()
Definition: L1GctHtMiss.cc:41
Persistable copy of missing Et measured at Level-1.
Definition: L1GctHtMiss.h:16
uint32_t m_data
Definition: L1GctHtMiss.h:79
unsigned phi() const
get the Et
Definition: L1GctHtMiss.h:66