CMS 3D CMS Logo

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 
23  public:
24  TrackStub() {}
25  TrackStub(const CSCCorrelatedLCTDigi &, const DetId &);
26  TrackStub(const CSCCorrelatedLCTDigi &, const DetId &, const unsigned &phi, const unsigned &eta);
27 
29  void setEtaPacked(const unsigned &eta_) { theEta_ = eta_; }
30  void setPhiPacked(const unsigned &phi_) { thePhi_ = phi_; }
31 
33  double etaValue() const { return (theEta_ * theEtaBinning + CSCTFConstants::minEta); }
35  double phiValue() const { return (thePhi_ * thePhiBinning); }
36 
38  unsigned etaPacked() const { return theEta_; }
40 
41  unsigned phiPacked() const { return thePhi_; }
42 
44  const CSCCorrelatedLCTDigi *getDigi() const { return dynamic_cast<const CSCCorrelatedLCTDigi *>(this); }
45  DetId getDetId() const { return DetId(theDetId_); }
46 
49  unsigned endcap() const;
50  unsigned station() const;
51  unsigned sector() const;
52  unsigned subsector() const;
53  unsigned cscid() const;
54  unsigned cscidSeparateME1a() const;
55  int BX() const { return getBX(); }
56 
58  bool operator>(const TrackStub &) const;
59  bool operator<(const TrackStub &) const;
60  bool operator>=(const TrackStub &rhs) const { return !(this->operator<(rhs)); }
61  bool operator<=(const TrackStub &rhs) const { return !(this->operator>(rhs)); }
62  bool operator==(const TrackStub &rhs) const {
63  return ((theDetId_ == rhs.theDetId_) && (*(getDigi()) == *(rhs.getDigi())));
64  }
65  bool operator!=(const TrackStub &rhs) const { return !(this->operator==(rhs)); }
66 
67  private:
68  uint32_t theDetId_;
69  unsigned thePhi_, theEta_, link_;
70  static const double theEtaBinning, thePhiBinning;
71  };
72 } // namespace csctf
73 
74 #endif
unsigned phiPacked() const
Return the binned phi for this stub.
Definition: TrackStub.h:41
unsigned theEta_
Definition: TrackStub.h:69
bool operator>=(const TrackStub &rhs) const
Definition: TrackStub.h:60
unsigned link_
Definition: TrackStub.h:69
bool operator==(const TrackStub &rhs) const
Definition: TrackStub.h:62
bool operator<(const TrackStub &) const
Definition: TrackStub.cc:108
double etaValue() const
return the Eta Value of this stub&#39;s position.
Definition: TrackStub.h:33
static const double minEta
unsigned station() const
Definition: TrackStub.cc:36
static const double theEtaBinning
Definition: TrackStub.h:70
static const double thePhiBinning
Definition: TrackStub.h:70
uint16_t getBX() const
return BX
bool operator>(const TrackStub &) const
Comparision Operators, used for MPC sorting.
Definition: TrackStub.cc:114
unsigned endcap() const
Definition: TrackStub.cc:19
int BX() const
Definition: TrackStub.h:55
Definition: DetId.h:17
DetId getDetId() const
Definition: TrackStub.h:45
uint32_t theDetId_
Definition: TrackStub.h:68
double phiValue() const
return the Phi Value of this stub&#39;s position in local coordinates.
Definition: TrackStub.h:35
unsigned subsector() const
Definition: TrackStub.cc:72
bool operator<=(const TrackStub &rhs) const
Definition: TrackStub.h:61
unsigned cscidSeparateME1a() const
Definition: TrackStub.cc:98
void setPhiPacked(const unsigned &phi_)
Definition: TrackStub.h:30
bool operator!=(const TrackStub &rhs) const
Definition: TrackStub.h:65
unsigned thePhi_
Definition: TrackStub.h:69
unsigned etaPacked() const
Return the binned eta for this stub.
Definition: TrackStub.h:38
const CSCCorrelatedLCTDigi * getDigi() const
Get the digi this stub was made from.
Definition: TrackStub.h:44
unsigned cscid() const
Definition: TrackStub.cc:91
void setEtaPacked(const unsigned &eta_)
set Eta and Phi from integer values.
Definition: TrackStub.h:29
unsigned sector() const
Definition: TrackStub.cc:53