File indexing completed on 2024-04-06 12:20:25
0001 #include "L1Trigger/L1TCalorimeter/interface/CaloStage2Nav.h"
0002
0003 l1t::CaloStage2Nav::CaloStage2Nav() : homePos_(0, 0), currPos_(homePos_) {}
0004
0005 l1t::CaloStage2Nav::CaloStage2Nav(int iEta, int iPhi) : homePos_(iEta, iPhi), currPos_(homePos_) {}
0006
0007 l1t::CaloStage2Nav::CaloStage2Nav(std::pair<int, int> pos) : homePos_(pos), currPos_(homePos_) {}
0008
0009 std::pair<int, int> l1t::CaloStage2Nav::offsetFromCurrPos(int iEtaOffset, int iPhiOffset) const {
0010 std::pair<int, int> offsetPos;
0011 offsetPos.first = offsetIEta(currPos_.first, iEtaOffset);
0012 offsetPos.second = offsetIPhi(currPos_.second, iPhiOffset);
0013 return offsetPos;
0014 }
0015
0016 std::pair<int, int> l1t::CaloStage2Nav::move(int iEtaOffset, int iPhiOffset) {
0017 currPos_.first = offsetIEta(currPos_.first, iEtaOffset);
0018 currPos_.second = offsetIPhi(currPos_.second, iPhiOffset);
0019 return currPos_;
0020 }