File indexing completed on 2024-04-06 12:04:39
0001 #include "DataFormats/L1Trigger/interface/Jet.h"
0002 using namespace l1t;
0003
0004 void Jet::clear_extended() {
0005 towerIEta_ = 0;
0006 towerIPhi_ = 0;
0007 rawEt_ = 0;
0008 seedEt_ = 0;
0009 puEt_ = 0;
0010 puDonutEt_[0] = puDonutEt_[1] = puDonutEt_[2] = puDonutEt_[3] = 0;
0011 }
0012
0013 Jet::Jet(const LorentzVector& p4, int pt, int eta, int phi, int qual) : L1Candidate(p4, pt, eta, phi, qual, 0) {
0014 clear_extended();
0015 }
0016
0017 Jet::Jet(const PolarLorentzVector& p4, int pt, int eta, int phi, int qual) : L1Candidate(p4, pt, eta, phi, qual, 0) {
0018 clear_extended();
0019 }
0020
0021 Jet::~Jet() {}
0022
0023 void Jet::setTowerIEta(short int ieta) { towerIEta_ = ieta; }
0024
0025 void Jet::setTowerIPhi(short int iphi) { towerIPhi_ = iphi; }
0026
0027 void Jet::setSeedEt(short int et) { seedEt_ = et; }
0028
0029 void Jet::setRawEt(short int et) { rawEt_ = et; }
0030
0031 void Jet::setPUEt(short int et) { puEt_ = et; }
0032
0033 void Jet::setPUDonutEt(unsigned int i, short int et) {
0034 if (i < 4)
0035 puDonutEt_[i] = et;
0036 }
0037
0038 short int Jet::towerIEta() const { return towerIEta_; }
0039
0040 short int Jet::towerIPhi() const { return towerIPhi_; }
0041
0042 short int Jet::seedEt() const { return seedEt_; }
0043
0044 short int Jet::rawEt() const { return rawEt_; }
0045
0046 short int Jet::puEt() const { return puEt_; }
0047
0048 short int Jet::puDonutEt(int i) const {
0049 if (i >= 0 && i < 4)
0050 return puDonutEt_[i];
0051 else
0052 return 0;
0053 }
0054
0055 bool Jet::operator==(const l1t::Jet& rhs) const {
0056 return l1t::L1Candidate::operator==(static_cast<const l1t::L1Candidate&>(rhs)) && towerIEta_ == rhs.towerIEta() &&
0057 towerIPhi_ == rhs.towerIPhi() && rawEt_ == rhs.rawEt() && seedEt_ == rhs.seedEt() && puEt_ == rhs.puEt() &&
0058 puDonutEt_[0] == rhs.puDonutEt(0) && puDonutEt_[1] == rhs.puDonutEt(1) && puDonutEt_[2] == rhs.puDonutEt(2) &&
0059 puDonutEt_[3] == rhs.puDonutEt(3);
0060 }