Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:36:48

0001 //-------------------------------------------------
0002 //
0003 /** \class L1MuGMTLFPhiProEtaConvLUT
0004  *
0005  *   LFPhiProEtaConv look-up table
0006  *          
0007  *   this class was automatically generated by 
0008  *     L1MuGMTLUT::MakeSubClass()  
0009 */
0010 //
0011 //   Author :
0012 //   H. Sakulin            HEPHY Vienna
0013 //
0014 //   Migrated to CMSSW:
0015 //   I. Mikulec
0016 //
0017 //--------------------------------------------------
0018 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTLFPhiProEtaConvLUT_h
0019 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFPhiProEtaConvLUT_h
0020 
0021 //---------------
0022 // C++ Headers --
0023 //---------------
0024 
0025 //----------------------
0026 // Base Class Headers --
0027 //----------------------
0028 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h"
0029 
0030 //------------------------------------
0031 // Collaborating Class Declarations --
0032 //------------------------------------
0033 
0034 //              ---------------------
0035 //              -- Class Interface --
0036 //              ---------------------
0037 
0038 class L1MuGMTLFPhiProEtaConvLUT : public L1MuGMTLUT {
0039 public:
0040   enum { DT, BRPC, CSC, FRPC };
0041 
0042   /// constuctor using function-lookup
0043   L1MuGMTLFPhiProEtaConvLUT() : L1MuGMTLUT("LFPhiProEtaConv", "DT BRPC CSC FRPC", "eta_in(6)", "eta_out(4)", 6, true) {
0044     InitParameters();
0045   };
0046 
0047   /// destructor
0048   ~L1MuGMTLFPhiProEtaConvLUT() override {}
0049 
0050   /// specific lookup function for eta_out
0051   unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const {
0052     std::vector<unsigned> addr(1);
0053     addr[0] = eta_in;
0054     return Lookup(idx, addr)[0];
0055   };
0056 
0057   /// specific lookup function for entire output field
0058   unsigned SpecificLookup(int idx, unsigned eta_in) const {
0059     std::vector<unsigned> addr(1);
0060     addr[0] = eta_in;
0061     return LookupPacked(idx, addr);
0062   };
0063 
0064   /// access to lookup function with packed input and output
0065 
0066   unsigned LookupFunctionPacked(int idx, unsigned address) const override {
0067     std::vector<unsigned> addr = u2vec(address, m_Inputs);
0068     return TheLookupFunction(idx, addr[0]);
0069   };
0070 
0071 private:
0072   /// Initialize scales, configuration parameters, alignment constants, ...
0073   void InitParameters();
0074 
0075   /// The lookup function - here the functionality of the LUT is implemented
0076   unsigned TheLookupFunction(int idx, unsigned eta_in) const;
0077 
0078   /// Private data members (LUT parameters);
0079 };
0080 #endif