CMS 3D CMS Logo

TrackStub.h

Go to the documentation of this file.
00001 
00013 #ifndef L1CSCTrackFinder_TrackStub_h
00014 #define L1CSCTrackFinder_TrackStub_h
00015 
00016 #include <DataFormats/DetId/interface/DetId.h>
00017 #include <DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h>
00018 #include <DataFormats/L1CSCTrackFinder/interface/CSCTFConstants.h>
00019 
00020 namespace csctf
00021 {
00022   
00023   class TrackStub : public CSCCorrelatedLCTDigi
00024     {
00025     public:
00026       TrackStub() {}
00027       TrackStub(const CSCCorrelatedLCTDigi&, const DetId&);
00028       TrackStub(const CSCCorrelatedLCTDigi&, const DetId&, const unsigned& phi, const unsigned& eta);
00029       TrackStub(const TrackStub&);
00030       
00032       void setEtaPacked(const unsigned& eta_) {theEta_ = eta_;}
00033       void setPhiPacked(const unsigned& phi_) {thePhi_ = phi_;}
00034       
00036       double etaValue() const {return (theEta_*theEtaBinning + CSCTFConstants::minEta);}
00038       double phiValue() const {return (thePhi_*thePhiBinning);}
00039       
00041       unsigned etaPacked() const {return theEta_;}
00043       
00044       unsigned phiPacked() const {return thePhi_;}
00045       
00047       const CSCCorrelatedLCTDigi* getDigi() const {return dynamic_cast<const CSCCorrelatedLCTDigi*>(this);}
00048       DetId getDetId() const {return DetId(theDetId_);}
00049       
00052       unsigned endcap() const;
00053       unsigned station() const;
00054       unsigned sector() const;
00055       unsigned subsector() const;
00056       unsigned cscid() const;
00057       int BX() const {return getBX();}
00058       
00059       
00061       bool operator >  (const TrackStub &) const;
00062       bool operator <  (const TrackStub &) const;
00063       bool operator >= (const TrackStub &rhs) const { return !(this->operator<(rhs)); }
00064       bool operator <= (const TrackStub &rhs) const { return !(this->operator>(rhs)); }
00065       bool operator == (const TrackStub &rhs) const { return ((theDetId_ == rhs.theDetId_) && ( *(getDigi()) == *(rhs.getDigi()))); }
00066       bool operator != (const TrackStub &rhs) const { return !(this->operator==(rhs)); }
00067       
00068     private:
00069       uint32_t theDetId_;
00070       unsigned thePhi_, theEta_, link_;
00071       static const double theEtaBinning, thePhiBinning;
00072     };
00073 }
00074 
00075 #endif

Generated on Tue Jun 9 17:31:09 2009 for CMSSW by  doxygen 1.5.4