00001 //------------------------------------------------- 00002 // 00017 // 00018 //-------------------------------------------------- 00019 #ifndef L1MUDT_EUX_H 00020 #define L1MUDT_EUX_H 00021 00022 //--------------- 00023 // C++ Headers -- 00024 //--------------- 00025 00026 #include <utility> 00027 #include <map> 00028 00029 //---------------------- 00030 // Base Class Headers -- 00031 //---------------------- 00032 00033 #include "L1Trigger/DTTrackFinder/interface/L1AbstractProcessor.h" 00034 00035 //------------------------------------ 00036 // Collaborating Class Declarations -- 00037 //------------------------------------ 00038 00039 #include <FWCore/Framework/interface/ESHandle.h> 00040 class L1MuDTTrackSegPhi; 00041 class L1MuDTSEU; 00042 class L1MuDTExtLut; 00043 00044 // --------------------- 00045 // -- Class Interface -- 00046 // --------------------- 00047 00048 class L1MuDTEUX : public L1AbstractProcessor { 00049 00050 public: 00051 00053 L1MuDTEUX(const L1MuDTSEU& seu, int id ); 00054 00056 virtual ~L1MuDTEUX(); 00057 00059 bool operator==(const L1MuDTEUX&) const; 00060 00062 virtual void run(const edm::EventSetup& c); 00063 00065 virtual void reset(); 00066 00068 void load(const L1MuDTTrackSegPhi* start_ts, const L1MuDTTrackSegPhi* target_ts); 00069 00071 std::pair<const L1MuDTTrackSegPhi*, const L1MuDTTrackSegPhi*> ts() const; 00072 00074 static void setPrecision(); 00075 00077 class EUX_Comp : std::binary_function< L1MuDTEUX*, L1MuDTEUX*, bool> { 00078 public : 00079 EUX_Comp( const L1MuDTEUX* k = 0 ) : _not(k) {} 00080 bool operator()( const L1MuDTEUX* first, const L1MuDTEUX* second ) const { 00081 if ( !second->result() ) return false; 00082 if ( _not != 0 && *first == *_not ) return true; 00083 if ( _not != 0 && *second == *_not ) return false; 00084 return ( first->quality() < second->quality() ); 00085 } 00086 private: 00087 const L1MuDTEUX* _not; 00088 }; 00089 00091 inline int id() const { return m_id; } 00092 00094 inline bool result() const { return m_result; } 00095 00097 inline unsigned int quality() const { return m_quality; } 00098 00100 inline unsigned short int address() const { return m_address; } 00101 00102 private: 00103 00105 int sec_mod(int) const; 00106 00107 private: 00108 00109 const L1MuDTSEU& m_seu; // reference to Single Extrapolation Unit 00110 int m_id; // index of start TS 00111 00112 bool m_result; //@@ 1 bit 00113 unsigned short int m_quality; //@@ 1 bit 00114 unsigned short int m_address; //@@ 4 bits 00115 00116 const L1MuDTTrackSegPhi* m_start; // start track segment 00117 const L1MuDTTrackSegPhi* m_target; // target track segment 00118 00119 edm::ESHandle< L1MuDTExtLut > theExtLUTs; // extrapolation look-up tables 00120 static int theExtFilter; // extrapolation quality filter 00121 static unsigned short nbit_phi; // number of bits used for phi 00122 static unsigned short nbit_phib; // number of bits used for phib 00123 00124 }; 00125 00126 #endif