File indexing completed on 2024-04-06 12:04:39
0001 #include "DataFormats/L1Trigger/interface/CaloSpare.h"
0002
0003 l1t::CaloSpare::CaloSpare(const LorentzVector& p4, CaloSpareType type, int pt, int eta, int phi, int qual)
0004 : L1Candidate(p4, pt, eta, phi, qual, 0), type_(type) {}
0005
0006 l1t::CaloSpare::CaloSpare(const PolarLorentzVector& p4, CaloSpareType type, int pt, int eta, int phi, int qual)
0007 : L1Candidate(p4, pt, eta, phi, qual, 0), type_(type) {}
0008
0009 l1t::CaloSpare::~CaloSpare() {}
0010
0011 void l1t::CaloSpare::setType(CaloSpareType type) { type_ = type; }
0012
0013 int l1t::CaloSpare::GetRing(unsigned index) const { return ((hwPt() >> (index * 3)) & 0x7); }
0014
0015 void l1t::CaloSpare::SetRing(const unsigned index, int value) {
0016 setHwPt(hwPt() & ~(0x7 << (index * 3)));
0017 setHwPt(hwPt() | (((value & 0x7) << (index * 3))));
0018 }
0019
0020 l1t::CaloSpare::CaloSpareType l1t::CaloSpare::getType() const { return type_; }