CMS 3D CMS Logo

TrackBase.h
Go to the documentation of this file.
1 #ifndef TrackReco_TrackBase_h
2 #define TrackReco_TrackBase_h
3 
58 #include <bitset>
59 
60 namespace reco {
61 
62  class TrackBase {
63  public:
65  enum { dimension = 5 };
66 
68  enum { covarianceSize = dimension * (dimension + 1) / 2 };
69 
72 
75 
78 
81 
83  enum { i_qoverp = 0, i_lambda, i_phi, i_dxy, i_dsz };
84 
86  typedef unsigned int index;
87 
91  ctf = 1,
93  cosmics = 3,
107  nuclInter = 17,
112  // Phase1
119  beamhalo = 28,
120  gsf = 29,
121  // HLT algo name
122  hltPixel = 30,
123  // steps used by PF
124  hltIter0 = 31,
125  hltIter1 = 32,
126  hltIter2 = 33,
127  hltIter3 = 34,
128  hltIter4 = 35,
129  // steps used by all other objects @HLT
130  hltIterX = 36,
131  // steps used by HI muon regional iterative tracking
141  algoSize = 46
142  };
143 
145  typedef std::bitset<algoSize> AlgoMask;
146 
147  static const std::string algoNames[];
148 
152  loose = 0,
153  tight = 1,
155  confirmed = 3, // means found by more than one iteration
156  goodIterative = 4, // meaningless
159  discarded = 7, // because a better track found. kept in the collection for reference....
161  };
162 
163  static const std::string qualityNames[];
164 
166  TrackBase();
167 
169  TrackBase(double chi2,
170  double ndof,
171  const Point &vertex,
172  const Vector &momentum,
173  int charge,
174  const CovarianceMatrix &cov,
177  signed char nloops = 0,
178  uint8_t stopReason = 0,
179  float t0 = 0.f,
180  float beta = 0.f,
181  float covt0t0 = -1.f,
182  float covbetabeta = -1.f);
183 
185  virtual ~TrackBase();
186 
188  bool isTimeOk() const { return covt0t0_ > 0.f; }
189 
191  double chi2() const;
192 
194  double ndof() const;
195 
197  double normalizedChi2() const;
198 
200  int charge() const;
201 
203  double qoverp() const;
204 
206  double theta() const;
207 
209  double lambda() const;
210 
212  double dxy() const;
213 
215  double d0() const;
216 
218  double dsz() const;
219 
221  double dz() const;
222 
224  double p() const;
225 
227  double pt() const;
228 
230  double px() const;
231 
233  double py() const;
234 
236  double pz() const;
237 
239  double phi() const;
240 
242  double eta() const;
243 
245  double vx() const;
246 
248  double vy() const;
249 
251  double vz() const;
252 
254  const Vector &momentum() const;
255 
257  const Point &referencePoint() const;
258 
260  double t0() const;
261 
263  double beta() const;
264 
266  const Point &vertex() const;
267  //__attribute__((deprecated("This method is DEPRECATED, please use referencePoint() instead.")));
268 
270  double dxy(const Point &myBeamSpot) const;
271 
273  double dxy(const BeamSpot &theBeamSpot) const;
274 
276  double dsz(const Point &myBeamSpot) const;
277 
279  double dz(const Point &myBeamSpot) const;
280 
282  ParameterVector parameters() const;
283 
285  CovarianceMatrix covariance() const;
286 
288  double parameter(int i) const;
289 
291  double covariance(int i, int j) const;
292 
294  double covt0t0() const;
295 
297  double covBetaBeta() const;
298 
300  double error(int i) const;
301 
303  double qoverpError() const;
304 
306  double ptError() const;
307 
309  double thetaError() const;
310 
312  double lambdaError() const;
313 
315  double etaError() const;
316 
318  double phiError() const;
319 
321  double dxyError() const;
322 
324  double d0Error() const;
325 
327  double dszError() const;
328 
330  double dzError() const;
331 
333  double t0Error() const;
334 
336  double betaError() const;
337 
339  CovarianceMatrix &fill(CovarianceMatrix &v) const;
340 
342  static index covIndex(index i, index j);
343 
345  const HitPattern &hitPattern() const;
346 
348  unsigned short numberOfValidHits() const;
349 
351  unsigned short numberOfLostHits() const;
352 
354  double validFraction() const;
355 
357  template <typename C>
358  bool appendHits(const C &c, const TrackerTopology &ttopo);
359 
360  template <typename I>
361  bool appendHits(const I &begin, const I &end, const TrackerTopology &ttopo);
362 
364  bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo);
365  bool appendHitPattern(const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology &ttopo);
366 
373  bool appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType);
374  bool appendHitPattern(const uint16_t pattern, TrackingRecHit::Type hitType);
375 
382  bool appendMuonHitPattern(const DetId &id, TrackingRecHit::Type hitType);
383 
385  void resetHitPattern();
386 
388  void setAlgorithm(const TrackAlgorithm a);
389 
390  void setOriginalAlgorithm(const TrackAlgorithm a);
391 
392  void setAlgoMask(AlgoMask a) { algoMask_ = a; }
393 
394  AlgoMask algoMask() const { return algoMask_; }
395  unsigned long long algoMaskUL() const { return algoMask().to_ullong(); }
396  bool isAlgoInMask(TrackAlgorithm a) const { return algoMask()[a]; }
397 
398  TrackAlgorithm algo() const;
400 
401  std::string algoName() const;
402 
404 
405  static TrackAlgorithm algoByName(const std::string &name);
406 
408  bool quality(const TrackQuality) const;
409 
410  void setQuality(const TrackQuality);
411 
413 
414  static TrackQuality qualityByName(const std::string &name);
415 
416  int qualityMask() const;
417 
418  void setQualityMask(int qualMask);
419 
420  void setNLoops(signed char value);
421 
422  bool isLooper() const;
423 
424  signed char nLoops() const;
425 
426  void setStopReason(uint8_t value) { stopReason_ = value; }
427 
428  uint8_t stopReason() const { return stopReason_; }
429 
430  private:
433 
436 
439 
441  float chi2_;
442 
444  Point vertex_;
445 
447  float t0_;
448 
450  Vector momentum_;
451 
454  float beta_;
455 
457  std::bitset<algoSize> algoMask_;
458 
460  float ndof_;
461 
463  char charge_;
464 
466  uint8_t algorithm_;
467 
470 
472  uint8_t quality_;
473 
475  // I use signed char because I don't expect more than 128 loops and I could use a negative value for a special purpose.
476  signed char nLoops_;
477 
479  uint8_t stopReason_;
480  };
481 
482  // Access the hit pattern, indicating in which Tracker layers the track has hits.
483  inline const HitPattern &TrackBase::hitPattern() const { return hitPattern_; }
484 
485  inline bool TrackBase::appendHitPattern(const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology &ttopo) {
486  return hitPattern_.appendHit(id, hitType, ttopo);
487  }
488 
489  inline bool TrackBase::appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo) {
490  return hitPattern_.appendHit(hit, ttopo);
491  }
492 
493  inline bool TrackBase::appendTrackerHitPattern(uint16_t subdet,
494  uint16_t layer,
495  uint16_t stereo,
496  TrackingRecHit::Type hitType) {
497  return hitPattern_.appendTrackerHit(subdet, layer, stereo, hitType);
498  }
499 
501  return hitPattern_.appendHit(pattern, hitType);
502  }
503 
505  return hitPattern_.appendMuonHit(id, hitType);
506  }
507 
509 
510  template <typename I>
511  bool TrackBase::appendHits(const I &begin, const I &end, const TrackerTopology &ttopo) {
512  return hitPattern_.appendHits(begin, end, ttopo);
513  }
514 
515  template <typename C>
516  bool TrackBase::appendHits(const C &c, const TrackerTopology &ttopo) {
517  return hitPattern_.appendHits(c.begin(), c.end(), ttopo);
518  }
519 
521  int a = (i <= j ? i : j);
522  int b = (i <= j ? j : i);
523  return b * (b + 1) / 2 + a;
524  }
525 
528 
530 
531  inline bool TrackBase::quality(const TrackBase::TrackQuality q) const {
532  switch (q) {
533  case undefQuality:
534  return quality_ == 0;
535  case goodIterative:
537  default:
538  return (quality_ & (1 << q)) >> q;
539  }
540  return false;
541  }
542 
544  if (q == undefQuality) {
545  quality_ = 0;
546  } else {
547  quality_ |= (1 << q);
548  }
549  }
550 
552  if (int(q) < int(qualitySize) && int(q) >= 0) {
553  return qualityNames[int(q)];
554  }
555  return "undefQuality";
556  }
557 
559  if (int(a) < int(algoSize) && int(a) > 0) {
560  return algoNames[int(a)];
561  }
562  return "undefAlgorithm";
563  }
564 
565  // chi-squared of the fit
566  inline double TrackBase::chi2() const { return chi2_; }
567 
568  // number of degrees of freedom of the fit
569  inline double TrackBase::ndof() const { return ndof_; }
570 
571  // chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
572  inline double TrackBase::normalizedChi2() const { return ndof_ != 0 ? chi2_ / ndof_ : chi2_ * 1e6; }
573 
574  // track electric charge
575  inline int TrackBase::charge() const { return charge_; }
576 
577  // q / p
578  inline double TrackBase::qoverp() const { return charge() / p(); }
579 
580  // polar angle
581  inline double TrackBase::theta() const { return momentum_.theta(); }
582 
583  // Lambda angle
584  inline double TrackBase::lambda() const { return M_PI_2 - momentum_.theta(); }
585 
586  // dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close to (0,0,0): see parametrization definition above for details). See also function dxy(myBeamSpot) below.
587  inline double TrackBase::dxy() const { return (-vx() * py() + vy() * px()) / pt(); }
588 
589  // dxy parameter in perigee convention (d0 = -dxy)
590  inline double TrackBase::d0() const { return -dxy(); }
591 
592  // dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0,0,0): see parametrization definition above for details)
593  inline double TrackBase::dsz() const { return vz() * pt() / p() - (vx() * px() + vy() * py()) / pt() * pz() / p(); }
594 
595  // dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to (0,0,0). See also function dz(myBeamSpot) below.
596  inline double TrackBase::dz() const { return vz() - (vx() * px() + vy() * py()) / pt() * (pz() / pt()); }
597 
598  // momentum vector magnitude
599  inline double TrackBase::p() const { return momentum_.R(); }
600 
601  // track transverse momentum
602  inline double TrackBase::pt() const { return sqrt(momentum_.Perp2()); }
603 
604  // x coordinate of momentum vector
605  inline double TrackBase::px() const { return momentum_.x(); }
606 
607  // y coordinate of momentum vector
608  inline double TrackBase::py() const { return momentum_.y(); }
609 
610  // z coordinate of momentum vector
611  inline double TrackBase::pz() const { return momentum_.z(); }
612 
613  // azimuthal angle of momentum vector
614  inline double TrackBase::phi() const { return momentum_.Phi(); }
615 
616  // pseudorapidity of momentum vector
617  inline double TrackBase::eta() const { return momentum_.Eta(); }
618 
619  // x coordinate of the reference point on track
620  inline double TrackBase::vx() const { return vertex_.x(); }
621 
622  // y coordinate of the reference point on track
623  inline double TrackBase::vy() const { return vertex_.y(); }
624 
625  // z coordinate of the reference point on track
626  inline double TrackBase::vz() const { return vertex_.z(); }
627 
628  // track momentum vector
629  inline const TrackBase::Vector &TrackBase::momentum() const { return momentum_; }
630 
631  // Reference point on the track
632  inline const TrackBase::Point &TrackBase::referencePoint() const { return vertex_; }
633 
634  // Time at the reference point on the track
635  inline double TrackBase::t0() const { return t0_; }
636 
637  // Velocity at the reference point on the track in natural units
638  inline double TrackBase::beta() const { return beta_; }
639 
640  // reference point on the track. This method is DEPRECATED, please use referencePoint() instead
641  inline const TrackBase::Point &TrackBase::vertex() const { return vertex_; }
642 
643  // dxy parameter with respect to a user-given beamSpot
644  // (WARNING: this quantity can only be interpreted as a minimum transverse distance if beamSpot, if the beam spot is reasonably close to the refPoint, since linear approximations are involved).
645  // This is a good approximation for Tracker tracks.
646  inline double TrackBase::dxy(const Point &myBeamSpot) const {
647  return (-(vx() - myBeamSpot.x()) * py() + (vy() - myBeamSpot.y()) * px()) / pt();
648  }
649 
650  // dxy parameter with respect to the beamSpot taking into account the beamspot slopes
651  // (WARNING: this quantity can only be interpreted as a minimum transverse distance if beamSpot, if the beam spot is reasonably close to the refPoint, since linear approximations are involved).
652  // This is a good approximation for Tracker tracks.
653  inline double TrackBase::dxy(const BeamSpot &theBeamSpot) const { return dxy(theBeamSpot.position(vz())); }
654 
655  // dsz parameter with respect to a user-given beamSpot
656  // (WARNING: this quantity can only be interpreted as the distance in the S-Z plane to the beamSpot, if the beam spot is reasonably close to the refPoint, since linear approximations are involved).
657  // This is a good approximation for Tracker tracks.
658  inline double TrackBase::dsz(const Point &myBeamSpot) const {
659  return (vz() - myBeamSpot.z()) * pt() / p() -
660  ((vx() - myBeamSpot.x()) * px() + (vy() - myBeamSpot.y()) * py()) / pt() * pz() / p();
661  }
662 
663  // dz parameter with respect to a user-given beamSpot
664  // (WARNING: this quantity can only be interpreted as the track z0, if the beamSpot is reasonably close to the refPoint, since linear approximations are involved).
665  // This is a good approximation for Tracker tracks.
666  inline double TrackBase::dz(const Point &myBeamSpot) const {
667  return (vz() - myBeamSpot.z()) -
668  ((vx() - myBeamSpot.x()) * px() + (vy() - myBeamSpot.y()) * py()) / pt() * pz() / pt();
669  }
670 
671  // Track parameters with one-to-one correspondence to the covariance matrix
673  return TrackBase::ParameterVector(qoverp(), lambda(), phi(), dxy(), dsz());
674  }
675 
676  // return track covariance matrix
679  fill(m);
680  return m;
681  }
682 
683  // i-th parameter ( i = 0, ... 4 )
684  inline double TrackBase::parameter(int i) const { return parameters()[i]; }
685 
686  // (i,j)-th element of covariance matrix (i, j = 0, ... 4)
687  inline double TrackBase::covariance(int i, int j) const { return covariance_[covIndex(i, j)]; }
688 
689  // error on specified element
690  inline double TrackBase::error(int i) const { return sqrt(covariance_[covIndex(i, i)]); }
691 
692  // error on signed transverse curvature
693  inline double TrackBase::qoverpError() const { return error(i_qoverp); }
694 
695  // error on Pt (set to 1000 TeV if charge==0 for safety)
696  inline double TrackBase::ptError() const {
697  return (charge() != 0) ? sqrt(pt() * pt() * p() * p() / charge() / charge() * covariance(i_qoverp, i_qoverp) +
698  2 * pt() * p() / charge() * pz() * covariance(i_qoverp, i_lambda) +
699  pz() * pz() * covariance(i_lambda, i_lambda))
700  : 1.e6;
701  }
702 
703  // error on theta
704  inline double TrackBase::thetaError() const { return error(i_lambda); }
705 
706  // error on lambda
707  inline double TrackBase::lambdaError() const { return error(i_lambda); }
708 
709  // error on eta
710  inline double TrackBase::etaError() const { return error(i_lambda) * p() / pt(); }
711 
712  // error on phi
713  inline double TrackBase::phiError() const { return error(i_phi); }
714 
715  // error on dxy
716  inline double TrackBase::dxyError() const { return error(i_dxy); }
717 
718  // error on d0
719  inline double TrackBase::d0Error() const { return error(i_dxy); }
720 
721  // error on dsz
722  inline double TrackBase::dszError() const { return error(i_dsz); }
723 
724  // error on dz
725  inline double TrackBase::dzError() const { return error(i_dsz) * p() / pt(); }
726 
727  // covariance of t0
728  inline double TrackBase::covt0t0() const { return covt0t0_; }
729 
730  // covariance of beta
731  inline double TrackBase::covBetaBeta() const { return covbetabeta_; }
732 
733  // error on t0
734  inline double TrackBase::t0Error() const { return std::sqrt(covt0t0_); }
735 
736  // error on beta
737  inline double TrackBase::betaError() const { return std::sqrt(covbetabeta_); }
738 
739  // number of valid hits found
740  inline unsigned short TrackBase::numberOfValidHits() const { return hitPattern_.numberOfValidHits(); }
741 
742  // number of cases where track crossed a layer without getting a hit.
743  inline unsigned short TrackBase::numberOfLostHits() const {
745  }
746 
747  // fraction of valid hits on the track
748  inline double TrackBase::validFraction() const {
753 
754  if ((valid + lost + lostIn + lostOut) == 0) {
755  return -1;
756  }
757 
758  return valid / (double)(valid + lost + lostIn + lostOut);
759  }
760 
761  //Track algorithm
763  algorithm_ = a;
764  algoMask_.reset();
766  }
767 
770  algoMask_.set(a);
771  }
772 
773  inline int TrackBase::qualityMask() const { return quality_; }
774 
775  inline void TrackBase::setQualityMask(int qualMask) { quality_ = qualMask; }
776 
777  inline void TrackBase::setNLoops(signed char value) { nLoops_ = value; }
778 
779  inline bool TrackBase::isLooper() const { return (nLoops_ > 0); }
780 
781  inline signed char TrackBase::nLoops() const { return nLoops_; }
782 
783 } // namespace reco
784 
785 #endif
double qoverp() const
q / p
Definition: TrackBase.h:578
bool appendMuonHitPattern(const DetId &id, TrackingRecHit::Type hitType)
Definition: TrackBase.h:504
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
uint8_t stopReason_
Stop Reason.
Definition: TrackBase.h:479
float chi2_
chi-squared
Definition: TrackBase.h:441
double t0() const
time at the reference point
Definition: TrackBase.h:635
void setQualityMask(int qualMask)
Definition: TrackBase.h:775
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:632
double d0Error() const
error on d0
Definition: TrackBase.h:719
void setQuality(const TrackQuality)
Definition: TrackBase.h:543
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:551
unsigned int index
index type
Definition: TrackBase.h:86
bool isLooper() const
Definition: TrackBase.h:779
bool appendHits(const I &begin, const I &end, const TrackerTopology &ttopo)
Definition: HitPattern.h:523
static index covIndex(index i, index j)
covariance matrix index in array
Definition: TrackBase.h:520
uint8_t quality_
track quality
Definition: TrackBase.h:472
double validFraction() const
fraction of valid hits on the track
Definition: TrackBase.h:748
uint8_t originalAlgorithm_
track algorithm
Definition: TrackBase.h:469
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:590
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:572
TrackBase()
default constructor
Definition: TrackBase.cc:59
TrackQuality
track quality
Definition: TrackBase.h:150
double theta() const
polar angle
Definition: TrackBase.h:581
double dxyError() const
error on dxy
Definition: TrackBase.h:716
char charge_
electric charge
Definition: TrackBase.h:463
int numberOfValidHits() const
Definition: HitPattern.h:787
Point vertex_
innermost (reference) point on track
Definition: TrackBase.h:444
uint8_t stopReason() const
Definition: TrackBase.h:428
float covbetabeta_
Definition: TrackBase.h:438
double etaError() const
error on eta
Definition: TrackBase.h:710
#define M_PI_2
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:614
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:743
ErrorD< N >::type type
Definition: Error.h:32
math::Vector< dimension >::type ParameterVector
parameter vector
Definition: TrackBase.h:71
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:605
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:629
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
Definition: TrackBase.h:593
signed char nLoops_
number of loops made during the building of the trajectory of a looper particle
Definition: TrackBase.h:476
TrackAlgorithm
track algorithm
Definition: TrackBase.h:89
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:863
TrackAlgorithm algo() const
Definition: TrackBase.h:526
void setNLoops(signed char value)
Definition: TrackBase.h:777
void setOriginalAlgorithm(const TrackAlgorithm a)
Definition: TrackBase.h:768
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:641
double dszError() const
error on dsz
Definition: TrackBase.h:722
bool isTimeOk() const
return true if timing measurement is usable
Definition: TrackBase.h:188
double beta() const
velocity at the reference point in natural units
Definition: TrackBase.h:638
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
static const std::string qualityNames[]
Definition: TrackBase.h:163
void setStopReason(uint8_t value)
Definition: TrackBase.h:426
fixed size vector
Definition: Vector.h:24
bool appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
Definition: TrackBase.h:493
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:566
std::bitset< algoSize > algoMask_
algo mask, bit set for the algo where it was reconstructed + each algo a track was found overlapping ...
Definition: TrackBase.h:457
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:569
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:677
T sqrt(T t)
Definition: SSEVec.h:19
double pt() const
track transverse momentum
Definition: TrackBase.h:602
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:696
double phiError() const
error on phi
Definition: TrackBase.h:713
int qualityMask() const
Definition: TrackBase.h:773
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:201
double lambda() const
Lambda angle.
Definition: TrackBase.h:584
const std::complex< double > I
Definition: I.h:8
double error(int i) const
error on specified element
Definition: TrackBase.h:690
double f[11][100]
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:740
void resetHitPattern()
Sets HitPattern as empty.
Definition: TrackBase.h:508
#define end
Definition: vmac.h:39
Definition: value.py:1
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
void setAlgoMask(AlgoMask a)
Definition: TrackBase.h:392
bool appendTrackerHit(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
Definition: HitPattern.cc:277
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:611
double parameter(int i) const
i-th parameter ( i = 0, ... 4 )
Definition: TrackBase.h:684
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:693
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:596
double dzError() const
error on dz
Definition: TrackBase.h:725
bool isAlgoInMask(TrackAlgorithm a) const
Definition: TrackBase.h:396
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:626
Definition: DetId.h:17
TrackAlgorithm originalAlgo() const
Definition: TrackBase.h:527
double covBetaBeta() const
error on beta
Definition: TrackBase.h:731
std::bitset< algoSize > AlgoMask
algo mask
Definition: TrackBase.h:145
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
float covt0t0_
errors for time and velocity (separate from cov for now)
Definition: TrackBase.h:438
AlgoMask algoMask() const
Definition: TrackBase.h:394
virtual ~TrackBase()
virtual destructor
Definition: TrackBase.cc:122
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:483
signed char nLoops() const
Definition: TrackBase.h:781
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::string algoName() const
Definition: TrackBase.h:529
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:28
double b
Definition: hdecay.h:118
float ndof_
number of degrees of freedom
Definition: TrackBase.h:460
bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo)
append a single hit to the HitPattern
Definition: TrackBase.h:489
static const std::string algoNames[]
Definition: TrackBase.h:147
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:531
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:861
int numberOfValidTrackerHits() const
Definition: HitPattern.h:789
void setAlgorithm(const TrackAlgorithm a)
Track algorithm.
Definition: TrackBase.h:762
double covt0t0() const
error on t0
Definition: TrackBase.h:728
ParameterVector parameters() const
Track parameters with one-to-one correspondence to the covariance matrix.
Definition: TrackBase.h:672
double lambdaError() const
error on lambda
Definition: TrackBase.h:707
float t0_
time at the reference point on track
Definition: TrackBase.h:447
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:623
fixed size matrix
float covariance_[covarianceSize]
perigee 5x5 covariance matrix
Definition: TrackBase.h:435
#define begin
Definition: vmac.h:32
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
HitPattern hitPattern_
hit pattern
Definition: TrackBase.h:432
double a
Definition: hdecay.h:119
CovarianceMatrix & fill(CovarianceMatrix &v) const
fill SMatrix
Definition: TrackBase.cc:124
double betaError() const
error on beta
Definition: TrackBase.h:737
static TrackAlgorithm algoByName(const std::string &name)
Definition: TrackBase.cc:137
Vector momentum_
momentum vector at innermost point
Definition: TrackBase.h:450
int charge() const
track electric charge
Definition: TrackBase.h:575
const Point & position() const
position
Definition: BeamSpot.h:59
unsigned long long algoMaskUL() const
Definition: TrackBase.h:395
uint8_t algorithm_
track algorithm
Definition: TrackBase.h:466
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:587
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
bool appendHits(const C &c, const TrackerTopology &ttopo)
append hit patterns from vector of hit references
Definition: TrackBase.h:516
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:620
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackBase.h:74
double thetaError() const
error on theta
Definition: TrackBase.h:704
double t0Error() const
error on t0
Definition: TrackBase.h:734
bool appendMuonHit(const DetId &id, TrackingRecHit::Type hitType)
Definition: HitPattern.cc:281