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
csctf::TrackStub::phiValue
double phiValue() const
return the Phi Value of this stub's position in local coordinates.
Definition: TrackStub.h:36
csctf::TrackStub::operator!=
bool operator!=(const TrackStub &rhs) const
Definition: TrackStub.h:66
csctf::TrackStub::phiPacked
unsigned phiPacked() const
Return the binned phi for this stub.
Definition: TrackStub.h:42
csctf::TrackStub::station
unsigned station() const
Definition: TrackStub.cc:43
csctf::TrackStub::operator<
bool operator<(const TrackStub &) const
Definition: TrackStub.cc:115
CSCCorrelatedLCTDigi.h
csctf::TrackStub::sector
unsigned sector() const
Definition: TrackStub.cc:60
csctf::TrackStub::setEtaPacked
void setEtaPacked(const unsigned &eta_)
set Eta and Phi from integer values.
Definition: TrackStub.h:30
csctf::TrackStub
Definition: TrackStub.h:22
csctf::TrackStub::operator>
bool operator>(const TrackStub &) const
Comparision Operators, used for MPC sorting.
Definition: TrackStub.cc:121
csctf::TrackStub::operator==
bool operator==(const TrackStub &rhs) const
Definition: TrackStub.h:63
csctf::TrackStub::theEta_
unsigned theEta_
Definition: TrackStub.h:70
csctf::TrackStub::TrackStub
TrackStub()
Definition: TrackStub.h:24
DetId
Definition: DetId.h:17
PVValHelper::eta
Definition: PVValidationHelpers.h:69
CSCTFConstants.h
csctf::TrackStub::operator<=
bool operator<=(const TrackStub &rhs) const
Definition: TrackStub.h:62
csctf::TrackStub::cscidSeparateME1a
unsigned cscidSeparateME1a() const
Definition: TrackStub.cc:105
csctf::TrackStub::operator>=
bool operator>=(const TrackStub &rhs) const
Definition: TrackStub.h:61
csctf::TrackStub::thePhiBinning
static const double thePhiBinning
Definition: TrackStub.h:71
csctf::TrackStub::etaValue
double etaValue() const
return the Eta Value of this stub's position.
Definition: TrackStub.h:34
csctf::TrackStub::theEtaBinning
static const double theEtaBinning
Definition: TrackStub.h:71
csctf::TrackStub::thePhi_
unsigned thePhi_
Definition: TrackStub.h:70
CSCTFConstants::minEta
const static double minEta
Definition: CSCTFConstants.h:39
csctf::TrackStub::BX
int BX() const
Definition: TrackStub.h:56
csctf::TrackStub::endcap
unsigned endcap() const
Definition: TrackStub.cc:26
csctf::TrackStub::setPhiPacked
void setPhiPacked(const unsigned &phi_)
Definition: TrackStub.h:31
DetId.h
csctf::TrackStub::getDetId
DetId getDetId() const
Definition: TrackStub.h:46
csctf
Definition: TrackStub.h:20
csctf::TrackStub::subsector
unsigned subsector() const
Definition: TrackStub.cc:79
CSCCorrelatedLCTDigi::getBX
uint16_t getBX() const
return BX
Definition: CSCCorrelatedLCTDigi.h:84
csctf::TrackStub::etaPacked
unsigned etaPacked() const
Return the binned eta for this stub.
Definition: TrackStub.h:39
csctf::TrackStub::getDigi
const CSCCorrelatedLCTDigi * getDigi() const
Get the digi this stub was made from.
Definition: TrackStub.h:45
csctf::TrackStub::link_
unsigned link_
Definition: TrackStub.h:70
csctf::TrackStub::theDetId_
uint32_t theDetId_
Definition: TrackStub.h:69
csctf::TrackStub::cscid
unsigned cscid() const
Definition: TrackStub.cc:98
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19