CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/L1Trigger/DTTrackFinder/src/L1MuDTEUX.h

Go to the documentation of this file.
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 L1MuDTSectorProcessor;
00042 class L1MuDTSEU;
00043 class L1MuDTExtLut;
00044 class L1MuDTTFParameters;
00045 
00046 //              ---------------------
00047 //              -- Class Interface --
00048 //              ---------------------
00049 
00050 class L1MuDTEUX : public L1AbstractProcessor {
00051 
00052   public:
00053 
00055     L1MuDTEUX(const L1MuDTSectorProcessor& sp, const L1MuDTSEU& seu, int id );
00056 
00058     virtual ~L1MuDTEUX();
00059 
00061     bool operator==(const L1MuDTEUX&) const;
00062     
00064     virtual void run(const edm::EventSetup& c);
00065     
00067     virtual void reset();
00068     
00070     void load(const L1MuDTTrackSegPhi* start_ts, const L1MuDTTrackSegPhi* target_ts);
00071 
00073     std::pair<const L1MuDTTrackSegPhi*, const L1MuDTTrackSegPhi*> ts() const;
00074 
00076     static void setPrecision();
00077     
00079     class EUX_Comp : std::binary_function< L1MuDTEUX*, L1MuDTEUX*, bool> {
00080       public :
00081         EUX_Comp( const L1MuDTEUX* k = 0 ) : _not(k) {}
00082         bool operator()( const L1MuDTEUX* first, const L1MuDTEUX* second ) const {
00083           if ( !second->result() ) return false;
00084           if ( _not != 0 && *first  == *_not ) return true; 
00085           if ( _not != 0 && *second == *_not ) return false;
00086           return ( first->quality() < second->quality() );
00087         }
00088       private:
00089         const L1MuDTEUX* _not;
00090     };
00091 
00093     inline int id() const { return m_id; }
00094     
00096     inline bool result() const { return m_result; }
00097     
00099     inline unsigned int quality() const { return m_quality; }
00100     
00102     inline unsigned short int address() const { return m_address; }
00103 
00104   private:
00105 
00107     int sec_mod(int) const;
00108 
00109   private:
00110 
00111     const L1MuDTSectorProcessor& m_sp;
00112     const L1MuDTSEU& m_seu;           // reference to Single Extrapolation Unit 
00113     int              m_id;            // index of start TS
00114 
00115     bool               m_result;      //@@ 1 bit
00116     unsigned short int m_quality;     //@@ 1 bit
00117     unsigned short int m_address;     //@@ 4 bits
00118 
00119     const L1MuDTTrackSegPhi* m_start;       // start track segment
00120     const L1MuDTTrackSegPhi* m_target;      // target track segment
00121       
00122     edm::ESHandle< L1MuDTExtLut > theExtLUTs;  // extrapolation look-up tables
00123     static int               theExtFilter;     // extrapolation quality filter
00124     static unsigned short    nbit_phi;         // number of bits used for phi
00125     static unsigned short    nbit_phib;        // number of bits used for phib
00126 
00127     edm::ESHandle< L1MuDTTFParameters > pars;
00128 
00129 };
00130 
00131 #endif