Go to the documentation of this file.00001
00009 #ifndef L1CSCTrackFinder_L1Track_h
00010 #define L1CSCTrackFinder_L1Track_h
00011
00012 #include <DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h>
00013 #include <DataFormats/L1CSCTrackFinder/interface/L1TrackId.h>
00014
00015 class CSCTFSectorProcessor;
00016 class CSCTFUnpacker;
00017 class CSCTFSPCoreLogic;
00018
00019 namespace csc{
00020
00021 class L1Track : public L1MuRegionalCand
00022 {
00023 public:
00024 L1Track() : L1MuRegionalCand(), m_name("csc::L1Track") { setType(2); setPtPacked(0); }
00025 L1Track( const csc::L1TrackId& );
00026 L1Track( const csc::L1Track& );
00027
00028 const csc::L1Track& operator=(const csc::L1Track&);
00029
00030 virtual ~L1Track();
00031
00032 unsigned rank() const;
00033 void setRank(const unsigned& rank) { m_rank = rank; }
00034
00035 unsigned localPhi() const { return m_lphi; }
00036 void setLocalPhi(const unsigned& lphi) { m_lphi = lphi; }
00037
00038 unsigned me1ID() const { return me1_id; }
00039 unsigned me2ID() const { return me2_id; }
00040 unsigned me3ID() const { return me3_id; }
00041 unsigned me4ID() const { return me4_id; }
00042 unsigned mb1ID() const { return mb1_id; }
00043
00044 unsigned endcap() const { return m_endcap; }
00045 unsigned sector() const { return m_sector; }
00046 unsigned station() const { return 0; }
00047
00048 unsigned subsector() const { return 0; }
00049 unsigned cscid() const { return 0; }
00050
00051 int BX() const { return bx(); }
00052
00053 static unsigned encodeRank(const unsigned& pt, const unsigned& quality);
00054 static void decodeRank(const unsigned& rank, unsigned& pt, unsigned& quality);
00055
00056 unsigned ptLUTAddress() const { return m_ptAddress; }
00057 unsigned front_rear() const { return m_fr; }
00058 void setPtLUTAddress(const unsigned& adr) { m_ptAddress = adr; }
00059 void set_front_rear(unsigned fr) { m_fr=fr; }
00060
00061 unsigned outputLink() const {return m_output_link;}
00062 void setOutputLink( unsigned oPL ) { m_output_link = oPL; }
00063 bool winner() const {return m_winner;}
00064
00065 bool operator>(const csc::L1Track&) const;
00066 bool operator<(const csc::L1Track&) const;
00067 bool operator>=(const csc::L1Track&) const;
00068 bool operator<=(const csc::L1Track&) const;
00069 bool operator==(const csc::L1Track&) const;
00070 bool operator!=(const csc::L1Track&) const;
00071
00072
00073
00074
00077
00078 friend class CSCTFSectorProcessor;
00079 friend class ::CSCTFUnpacker;
00080 friend class ::CSCTFSPCoreLogic;
00081
00082 void Print() const;
00083
00084
00085 unsigned deltaPhi12(void) const { return m_ptAddress&0xFF; }
00086 unsigned deltaPhi23(void) const { return (m_ptAddress>>8)&0xF; }
00087 unsigned addressEta(void) const { return (m_ptAddress>>12)&0xF; }
00088 unsigned mode (void) const { return (m_ptAddress>>16)&0xF; }
00089 bool sign (void) const { return (m_ptAddress>>20)&0x1; }
00090 bool synch_err (void) const { return m_se; }
00091 bool bx0 (void) const { return m_bx0; }
00092 bool bc0 (void) const { return m_bc0; }
00093 unsigned me1Tbin (void) const { return m_me1Tbin; }
00094 unsigned me2Tbin (void) const { return m_me2Tbin; }
00095 unsigned me3Tbin (void) const { return m_me3Tbin; }
00096 unsigned me4Tbin (void) const { return m_me4Tbin; }
00097 unsigned mb1Tbin (void) const { return m_mbTbin; }
00098 void setBits (unsigned se, unsigned bx0, unsigned bc0) { m_se=se; m_bx0=bx0; m_bc0=bc0; }
00099 void setTbins (unsigned me1, unsigned me2, unsigned me3, unsigned me4, unsigned mb) { m_me1Tbin=me1; m_me2Tbin=me2; m_me3Tbin=me3; m_me4Tbin=me4; m_mbTbin=mb; }
00100 void setStationIds(const unsigned& me1, const unsigned& me2,
00101 const unsigned& me3, const unsigned& me4,
00102 const unsigned& mb1);
00103
00104 unsigned modeExtended(void) const;
00105 private:
00106
00107 std::string m_name;
00108
00109 unsigned m_endcap, m_sector;
00110
00111 unsigned m_lphi;
00112 unsigned m_ptAddress;
00113 unsigned m_fr;
00114 unsigned me1_id, me2_id, me3_id, me4_id, mb1_id;
00115 unsigned m_rank;
00116 unsigned m_output_link;
00117 bool m_empty;
00118 bool m_winner;
00119
00120
00121 bool m_se, m_bx0, m_bc0;
00122 unsigned m_me1Tbin, m_me2Tbin, m_me3Tbin, m_me4Tbin, m_mbTbin;
00123 };
00124 }
00125
00126 #endif