Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /** \class L1MuGMTLFMatchQualLUT
0004  *
0005  *   LFMatchQual 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_L1MuGMTLFMatchQualLUT_h
0019 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMatchQualLUT_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 L1MuGMTLFMatchQualLUT : public L1MuGMTLUT {
0039 public:
0040   enum { DTRPC, CSCRPC, DTCSC, CSCDT, CSCbRPC, DTfRPC };
0041 
0042   /// constuctor using function-lookup
0043   L1MuGMTLFMatchQualLUT()
0044       : L1MuGMTLUT(
0045             "LFMatchQual", "DTRPC CSCRPC DTCSC CSCDT CSCbRPC DTfRPC", "delta_eta(4) delta_phi(3)", "mq(6)", 7, true) {
0046     InitParameters();
0047   };
0048 
0049   /// destructor
0050   ~L1MuGMTLFMatchQualLUT() override{};
0051 
0052   /// specific lookup function for mq
0053   unsigned SpecificLookup_mq(int idx, unsigned delta_eta, unsigned delta_phi) const {
0054     std::vector<unsigned> addr(2);
0055     addr[0] = delta_eta;
0056     addr[1] = delta_phi;
0057     return Lookup(idx, addr)[0];
0058   };
0059 
0060   /// specific lookup function for entire output field
0061   unsigned SpecificLookup(int idx, unsigned delta_eta, unsigned delta_phi) const {
0062     std::vector<unsigned> addr(2);
0063     addr[0] = delta_eta;
0064     addr[1] = delta_phi;
0065     return LookupPacked(idx, addr);
0066   };
0067 
0068   /// access to lookup function with packed input and output
0069 
0070   unsigned LookupFunctionPacked(int idx, unsigned address) const override {
0071     std::vector<unsigned> addr = u2vec(address, m_Inputs);
0072     return TheLookupFunction(idx, addr[0], addr[1]);
0073   };
0074 
0075 private:
0076   /// Initialize scales, configuration parameters, alignment constants, ...
0077   void InitParameters();
0078 
0079   /// The lookup function - here the functionality of the LUT is implemented
0080   unsigned TheLookupFunction(int idx, unsigned delta_eta, unsigned delta_phi) const;
0081 
0082   /// Private data members (LUT parameters);
0083   float m_EtaWeights[6];
0084   float m_PhiWeights[6];
0085   float m_EtaPhiThresholds[6];
0086 };
0087 #endif