Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:57

0001 //-------------------------------------------------
0002 //
0003 /** \class L1MuGMTMatcher
0004  *  Matching Unit in the L1 Global Muon Trigger.
0005 */
0006 //
0007 //
0008 //   Author :
0009 //   N. Neumeister            CERN EP
0010 //
0011 //   Migrated to CMSSW:
0012 //   I. Mikulec
0013 //
0014 //--------------------------------------------------
0015 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMatcher_h
0016 #define L1TriggerGlobalMuonTrigger_L1MuGMTMatcher_h
0017 
0018 //---------------
0019 // C++ Headers --
0020 //---------------
0021 
0022 #include <vector>
0023 
0024 //----------------------
0025 // Base Class Headers --
0026 //----------------------
0027 
0028 //------------------------------------
0029 // Collaborating Class Declarations --
0030 //------------------------------------
0031 
0032 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h"
0033 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
0034 
0035 class L1MuGlobalMuonTrigger;
0036 
0037 //              ---------------------
0038 //              -- Class Interface --
0039 //              ---------------------
0040 
0041 class L1MuGMTMatcher {
0042 public:
0043   static const unsigned int MaxMatch = 4;
0044 
0045   /// constructor
0046   L1MuGMTMatcher(const L1MuGlobalMuonTrigger& gmt, int id);
0047 
0048   /// destructor
0049   virtual ~L1MuGMTMatcher();
0050 
0051   /// run Matcher
0052   void run();
0053 
0054   /// clear Matcher
0055   void reset();
0056 
0057   /// print matching results
0058   void print();
0059 
0060   /// return identifier
0061   inline int id() const { return m_id; }
0062 
0063   /// return pair matrix
0064   const L1MuGMTMatrix<bool>& pairM() const { return pairMatrix; }
0065 
0066   /// return pair matrix
0067   bool pairM(int i, int j) const { return pairMatrix(i, j); }
0068 
0069 private:
0070   void load();
0071 
0072   void match();
0073 
0074   //    int compareEtaPhi(float eta1, float phi1, float eta2, float phi2);
0075   int lookup_mq(int i, int j);
0076 
0077 private:
0078   const L1MuGlobalMuonTrigger& m_gmt;
0079   int m_id;
0080 
0081   std::vector<const L1MuRegionalCand*> first;
0082   std::vector<const L1MuRegionalCand*> second;
0083 
0084   L1MuGMTMatrix<int> matchQuality;
0085   L1MuGMTMatrix<bool> pairMatrix;
0086 };
0087 
0088 #endif