CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatcher.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00006 //
00007 //   $Date: 2007/03/23 18:51:35 $
00008 //   $Revision: 1.2 $
00009 //
00010 //   Author :
00011 //   N. Neumeister            CERN EP 
00012 //
00013 //   Migrated to CMSSW:
00014 //   I. Mikulec
00015 //
00016 //--------------------------------------------------
00017 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMatcher_h
00018 #define L1TriggerGlobalMuonTrigger_L1MuGMTMatcher_h
00019 
00020 //---------------
00021 // C++ Headers --
00022 //---------------
00023 
00024 #include <vector>
00025 
00026 //----------------------
00027 // Base Class Headers --
00028 //----------------------
00029 
00030 //------------------------------------
00031 // Collaborating Class Declarations --
00032 //------------------------------------
00033 
00034 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h"
00035 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
00036 
00037 class L1MuGlobalMuonTrigger;
00038 
00039 //              ---------------------
00040 //              -- Class Interface --
00041 //              ---------------------
00042 
00043 class L1MuGMTMatcher {
00044 
00045   public:
00046 
00047     static const unsigned int MaxMatch = 4;
00048 
00050     L1MuGMTMatcher(const L1MuGlobalMuonTrigger& gmt, int id);
00051 
00053     virtual ~L1MuGMTMatcher();
00054 
00056     void run();
00057     
00059     void reset();
00060 
00062     void print();
00063     
00065     inline int id() const { return m_id; } 
00066 
00068     const L1MuGMTMatrix<bool>& pairM() const { return pairMatrix; }
00069 
00071     bool pairM(int i,int j) const { return pairMatrix(i,j); }
00072     
00073   private:
00074     
00075     void load();
00076     
00077     void match();
00078 
00079     //    int compareEtaPhi(float eta1, float phi1, float eta2, float phi2);
00080     int lookup_mq(int i, int j);
00081     
00082   private:
00083 
00084     const L1MuGlobalMuonTrigger& m_gmt;
00085     int m_id;
00086 
00087     std::vector<const L1MuRegionalCand*> first;
00088     std::vector<const L1MuRegionalCand*> second;
00089 
00090     L1MuGMTMatrix<int>  matchQuality;
00091     L1MuGMTMatrix<bool> pairMatrix;
00092    
00093 };
00094   
00095 #endif