CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro1LUT.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00010 //   $Date: 2007/04/02 15:45:39 $
00011 //   $Revision: 1.3 $
00012 //
00013 //   Author :
00014 //   H. Sakulin            HEPHY Vienna
00015 //
00016 //   Migrated to CMSSW:
00017 //   I. Mikulec
00018 //
00019 //--------------------------------------------------
00020 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro1LUT_h
00021 #define L1TriggerGlobalMuonTrigger_L1MuGMTMIAUPhiPro1LUT_h
00022 
00023 //---------------
00024 // C++ Headers --
00025 //---------------
00026 
00027 
00028 //----------------------
00029 // Base Class Headers --
00030 //----------------------
00031 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h"
00032 
00033 //------------------------------------
00034 // Collaborating Class Declarations --
00035 //------------------------------------
00036 
00037 //              ---------------------
00038 //              -- Class Interface --
00039 //              ---------------------
00040 
00041 
00042 class L1MuGMTMIAUPhiPro1LUT : public L1MuGMTLUT {
00043   
00044  public:
00045   enum {MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC};
00046 
00048   L1MuGMTMIAUPhiPro1LUT() : L1MuGMTLUT("MIAUPhiPro1", 
00049                                        "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
00050                                        "phi_fine(3) eta(4) pt(5) charge(1)",
00051                                        "cphi_fine(1) cphi_ofs(3)", 11, false) {
00052     InitParameters();
00053   } ;
00054 
00056   virtual ~L1MuGMTMIAUPhiPro1LUT() {};
00057 
00059   unsigned SpecificLookup_cphi_fine (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
00060     std::vector<unsigned> addr(4);
00061     addr[0] = phi_fine;
00062     addr[1] = eta;
00063     addr[2] = pt;
00064     addr[3] = charge;
00065     return Lookup(idx, addr) [0];
00066   };
00067 
00069   unsigned SpecificLookup_cphi_ofs (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
00070     std::vector<unsigned> addr(4);
00071     addr[0] = phi_fine;
00072     addr[1] = eta;
00073     addr[2] = pt;
00074     addr[3] = charge;
00075     return Lookup(idx, addr) [1];
00076   };
00077 
00079   unsigned SpecificLookup (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const {
00080     std::vector<unsigned> addr(4);
00081     addr[0] = phi_fine;
00082     addr[1] = eta;
00083     addr[2] = pt;
00084     addr[3] = charge;
00085     return LookupPacked(idx, addr);
00086   };
00087 
00088 
00089 
00091 
00092   virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
00093     std::vector<unsigned> addr = u2vec(address, m_Inputs);
00094     return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2] ,addr[3]);
00095 
00096   };
00097 
00098  private:
00100   void InitParameters();
00101 
00103   unsigned TheLookupFunction (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const;
00104 
00106   float m_calo_align; // angle between nominal phi=0 and start of calo region 0
00107 };
00108 #endif
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127