CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/DataFormats/L1CSCTrackFinder/interface/L1TrackId.h

Go to the documentation of this file.
00001 
00009 #ifndef L1CSCTrackFinder_L1TrackId_h
00010 #define L1CSCTrackFinder_L1TrackId_h
00011 
00012 #include <DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h>
00013 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
00014 #include <DataFormats/MuonDetId/interface/CSCTriggerNumbering.h>
00015 
00016 namespace csc 
00017 {
00018 
00019   class L1TrackId
00020     {
00021     public:
00022       enum { kRankBitWidth = 6 };
00023 
00024       L1TrackId();
00025       L1TrackId(const unsigned& side, const unsigned& sector);
00026       L1TrackId(const csc::L1TrackId&);
00027 
00028       const L1TrackId& operator=(const csc::L1TrackId&);
00029 
00030       inline unsigned endcap() const { return id_.endcap(); }
00031       inline unsigned sector() const { return CSCTriggerNumbering::triggerSectorFromLabels(id_); }
00032       inline unsigned station() const { return id_.station(); }
00033       
00034       inline unsigned rank() const { return m_rank; }
00035       inline unsigned mode() const { return m_mode; }
00036       inline unsigned numSegments() const { return 0; } // finish later
00037     
00038       void setRank(const unsigned& rank);
00039       void setMode(const unsigned& mode) { m_mode = mode; } 
00040       void setOverlap(const unsigned& rank);
00041 
00042       bool sharesHit(const csc::L1TrackId&) const;
00043       inline bool inOverlap() const { return m_overlap; }
00044       
00045       void overlapMode(const unsigned& rank, int& mode, int& stnA, int& stnB);
00046       unsigned encodeLUTMode(const unsigned& rank) const;
00047 
00048       //void addSegment(const CSCDetId& id, const CSCCorrelatedLCTDigi& digi) { stubs.insertDigi(id,digi); }
00049 
00051       bool hasME1(const unsigned& rank) const;
00052       bool hasME2(const unsigned& rank) const;
00053       bool hasME3(const unsigned& rank) const;
00054       bool hasME4(const unsigned& rank) const;
00055       bool hasMB1(const unsigned& rank) const; 
00056 
00057       inline bool erase() const { return m_erase; }
00058 
00059     private:
00060       unsigned m_rank, m_mode;
00061       bool m_erase, m_overlap;
00062 
00063       CSCDetId id_;
00064 
00065       //CSCCorrelatedLCTDigiCollection stubs;
00066     };
00067 
00068 }
00069 
00070 #endif