Back to home page

Project CMSSW displayed by LXR

 
 

    


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 // Static
0008 const int SiteLut::kInvalid = -1;
0009 
0010 // Member
0011 SiteLut::SiteLut() {
0012   lut_[{1, 1, 4}] = 0;   // ME1/1a
0013   lut_[{1, 1, 1}] = 0;   // ME1/1b
0014   lut_[{1, 1, 2}] = 1;   // ME1/2
0015   lut_[{1, 1, 3}] = 1;   // ME1/3
0016   lut_[{1, 2, 1}] = 2;   // ME2/1
0017   lut_[{1, 2, 2}] = 2;   // ME2/2
0018   lut_[{1, 3, 1}] = 3;   // ME3/1
0019   lut_[{1, 3, 2}] = 3;   // ME3/2
0020   lut_[{1, 4, 1}] = 4;   // ME4/1
0021   lut_[{1, 4, 2}] = 4;   // ME4/2
0022   lut_[{2, 1, 2}] = 5;   // RE1/2
0023   lut_[{2, 1, 3}] = 5;   // RE1/3
0024   lut_[{2, 2, 2}] = 6;   // RE2/2
0025   lut_[{2, 2, 3}] = 6;   // RE2/3
0026   lut_[{2, 3, 1}] = 7;   // RE3/1
0027   lut_[{2, 3, 2}] = 7;   // RE3/2
0028   lut_[{2, 3, 3}] = 7;   // RE3/3
0029   lut_[{2, 4, 1}] = 8;   // RE4/1
0030   lut_[{2, 4, 2}] = 8;   // RE4/2
0031   lut_[{2, 4, 3}] = 8;   // RE4/3
0032   lut_[{3, 1, 1}] = 9;   // GE1/1
0033   lut_[{3, 2, 1}] = 10;  // GE2/1
0034   lut_[{4, 1, 4}] = 11;  // ME0
0035 }
0036 
0037 SiteLut::~SiteLut() {
0038   // Do Nothing
0039 }
0040 
0041 void SiteLut::update(const edm::Event&, const edm::EventSetup&) {
0042   // Do Nothing
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 }