00001 //------------------------------------------------- 00002 // 00021 // 00022 // $Date: 2007/03/23 18:51:35 $ 00023 // $Revision: 1.2 $ 00024 // 00025 // Author : 00026 // H. Sakulin HEPHY Vienna 00027 // 00028 // Migrated to CMSSW: 00029 // I. Mikulec 00030 // 00031 //-------------------------------------------------- 00032 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMerger_h 00033 #define L1TriggerGlobalMuonTrigger_L1MuGMTMerger_h 00034 00035 //--------------- 00036 // C++ Headers -- 00037 //--------------- 00038 00039 #include <vector> 00040 00041 //---------------------- 00042 // Base Class Headers -- 00043 //---------------------- 00044 00045 00046 //------------------------------------ 00047 // Collaborating Class Declarations -- 00048 //------------------------------------ 00049 00050 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTConfig.h" 00051 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h" 00052 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h" 00053 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h" 00054 00055 class L1MuGlobalMuonTrigger; 00056 00057 00058 // --------------------- 00059 // -- Class Interface -- 00060 // --------------------- 00061 00062 00063 class L1MuGMTMerger { 00064 00065 public: 00066 00068 L1MuGMTMerger(const L1MuGlobalMuonTrigger& gmt, int id); 00069 00071 virtual ~L1MuGMTMerger(); 00072 00074 void run(); 00075 00077 void reset(); 00078 00080 void print() const; 00081 00083 inline int id() const { return m_id; } 00084 00086 inline const std::vector<L1MuGMTExtendedCand*>& Cands() const { return m_MuonCands; } 00087 00088 private: 00089 00090 void load(); 00091 void merge(); 00092 00093 void createMergedCand(int idx_dtcsc, int idx_rpc); 00094 void createDTCSCCand(int idx_dtcsc); 00095 void createRPCCand(int idx_rpc); 00096 00097 int doSpecialMerge(unsigned MMconfig) const; 00098 int doANDMerge(unsigned MMconfig) const; 00099 int selectDTCSC(unsigned MMconfig, int by_rank, int by_pt, int by_combi) const; 00100 00101 unsigned convertedEta(const L1MuRegionalCand* mu) const; 00102 unsigned projectedPhi(const L1MuRegionalCand* mu) const; 00103 unsigned sysign(const L1MuRegionalCand* mu) const; 00104 00106 int merge_rank(const L1MuRegionalCand*) const; 00107 00108 private: 00109 00110 const L1MuGlobalMuonTrigger& m_gmt; 00111 int m_id; 00112 00113 std::vector<const L1MuRegionalCand*> dtcsc_mu; 00114 std::vector<const L1MuRegionalCand*> rpc_mu; 00115 00116 std::vector<L1MuGMTExtendedCand*> m_MuonCands; // up to eight 00117 00118 std::vector<int> singleRank; //@ 8 bits 00119 }; 00120 00121 #endif