File indexing completed on 2024-04-06 12:04:27
0001
0002 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEtMiss.h"
0003
0004 L1GctEtMiss::L1GctEtMiss() : m_data(0), m_bx(0) {}
0005
0006
0007
0008
0009
0010 L1GctEtMiss::L1GctEtMiss(uint32_t rawData) : m_data(rawData & kRawCtorMask), m_bx(0) {}
0011
0012 L1GctEtMiss::L1GctEtMiss(uint32_t rawData, int16_t bx) : m_data(rawData & kRawCtorMask), m_bx(bx) {}
0013
0014 L1GctEtMiss::L1GctEtMiss(unsigned et, unsigned phi, bool oflow) : m_data(0), m_bx(0) {
0015 if ((et <= kEtMissMaxValue) && (phi < kEtMissPhiNBins)) {
0016 m_data = et | (oflow ? kEtMissOFlowBit : 0) | ((phi & kETMissPhiMask) << kEtMissPhiShift);
0017 } else {
0018 m_data = (et & kEtMissMaxValue) | kEtMissOFlowBit;
0019 }
0020 }
0021
0022 L1GctEtMiss::L1GctEtMiss(unsigned et, unsigned phi, bool oflow, int16_t bx) : m_data(0), m_bx(bx) {
0023 if ((et <= kEtMissMaxValue) && (phi < kEtMissPhiNBins)) {
0024 m_data = et | (oflow ? kEtMissOFlowBit : 0) | ((phi & kETMissPhiMask) << kEtMissPhiShift);
0025 } else {
0026 m_data = (et & kEtMissMaxValue) | kEtMissOFlowBit;
0027 }
0028 }
0029
0030 L1GctEtMiss::~L1GctEtMiss() {}
0031
0032
0033 std::ostream& operator<<(std::ostream& s, const L1GctEtMiss& c) {
0034 s << " L1GctEtMiss: ";
0035 s << " mag=" << c.et() << ", phi=" << c.phi();
0036 if (c.overFlow()) {
0037 s << "; overflow set";
0038 }
0039 return s;
0040 }