Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:48

0001 #include "L1Trigger/L1TMuon/interface/MicroGMTCaloIndexSelectionLUT.h"
0002 
0003 l1t::MicroGMTCaloIndexSelectionLUT::MicroGMTCaloIndexSelectionLUT(const std::string& fname, int type) : MicroGMTLUT() {
0004   if (type == MicroGMTConfiguration::ETA) {
0005     m_angleInWidth = 9;
0006     m_outWidth = 5;
0007     m_inputs.push_back(MicroGMTConfiguration::ETA);
0008   } else {
0009     m_angleInWidth = 10;
0010     m_outWidth = 6;
0011     m_inputs.push_back(MicroGMTConfiguration::PHI);
0012   }
0013 
0014   m_totalInWidth = m_angleInWidth;
0015 
0016   if (fname != std::string("")) {
0017     load(fname);
0018   }
0019 }
0020 
0021 l1t::MicroGMTCaloIndexSelectionLUT::MicroGMTCaloIndexSelectionLUT(l1t::LUT* lut, int type) : MicroGMTLUT(lut) {
0022   if (type == MicroGMTConfiguration::ETA) {
0023     m_angleInWidth = 9;
0024     m_outWidth = 5;
0025     m_inputs.push_back(MicroGMTConfiguration::ETA);
0026   } else {
0027     m_angleInWidth = 10;
0028     m_outWidth = 6;
0029     m_inputs.push_back(MicroGMTConfiguration::PHI);
0030   }
0031 
0032   m_totalInWidth = m_angleInWidth;
0033 
0034   m_initialized = true;
0035 }
0036 
0037 int l1t::MicroGMTCaloIndexSelectionLUT::lookup(int angle) const { return lookupPacked(angle); }