CMS 3D CMS Logo

Track.h
Go to the documentation of this file.
1 #ifndef TrackReco_Track_h
2 #define TrackReco_Track_h
3 
24 
25 namespace reco
26 {
27 
28 class Track : public TrackBase
29 {
30 
31 public:
32 
34  Track() { }
35 
37  ~Track() override;
38 
40  Track(double chi2, double ndof, const Point & referencePoint,
41  const Vector & momentum, int charge, const CovarianceMatrix &,
43  float t0 = 0, float beta = 0,
44  float covt0t0 = -1., float covbetabeta = -1.);
45 
47  bool outerOk() const {
48  return extra_->outerOk();
49  }
50 
52  bool innerOk() const {
53  return extra_->innerOk();
54  }
55 
57  const math::XYZPoint & innerPosition() const {
58  return extra_->innerPosition();
59  }
60 
62  const math::XYZVector & innerMomentum() const {
63  return extra_->innerMomentum();
64  }
65 
67  const math::XYZPoint & outerPosition() const {
68  return extra_->outerPosition();
69  }
70 
72  const math::XYZVector & outerMomentum() const {
73  return extra_->outerMomentum();
74  }
75 
78  return extra_->outerStateCovariance();
79  }
80 
83  return extra_->innerStateCovariance();
84  }
85 
88  return extra_->fillOuter(v);
89  }
90 
92  return extra_->fillInner(v);
93  }
94 
96  unsigned int outerDetId() const {
97  return extra_->outerDetId();
98  }
99 
101  unsigned int innerDetId() const {
102  return extra_->innerDetId();
103  }
104 
107  return extra_->recHitsBegin();
108  }
109 
112  return extra_->recHitsEnd();
113  }
114 
116  TrackingRecHitRef recHit(size_t i) const {
117  return extra_->recHit(i);
118  }
119 
121  size_t recHitsSize() const {
122  return extra_->recHitsSize();
123  }
124 
126  double outerPx() const {
127  return extra_->outerPx();
128  }
129 
131  double outerPy() const {
132  return extra_->outerPy();
133  }
134 
136  double outerPz() const {
137  return extra_->outerPz();
138  }
139 
141  double outerX() const {
142  return extra_->outerX();
143  }
144 
146  double outerY() const {
147  return extra_->outerY();
148  }
149 
151  double outerZ() const {
152  return extra_->outerZ();
153  }
154 
156  double outerP() const {
157  return extra_->outerP();
158  }
159 
161  double outerPt() const {
162  return extra_->outerPt();
163  }
164 
166  double outerPhi() const {
167  return extra_->outerPhi();
168  }
169 
171  double outerEta() const {
172  return extra_->outerEta();
173  }
174 
176  double outerTheta() const {
177  return extra_->outerTheta();
178  }
179 
181  double outerRadius() const {
182  return extra_->outerRadius();
183  }
184 
186  void setExtra(const TrackExtraRef & ref) {
187  extra_ = ref;
188  }
189 
191  const TrackExtraRef & extra() const {
192  return extra_;
193  }
194 
196  unsigned short found() const {
197  return numberOfValidHits();
198  }
199 
201  unsigned short lost() const {
202  return numberOfLostHits();
203  }
204 
207  return extra_->seedDirection();
208  }
209 
216  return extra_->seedRef();
217  }
218 
220  const TrackResiduals &residuals() const {return extra_->residuals();}
221 
222 
223 private:
226 
227 };
228 
229 }
230 
231 #endif
232 
const edm::RefToBase< TrajectorySeed > & seedRef() const
Definition: Track.h:215
double t0() const
time at the reference point
Definition: TrackBase.h:720
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:714
unsigned short lost() const
Number of lost (=invalid) hits on track.
Definition: Track.h:201
~Track() override
virtual destructor
Definition: Track.cc:16
double outerPy() const
y coordinate of momentum vector at the outermost hit position
Definition: Track.h:131
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:191
TrackExtraRef extra_
Reference to additional information stored only on RECO.
Definition: Track.h:225
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:121
CovarianceMatrix & fillInner(CovarianceMatrix &v) const
Definition: Track.h:91
double outerP() const
magnitude of momentum vector at the outermost hit position
Definition: Track.h:156
bool innerOk() const
return true if the innermost hit is valid
Definition: Track.h:52
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:895
PropagationDirection
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:708
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:67
Track()
default constructor
Definition: Track.h:34
TrackAlgorithm
track algorithm
Definition: TrackBase.h:99
double outerZ() const
z coordinate of the outermost hit position
Definition: Track.h:151
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:57
double beta() const
velocity at the reference point in natural units
Definition: TrackBase.h:726
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:582
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:588
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
Definition: Track.h:77
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: Track.h:96
#define CMS_THREAD_SAFE
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:889
double outerX() const
x coordinate of the outermost hit position
Definition: Track.h:141
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:106
double outerPz() const
z coordinate of momentum vector at the outermost hit position
Definition: Track.h:136
double outerPt() const
transverse momentum at the outermost hit position
Definition: Track.h:161
double outerRadius() const
polar radius of the outermost hit position
Definition: Track.h:181
double outerEta() const
pseudorapidity of the momentum vector at the outermost hit position
Definition: Track.h:171
void setExtra(const TrackExtraRef &ref)
set reference to "extra" object
Definition: Track.h:186
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:72
bool outerOk() const
return true if the outermost hit is valid
Definition: Track.h:47
const PropagationDirection & seedDirection() const
direction of how the hits were sorted in the original seed
Definition: Track.h:206
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
Definition: Track.h:82
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:28
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:543
double covt0t0() const
error on t0
Definition: TrackBase.h:865
fixed size matrix
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:62
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
Definition: Track.h:116
unsigned short found() const
Number of valid hits on track.
Definition: Track.h:196
double outerY() const
y coordinate of the outermost hit position
Definition: Track.h:146
const TrackResiduals & residuals() const
get the residuals
Definition: Track.h:220
int charge() const
track electric charge
Definition: TrackBase.h:600
double outerTheta() const
polar angle of the momentum vector at the outermost hit position
Definition: Track.h:176
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: Track.h:101
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:80
double outerPhi() const
azimuthal angle of the momentum vector at the outermost hit position
Definition: Track.h:166
CovarianceMatrix & fillOuter(CovarianceMatrix &v) const
fill outermost trajectory state curvilinear errors
Definition: Track.h:87
double outerPx() const
x coordinate of momentum vector at the outermost hit position
Definition: Track.h:126
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:111