Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:16

0001 //-------------------------------------------------
0002 //
0003 /** \class L1MuGMTMIAUEtaConvLUT
0004  *
0005  *   MIAUEtaConv 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_L1MuGMTMIAUEtaConvLUT_h
0019 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUEtaConvLUT_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 L1MuGMTMIAUEtaConvLUT : public L1MuGMTLUT {
0039 public:
0040   enum { MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC };
0041 
0042   /// constuctor using function-lookup
0043   L1MuGMTMIAUEtaConvLUT()
0044       : L1MuGMTLUT("MIAUEtaConv",
0045                    "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
0046                    "eta_in(6)",
0047                    "eta_out(4)",
0048                    6,
0049                    true) {
0050     InitParameters();
0051   };
0052 
0053   /// destructor
0054   ~L1MuGMTMIAUEtaConvLUT() override{};
0055 
0056   /// specific lookup function for eta_out
0057   unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const {
0058     std::vector<unsigned> addr(1);
0059     addr[0] = eta_in;
0060     return Lookup(idx, addr)[0];
0061   };
0062 
0063   /// specific lookup function for entire output field
0064   unsigned SpecificLookup(int idx, unsigned eta_in) const {
0065     std::vector<unsigned> addr(1);
0066     addr[0] = eta_in;
0067     return LookupPacked(idx, addr);
0068   };
0069 
0070   /// access to lookup function with packed input and output
0071 
0072   unsigned LookupFunctionPacked(int idx, unsigned address) const override {
0073     std::vector<unsigned> addr = u2vec(address, m_Inputs);
0074     return TheLookupFunction(idx, addr[0]);
0075   };
0076 
0077 private:
0078   /// Initialize scales, configuration parameters, alignment constants, ...
0079   void InitParameters();
0080 
0081   /// The lookup function - here the functionality of the LUT is implemented
0082   unsigned TheLookupFunction(int idx, unsigned eta_in) const;
0083 
0084   /// Private data members (LUT parameters);
0085 };
0086 #endif