Go to the documentation of this file.00001
00002 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctHtMiss.h"
00003
00004 L1GctHtMiss::L1GctHtMiss() : m_data(0), m_bx(0) { }
00005
00006
00007
00008
00009
00010
00011 L1GctHtMiss::L1GctHtMiss(uint32_t rawData) : m_data(rawData & kRawCtorMask), m_bx(0) { }
00012
00013 L1GctHtMiss::L1GctHtMiss(uint32_t rawData, int16_t bx) : m_data(rawData & kRawCtorMask), m_bx(bx) { }
00014
00015 L1GctHtMiss::L1GctHtMiss(unsigned et, unsigned phi, bool oflow) : m_data(0),
00016 m_bx(0)
00017 {
00018 if ((et <= kHtMissMagMask) && (phi < kHtMissPhiNBins)) {
00019 m_data = (oflow ? kHtMissOFlowBit : 0) |
00020 ((et & kHtMissMagMask) << kHtMissMagShift) |
00021 ((phi & kHtMissPhiMask) << kHtMissPhiShift);
00022 }
00023 else {
00024 m_data = ((et & kHtMissMagMask) << kHtMissMagShift) | kHtMissOFlowBit ;
00025 }
00026 }
00027
00028 L1GctHtMiss::L1GctHtMiss(unsigned et, unsigned phi, bool oflow, int16_t bx) : m_data(0),
00029 m_bx(bx)
00030 {
00031 if ((et <= kHtMissMagMask) && (phi < kHtMissPhiNBins)) {
00032 m_data = (oflow ? kHtMissOFlowBit : 0) |
00033 ((et & kHtMissMagMask) << kHtMissMagShift) |
00034 ((phi & kHtMissPhiMask) << kHtMissPhiShift);
00035 }
00036 else {
00037 m_data = ((et & kHtMissMagMask) << kHtMissMagShift) | kHtMissOFlowBit ;
00038 }
00039 }
00040
00041 L1GctHtMiss::~L1GctHtMiss() { }
00042
00044 std::ostream& operator<<(std::ostream& s, const L1GctHtMiss& c) {
00045 s << " L1GctHtMiss: ";
00046 s << " mag=" << c.et() << ", phi=" << c.phi();
00047 if (c.overFlow()) { s << "; overflow set"; }
00048 return s;
00049 }
00050