test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackStub.h
Go to the documentation of this file.
1 
13 #ifndef L1CSCTrackFinder_TrackStub_h
14 #define L1CSCTrackFinder_TrackStub_h
15 
19 
20 namespace csctf
21 {
22 
24  {
25  public:
26  TrackStub() {}
27  TrackStub(const CSCCorrelatedLCTDigi&, const DetId&);
28  TrackStub(const CSCCorrelatedLCTDigi&, const DetId&, const unsigned& phi, const unsigned& eta);
29  TrackStub(const TrackStub&);
30 
32  void setEtaPacked(const unsigned& eta_) {theEta_ = eta_;}
33  void setPhiPacked(const unsigned& phi_) {thePhi_ = phi_;}
34 
38  double phiValue() const {return (thePhi_*thePhiBinning);}
39 
41  unsigned etaPacked() const {return theEta_;}
43 
44  unsigned phiPacked() const {return thePhi_;}
45 
47  const CSCCorrelatedLCTDigi* getDigi() const {return dynamic_cast<const CSCCorrelatedLCTDigi*>(this);}
48  DetId getDetId() const {return DetId(theDetId_);}
49 
52  unsigned endcap() const;
53  unsigned station() const;
54  unsigned sector() const;
55  unsigned subsector() const;
56  unsigned cscid() const;
57  unsigned cscidSeparateME1a() const;
58  int BX() const {return getBX();}
59 
60 
62  bool operator > (const TrackStub &) const;
63  bool operator < (const TrackStub &) const;
64  bool operator >= (const TrackStub &rhs) const { return !(this->operator<(rhs)); }
65  bool operator <= (const TrackStub &rhs) const { return !(this->operator>(rhs)); }
66  bool operator == (const TrackStub &rhs) const { return ((theDetId_ == rhs.theDetId_) && ( *(getDigi()) == *(rhs.getDigi()))); }
67  bool operator != (const TrackStub &rhs) const { return !(this->operator==(rhs)); }
68 
69  private:
70  uint32_t theDetId_;
71  unsigned thePhi_, theEta_, link_;
72  static const double theEtaBinning, thePhiBinning;
73  };
74 }
75 
76 #endif
bool operator<(const TrackStub &) const
Definition: TrackStub.cc:137
int BX() const
Definition: TrackStub.h:58
unsigned theEta_
Definition: TrackStub.h:71
bool operator>(const TrackStub &) const
Comparision Operators, used for MPC sorting.
Definition: TrackStub.cc:145
unsigned sector() const
Definition: TrackStub.cc:78
unsigned link_
Definition: TrackStub.h:71
static const double minEta
bool operator==(const TrackStub &rhs) const
Definition: TrackStub.h:66
unsigned phiPacked() const
Return the binned phi for this stub.
Definition: TrackStub.h:44
bool operator!=(const TrackStub &rhs) const
Definition: TrackStub.h:67
unsigned station() const
Definition: TrackStub.cc:59
const CSCCorrelatedLCTDigi * getDigi() const
Get the digi this stub was made from.
Definition: TrackStub.h:47
DetId getDetId() const
Definition: TrackStub.h:48
static const double theEtaBinning
Definition: TrackStub.h:72
static const double thePhiBinning
Definition: TrackStub.h:72
double etaValue() const
return the Eta Value of this stub&#39;s position.
Definition: TrackStub.h:36
unsigned subsector() const
Definition: TrackStub.cc:99
int getBX() const
return BX
Definition: DetId.h:18
double phiValue() const
return the Phi Value of this stub&#39;s position in local coordinates.
Definition: TrackStub.h:38
bool operator<=(const TrackStub &rhs) const
Definition: TrackStub.h:65
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned cscid() const
Definition: TrackStub.cc:120
bool operator>=(const TrackStub &rhs) const
Definition: TrackStub.h:64
unsigned etaPacked() const
Return the binned eta for this stub.
Definition: TrackStub.h:41
unsigned endcap() const
Definition: TrackStub.cc:40
void setPhiPacked(const unsigned &phi_)
Definition: TrackStub.h:33
unsigned thePhi_
Definition: TrackStub.h:71
void setEtaPacked(const unsigned &eta_)
set Eta and Phi from integer values.
Definition: TrackStub.h:32
unsigned cscidSeparateME1a() const
Definition: TrackStub.cc:128