Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /** \class L1MuGMTMIAUEtaProLUT
0004  *
0005  *   MIAUEtaPro 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_L1MuGMTMIAUEtaProLUT_h
0019 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUEtaProLUT_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 L1MuGMTMIAUEtaProLUT : 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   L1MuGMTMIAUEtaProLUT()
0044       : L1MuGMTLUT("MIAUEtaPro",
0045                    "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
0046                    "eta(6) pt(5) charge(1)",
0047                    "eta_sel(10)",
0048                    12,
0049                    false) {
0050     InitParameters();
0051   };
0052 
0053   /// destructor
0054   ~L1MuGMTMIAUEtaProLUT() override {}
0055 
0056   /// specific lookup function for eta_sel
0057   unsigned SpecificLookup_eta_sel(int idx, unsigned eta, unsigned pt, unsigned charge) const {
0058     std::vector<unsigned> addr(3);
0059     addr[0] = eta;
0060     addr[1] = pt;
0061     addr[2] = charge;
0062     return Lookup(idx, addr)[0];
0063   };
0064 
0065   /// specific lookup function for entire output field
0066   unsigned SpecificLookup(int idx, unsigned eta, unsigned pt, unsigned charge) const {
0067     std::vector<unsigned> addr(3);
0068     addr[0] = eta;
0069     addr[1] = pt;
0070     addr[2] = charge;
0071     return LookupPacked(idx, addr);
0072   };
0073 
0074   /// access to lookup function with packed input and output
0075 
0076   unsigned LookupFunctionPacked(int idx, unsigned address) const override {
0077     std::vector<unsigned> addr = u2vec(address, m_Inputs);
0078     return TheLookupFunction(idx, addr[0], addr[1], addr[2]);
0079   };
0080 
0081 private:
0082   /// Initialize scales, configuration parameters, alignment constants, ...
0083   void InitParameters();
0084 
0085   /// The lookup function - here the functionality of the LUT is implemented
0086   unsigned TheLookupFunction(int idx, unsigned eta, unsigned pt, unsigned charge) const;
0087 
0088   /// Private data members (LUT parameters);
0089   int m_IsolationCellSizeEta;
0090   static float caloEtaBounds[15];
0091 };
0092 #endif