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