File indexing completed on 2024-04-06 12:21:02
0001 #include <utility>
0002
0003 #include "L1Trigger/L1TMuonEndCapPhase2/interface/Data/SiteLut.h"
0004
0005 using namespace emtf::phase2::data;
0006
0007
0008 const int SiteLut::kInvalid = -1;
0009
0010
0011 SiteLut::SiteLut() {
0012 lut_[{1, 1, 4}] = 0;
0013 lut_[{1, 1, 1}] = 0;
0014 lut_[{1, 1, 2}] = 1;
0015 lut_[{1, 1, 3}] = 1;
0016 lut_[{1, 2, 1}] = 2;
0017 lut_[{1, 2, 2}] = 2;
0018 lut_[{1, 3, 1}] = 3;
0019 lut_[{1, 3, 2}] = 3;
0020 lut_[{1, 4, 1}] = 4;
0021 lut_[{1, 4, 2}] = 4;
0022 lut_[{2, 1, 2}] = 5;
0023 lut_[{2, 1, 3}] = 5;
0024 lut_[{2, 2, 2}] = 6;
0025 lut_[{2, 2, 3}] = 6;
0026 lut_[{2, 3, 1}] = 7;
0027 lut_[{2, 3, 2}] = 7;
0028 lut_[{2, 3, 3}] = 7;
0029 lut_[{2, 4, 1}] = 8;
0030 lut_[{2, 4, 2}] = 8;
0031 lut_[{2, 4, 3}] = 8;
0032 lut_[{3, 1, 1}] = 9;
0033 lut_[{3, 2, 1}] = 10;
0034 lut_[{4, 1, 4}] = 11;
0035 }
0036
0037 SiteLut::~SiteLut() {
0038
0039 }
0040
0041 void SiteLut::update(const edm::Event&, const edm::EventSetup&) {
0042
0043 }
0044
0045 const int& SiteLut::lookup(const std::tuple<int, int, int>& key) const {
0046 auto found = lut_.find(key);
0047
0048 if (found == lut_.end())
0049 return SiteLut::kInvalid;
0050
0051 return found->second;
0052 }