Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:25

0001 /**
0002  * \class L1TrackId
0003  * \author D. Acosta (chages by L. Gray)
0004  *
0005  * A wrapper for CSCDetId so that it can label a track.
0006  * Also tools to help determine what LCTs make up the track.
0007  */
0008 
0009 #ifndef L1CSCTrackFinder_L1TrackId_h
0010 #define L1CSCTrackFinder_L1TrackId_h
0011 
0012 #include <DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h>
0013 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0014 #include <DataFormats/MuonDetId/interface/CSCTriggerNumbering.h>
0015 
0016 namespace csc {
0017 
0018   class L1TrackId {
0019   public:
0020     enum { kRankBitWidth = 6 };
0021 
0022     L1TrackId();
0023     L1TrackId(const unsigned& side, const unsigned& sector);
0024     L1TrackId(const csc::L1TrackId&);
0025 
0026     const L1TrackId& operator=(const csc::L1TrackId&);
0027 
0028     inline unsigned endcap() const { return id_.endcap(); }
0029     inline unsigned sector() const { return CSCTriggerNumbering::triggerSectorFromLabels(id_); }
0030     inline unsigned station() const { return id_.station(); }
0031 
0032     inline unsigned rank() const { return m_rank; }
0033     inline unsigned mode() const { return m_mode; }
0034     inline unsigned numSegments() const { return 0; }  // finish later
0035 
0036     void setRank(const unsigned& rank);
0037     void setMode(const unsigned& mode) { m_mode = mode; }
0038     void setOverlap(const unsigned& rank);
0039 
0040     bool sharesHit(const csc::L1TrackId&) const;
0041     inline bool inOverlap() const { return m_overlap; }
0042 
0043     void overlapMode(const unsigned& rank, int& mode, int& stnA, int& stnB);
0044     unsigned encodeLUTMode(const unsigned& rank) const;
0045 
0046     //void addSegment(const CSCDetId& id, const CSCCorrelatedLCTDigi& digi) { stubs.insertDigi(id,digi); }
0047 
0048     /// Functions to determine which stations are in this track.
0049     bool hasME1(const unsigned& rank) const;
0050     bool hasME2(const unsigned& rank) const;
0051     bool hasME3(const unsigned& rank) const;
0052     bool hasME4(const unsigned& rank) const;
0053     bool hasMB1(const unsigned& rank) const;
0054 
0055     inline bool erase() const { return m_erase; }
0056 
0057   private:
0058     unsigned m_rank, m_mode;
0059     bool m_erase, m_overlap;
0060 
0061     CSCDetId id_;
0062 
0063     //CSCCorrelatedLCTDigiCollection stubs;
0064   };
0065 
0066 }  // namespace csc
0067 
0068 #endif