Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /** \class L1MuGMTMIAUPhiPro1LUT
0004  *
0005  *   MIAUPhiPro1 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_L1MuGMTMIAUPhiPro1LUT_h
0019 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro1LUT_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 L1MuGMTMIAUPhiPro1LUT : 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   L1MuGMTMIAUPhiPro1LUT()
0044       : L1MuGMTLUT("MIAUPhiPro1",
0045                    "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
0046                    "phi_fine(3) eta(4) pt(5) charge(1)",
0047                    "cphi_fine(1) cphi_ofs(3)",
0048                    11,
0049                    false) {
0050     InitParameters();
0051   };
0052 
0053   /// destructor
0054   ~L1MuGMTMIAUPhiPro1LUT() override{};
0055 
0056   /// specific lookup function for cphi_fine
0057   unsigned SpecificLookup_cphi_fine(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
0058     std::vector<unsigned> addr(4);
0059     addr[0] = phi_fine;
0060     addr[1] = eta;
0061     addr[2] = pt;
0062     addr[3] = charge;
0063     return Lookup(idx, addr)[0];
0064   };
0065 
0066   /// specific lookup function for cphi_ofs
0067   unsigned SpecificLookup_cphi_ofs(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
0068     std::vector<unsigned> addr(4);
0069     addr[0] = phi_fine;
0070     addr[1] = eta;
0071     addr[2] = pt;
0072     addr[3] = charge;
0073     return Lookup(idx, addr)[1];
0074   };
0075 
0076   /// specific lookup function for entire output field
0077   unsigned SpecificLookup(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
0078     std::vector<unsigned> addr(4);
0079     addr[0] = phi_fine;
0080     addr[1] = eta;
0081     addr[2] = pt;
0082     addr[3] = charge;
0083     return LookupPacked(idx, addr);
0084   };
0085 
0086   /// access to lookup function with packed input and output
0087 
0088   unsigned LookupFunctionPacked(int idx, unsigned address) const override {
0089     std::vector<unsigned> addr = u2vec(address, m_Inputs);
0090     return TheLookupFunction(idx, addr[0], addr[1], addr[2], addr[3]);
0091   };
0092 
0093 private:
0094   /// Initialize scales, configuration parameters, alignment constants, ...
0095   void InitParameters();
0096 
0097   /// The lookup function - here the functionality of the LUT is implemented
0098   unsigned TheLookupFunction(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const;
0099 
0100   /// Private data members (LUT parameters);
0101   float m_calo_align;  // angle between nominal phi=0 and start of calo region 0
0102 };
0103 #endif