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 
63 class TrackBase
64 {
65 
66 public:
68  enum { dimension = 5 };
69 
71  enum { covarianceSize = dimension * (dimension + 1) / 2 };
72 
75 
78 
81 
84 
86  enum {
87  i_qoverp = 0,
92  };
93 
95  typedef unsigned int index;
96 
97 
100  undefAlgorithm = 0, ctf = 1,
114  nuclInter = 17,
116  // Phase1
120  beamhalo = 28,
121  gsf = 29,
122  // HLT algo name
123  hltPixel = 30,
124  // steps used by PF
125  hltIter0 = 31,
126  hltIter1 = 32,
127  hltIter2 = 33,
128  hltIter3 = 34,
129  hltIter4 = 35,
130  // steps used by all other objects @HLT
131  hltIterX = 36,
132  // steps used by HI muon regional iterative tracking
142  algoSize = 46
143  };
144 
146  typedef std::bitset<algoSize> AlgoMask;
147 
148  static const std::string algoNames[];
149 
153  loose = 0,
154  tight = 1,
156  confirmed = 3, // means found by more than one iteration
157  goodIterative = 4, // meaningless
160  discarded = 7, // because a better track found. kept in the collection for reference....
162  };
163 
164  static const std::string qualityNames[];
165 
167  TrackBase();
168 
170  TrackBase(double chi2, double ndof, const Point &vertex,
171  const Vector &momentum, int charge, const CovarianceMatrix &cov,
173  signed char nloops = 0, uint8_t stopReason = 0);
174 
176  virtual ~TrackBase();
177 
179  double chi2() const;
180 
182  double ndof() const;
183 
185  double normalizedChi2() const;
186 
188  int charge() const;
189 
191  double qoverp() const;
192 
194  double theta() const;
195 
197  double lambda() const;
198 
200  double dxy() const;
201 
203  double d0() const;
204 
206  double dsz() const;
207 
209  double dz() const;
210 
212  double p() const;
213 
215  double pt() const;
216 
218  double px() const;
219 
221  double py() const;
222 
224  double pz() const;
225 
227  double phi() const;
228 
230  double eta() const;
231 
233  double vx() const;
234 
236  double vy() const;
237 
239  double vz() const;
240 
242  const Vector &momentum() const;
243 
245  const Point &referencePoint() const;
246 
248  const Point &vertex() const ;
249  //__attribute__((deprecated("This method is DEPRECATED, please use referencePoint() instead.")));
250 
252  double dxy(const Point &myBeamSpot) const;
253 
255  double dxy(const BeamSpot &theBeamSpot) const;
256 
258  double dsz(const Point &myBeamSpot) const;
259 
261  double dz(const Point &myBeamSpot) const;
262 
264  ParameterVector parameters() const;
265 
267  CovarianceMatrix covariance() const;
268 
270  double parameter(int i) const;
271 
273  double covariance(int i, int j) const;
274 
276  double error(int i) const;
277 
279  double qoverpError() const;
280 
282  double ptError() const;
283 
285  double thetaError() const;
286 
288  double lambdaError() const;
289 
291  double etaError() const;
292 
294  double phiError() const;
295 
297  double dxyError() const;
298 
300  double d0Error() const;
301 
303  double dszError() const;
304 
306  double dzError() const;
307 
309  CovarianceMatrix &fill(CovarianceMatrix &v) const;
310 
312  static index covIndex(index i, index j);
313 
315  const HitPattern &hitPattern() const;
316 
318  unsigned short numberOfValidHits() const;
319 
321  unsigned short numberOfLostHits() const;
322 
324  double validFraction() const;
325 
327  template<typename C>
328  bool appendHits(const C &c, const TrackerTopology& ttopo);
329 
330  template<typename I>
331  bool appendHits(const I &begin, const I &end, const TrackerTopology& ttopo);
332 
334  bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology& ttopo);
335  bool appendHitPattern(const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology& ttopo);
336 
343  bool appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType);
344  bool appendHitPattern(const uint16_t pattern, TrackingRecHit::Type hitType);
345 
352  bool appendMuonHitPattern(const DetId& id, TrackingRecHit::Type hitType);
353 
355  void resetHitPattern();
356 
358  void setAlgorithm(const TrackAlgorithm a);
359 
361 
362  void setAlgoMask(AlgoMask a) { algoMask_ = a;}
363 
364  AlgoMask algoMask() const { return algoMask_;}
365  unsigned long long algoMaskUL() const { return algoMask().to_ullong();}
366  bool isAlgoInMask(TrackAlgorithm a) const {return algoMask()[a];}
367 
368 
369  TrackAlgorithm algo() const ;
370  TrackAlgorithm originalAlgo() const ;
371 
372 
373  std::string algoName() const;
374 
376 
377  static TrackAlgorithm algoByName(const std::string &name);
378 
380  bool quality(const TrackQuality) const;
381 
382  void setQuality(const TrackQuality);
383 
385 
386  static TrackQuality qualityByName(const std::string &name);
387 
388  int qualityMask() const;
389 
390  void setQualityMask(int qualMask);
391 
392  void setNLoops(signed char value);
393 
394  bool isLooper() const;
395 
396  signed char nLoops() const;
397 
398  void setStopReason(uint8_t value) { stopReason_ = value; }
399 
400  uint8_t stopReason() const { return stopReason_; }
401 
402 
403 private:
406 
409 
411  float chi2_;
412 
414  Point vertex_;
415 
417  Vector momentum_;
418 
420  std::bitset<algoSize> algoMask_;
421 
423  float ndof_;
424 
426  char charge_;
427 
429  uint8_t algorithm_;
430 
433 
434 
436  uint8_t quality_;
437 
439  signed char nLoops_; // I use signed char because I don't expect more than 128 loops and I could use a negative value for a special purpose.
440 
442  uint8_t stopReason_;
443 };
444 
445 // Access the hit pattern, indicating in which Tracker layers the track has hits.
446 inline const HitPattern & TrackBase::hitPattern() const
447 {
448  return hitPattern_;
449 }
450 
451 inline bool TrackBase::appendHitPattern(const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology& ttopo)
452 {
453  return hitPattern_.appendHit(id, hitType, ttopo);
454 }
455 
457 {
458  return hitPattern_.appendHit(hit, ttopo);
459 }
460 
461 inline bool TrackBase::appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType) {
462  return hitPattern_.appendTrackerHit(subdet, layer, stereo, hitType);
463 }
464 
466  return hitPattern_.appendHit(pattern, hitType);
467 }
468 
470  return hitPattern_.appendMuonHit(id, hitType);
471 }
472 
474 {
475  hitPattern_.clear();
476 }
477 
478 template<typename I>
479 bool TrackBase::appendHits(const I &begin, const I &end, const TrackerTopology& ttopo)
480 {
481  return hitPattern_.appendHits(begin, end, ttopo);
482 }
483 
484 template<typename C>
485 bool TrackBase::appendHits(const C &c, const TrackerTopology& ttopo)
486 {
487  return hitPattern_.appendHits(c.begin(), c.end(), ttopo);
488 }
489 
491 {
492  int a = (i <= j ? i : j);
493  int b = (i <= j ? j : i);
494  return b * (b + 1) / 2 + a;
495 }
496 
498 {
499  return (TrackAlgorithm) (algorithm_);
500 }
502 {
504 }
505 
506 
507 
509 
511 {
512  switch (q) {
513  case undefQuality:
514  return quality_ == 0;
515  case goodIterative:
517  default:
518  return (quality_ & (1 << q)) >> q;
519  }
520  return false;
521 }
522 
524 {
525  if (q == undefQuality) {
526  quality_ = 0;
527  } else {
528  quality_ |= (1 << q);
529  }
530 }
531 
533 {
534  if (int(q) < int(qualitySize) && int(q) >= 0) {
535  return qualityNames[int(q)];
536  }
537  return "undefQuality";
538 }
539 
541 {
542  if (int(a) < int(algoSize) && int(a) > 0) {
543  return algoNames[int(a)];
544  }
545  return "undefAlgorithm";
546 }
547 
548 // chi-squared of the fit
549 inline double TrackBase::chi2() const
550 {
551  return chi2_;
552 }
553 
554 // number of degrees of freedom of the fit
555 inline double TrackBase::ndof() const
556 {
557  return ndof_;
558 }
559 
560 // chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
561 inline double TrackBase::normalizedChi2() const
562 {
563  return ndof_ != 0 ? chi2_ / ndof_ : chi2_ * 1e6;
564 }
565 
566 // track electric charge
567 inline int TrackBase::charge() const
568 {
569  return charge_;
570 }
571 
572 // q / p
573 inline double TrackBase::qoverp() const
574 {
575  return charge() / p();
576 }
577 
578 // polar angle
579 inline double TrackBase::theta() const
580 {
581  return momentum_.theta();
582 }
583 
584 // Lambda angle
585 inline double TrackBase::lambda() const
586 {
587  return M_PI_2 - momentum_.theta();
588 }
589 
590 // 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.
591 inline double TrackBase::dxy() const
592 {
593  return (-vx() * py() + vy() * px()) / pt();
594 }
595 
596 // dxy parameter in perigee convention (d0 = -dxy)
597 inline double TrackBase::d0() const
598 {
599  return -dxy();
600 }
601 
602 // 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)
603 inline double TrackBase::dsz() const
604 {
605  return vz() * pt() / p() - (vx() * px() + vy() * py()) / pt() * pz() / p();
606 }
607 
608 // 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.
609 inline double TrackBase::dz() const
610 {
611  return vz() - (vx() * px() + vy() * py()) / pt() * (pz() / pt());
612 }
613 
614 // momentum vector magnitude
615 inline double TrackBase::p() const
616 {
617  return momentum_.R();
618 }
619 
620 // track transverse momentum
621 inline double TrackBase::pt() const
622 {
623  return sqrt(momentum_.Perp2());
624 }
625 
626 // x coordinate of momentum vector
627 inline double TrackBase::px() const
628 {
629  return momentum_.x();
630 }
631 
632 // y coordinate of momentum vector
633 inline double TrackBase::py() const
634 {
635  return momentum_.y();
636 }
637 
638 // z coordinate of momentum vector
639 inline double TrackBase::pz() const
640 {
641  return momentum_.z();
642 }
643 
644 // azimuthal angle of momentum vector
645 inline double TrackBase::phi() const
646 {
647  return momentum_.Phi();
648 }
649 
650 // pseudorapidity of momentum vector
651 inline double TrackBase::eta() const
652 {
653  return momentum_.Eta();
654 }
655 
656 // x coordinate of the reference point on track
657 inline double TrackBase::vx() const
658 {
659  return vertex_.x();
660 }
661 
662 // y coordinate of the reference point on track
663 inline double TrackBase::vy() const
664 {
665  return vertex_.y();
666 }
667 
668 // z coordinate of the reference point on track
669 inline double TrackBase::vz() const
670 {
671  return vertex_.z();
672 }
673 
674 // track momentum vector
676 {
677  return momentum_;
678 }
679 
680 // Reference point on the track
682 {
683  return vertex_;
684 }
685 
686 // reference point on the track. This method is DEPRECATED, please use referencePoint() instead
687 inline const TrackBase::Point & TrackBase::vertex() const
688 {
689  return vertex_;
690 }
691 
692 // dxy parameter with respect to a user-given beamSpot
693 // (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).
694 // This is a good approximation for Tracker tracks.
695 inline double TrackBase::dxy(const Point &myBeamSpot) const
696 {
697  return (-(vx() - myBeamSpot.x()) * py() + (vy() - myBeamSpot.y()) * px()) / pt();
698 }
699 
700 // dxy parameter with respect to the beamSpot taking into account the beamspot slopes
701 // (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).
702 // This is a good approximation for Tracker tracks.
703 inline double TrackBase::dxy(const BeamSpot &theBeamSpot) const
704 {
705  return dxy(theBeamSpot.position(vz()));
706 }
707 
708 // dsz parameter with respect to a user-given beamSpot
709 // (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).
710 // This is a good approximation for Tracker tracks.
711 inline double TrackBase::dsz(const Point &myBeamSpot) const
712 {
713  return (vz() - myBeamSpot.z()) * pt() / p() - ((vx() - myBeamSpot.x()) * px() + (vy() - myBeamSpot.y()) * py()) / pt() * pz() / p();
714 }
715 
716 // dz parameter with respect to a user-given beamSpot
717 // (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).
718 // This is a good approximation for Tracker tracks.
719 inline double TrackBase::dz(const Point &myBeamSpot) const
720 {
721  return (vz() - myBeamSpot.z()) - ((vx() - myBeamSpot.x()) * px() + (vy() - myBeamSpot.y()) * py()) / pt() * pz() / pt();
722 }
723 
724 // Track parameters with one-to-one correspondence to the covariance matrix
726 {
727  return TrackBase::ParameterVector(qoverp(), lambda(), phi(), dxy(), dsz());
728 }
729 
730 // return track covariance matrix
732 {
734  fill(m);
735  return m;
736 }
737 
738 // i-th parameter ( i = 0, ... 4 )
739 inline double TrackBase::parameter(int i) const
740 {
741  return parameters()[i];
742 }
743 
744 // (i,j)-th element of covariance matrix (i, j = 0, ... 4)
745 inline double TrackBase::covariance(int i, int j) const
746 {
747  return covariance_[covIndex(i, j)];
748 }
749 
750 // error on specified element
751 inline double TrackBase::error(int i) const
752 {
753  return sqrt(covariance_[covIndex(i, i)]);
754 }
755 
756 // error on signed transverse curvature
757 inline double TrackBase::qoverpError() const
758 {
759  return error(i_qoverp);
760 }
761 
762 // error on Pt (set to 1000 TeV if charge==0 for safety)
763 inline double TrackBase::ptError() const
764 {
765  return (charge() != 0) ? sqrt(
766  pt() * pt() * p() * p() / charge() / charge() * covariance(i_qoverp, i_qoverp)
767  + 2 * pt() * p() / charge() * pz() * covariance(i_qoverp, i_lambda)
768  + pz() * pz() * covariance(i_lambda, i_lambda)) : 1.e6;
769 }
770 
771 // error on theta
772 inline double TrackBase::thetaError() const
773 {
774  return error(i_lambda);
775 }
776 
777 // error on lambda
778 inline double TrackBase::lambdaError() const
779 {
780  return error(i_lambda);
781 }
782 
783 // error on eta
784 inline double TrackBase::etaError() const
785 {
786  return error(i_lambda) * p() / pt();
787 }
788 
789 // error on phi
790 inline double TrackBase::phiError() const
791 {
792  return error(i_phi);
793 }
794 
795 // error on dxy
796 inline double TrackBase::dxyError() const
797 {
798  return error(i_dxy);
799 }
800 
801 // error on d0
802 inline double TrackBase::d0Error() const
803 {
804  return error(i_dxy);
805 }
806 
807 // error on dsz
808 inline double TrackBase::dszError() const
809 {
810  return error(i_dsz);
811 }
812 
813 // error on dz
814 inline double TrackBase::dzError() const
815 {
816  return error(i_dsz) * p() / pt();
817 }
818 
819 // number of valid hits found
820 inline unsigned short TrackBase::numberOfValidHits() const
821 {
823 }
824 
825 // number of cases where track crossed a layer without getting a hit.
826 inline unsigned short TrackBase::numberOfLostHits() const
827 {
829 }
830 
831 // fraction of valid hits on the track
832 inline double TrackBase::validFraction() const
833 {
838 
839  if ((valid + lost + lostIn + lostOut) == 0) {
840  return -1;
841  }
842 
843  return valid / (double)(valid + lost + lostIn + lostOut);
844 }
845 
846 //Track algorithm
848 {
849  algorithm_ = a;
850  algoMask_.reset();
852 }
853 
855 {
857  algoMask_.set(a);
858 }
859 
860 
861 
862 inline int TrackBase::qualityMask() const
863 {
864  return quality_;
865 }
866 
867 inline void TrackBase::setQualityMask(int qualMask)
868 {
869  quality_ = qualMask;
870 }
871 
872 inline void TrackBase::setNLoops(signed char value)
873 {
874  nLoops_ = value;
875 }
876 
877 inline bool TrackBase::isLooper() const
878 {
879  return (nLoops_ > 0);
880 }
881 
882 inline signed char TrackBase::nLoops() const
883 {
884  return nLoops_;
885 }
886 
887 } // namespace reco
888 
889 #endif
890 
double qoverp() const
q / p
Definition: TrackBase.h:573
bool appendMuonHitPattern(const DetId &id, TrackingRecHit::Type hitType)
Definition: TrackBase.h:469
double p() const
momentum vector magnitude
Definition: TrackBase.h:615
uint8_t stopReason_
Stop Reason.
Definition: TrackBase.h:442
float chi2_
chi-squared
Definition: TrackBase.h:411
void setQualityMask(int qualMask)
Definition: TrackBase.h:867
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:681
double d0Error() const
error on d0
Definition: TrackBase.h:802
void setQuality(const TrackQuality)
Definition: TrackBase.h:523
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:532
unsigned int index
index type
Definition: TrackBase.h:95
bool isLooper() const
Definition: TrackBase.h:877
bool appendHits(const I &begin, const I &end, const TrackerTopology &ttopo)
Definition: HitPattern.h:506
static index covIndex(index i, index j)
covariance matrix index in array
Definition: TrackBase.h:490
uint8_t quality_
track quality
Definition: TrackBase.h:436
double validFraction() const
fraction of valid hits on the track
Definition: TrackBase.h:832
uint8_t originalAlgorithm_
track algorithm
Definition: TrackBase.h:432
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:597
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:561
TrackBase()
default constructor
Definition: TrackBase.cc:69
TrackQuality
track quality
Definition: TrackBase.h:151
double theta() const
polar angle
Definition: TrackBase.h:579
double dxyError() const
error on dxy
Definition: TrackBase.h:796
char charge_
electric charge
Definition: TrackBase.h:426
int numberOfValidHits() const
Definition: HitPattern.h:824
Point vertex_
innermost (reference) point on track
Definition: TrackBase.h:414
uint8_t stopReason() const
Definition: TrackBase.h:400
double etaError() const
error on eta
Definition: TrackBase.h:784
#define M_PI_2
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:645
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:826
ErrorD< N >::type type
Definition: Error.h:33
math::Vector< dimension >::type ParameterVector
parameter vector
Definition: TrackBase.h:74
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:627
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:675
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:603
signed char nLoops_
number of loops made during the building of the trajectory of a looper particle
Definition: TrackBase.h:439
TrackAlgorithm
track algorithm
Definition: TrackBase.h:99
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:908
TrackAlgorithm algo() const
Definition: TrackBase.h:497
void setNLoops(signed char value)
Definition: TrackBase.h:872
void setOriginalAlgorithm(const TrackAlgorithm a)
Definition: TrackBase.h:854
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:687
double dszError() const
error on dsz
Definition: TrackBase.h:808
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:651
static const std::string qualityNames[]
Definition: TrackBase.h:164
void setStopReason(uint8_t value)
Definition: TrackBase.h:398
fixed size vector
Definition: Vector.h:25
bool appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
Definition: TrackBase.h:461
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:549
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:420
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:555
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:731
T sqrt(T t)
Definition: SSEVec.h:18
double pt() const
track transverse momentum
Definition: TrackBase.h:621
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:763
double phiError() const
error on phi
Definition: TrackBase.h:790
int qualityMask() const
Definition: TrackBase.h:862
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:189
double lambda() const
Lambda angle.
Definition: TrackBase.h:585
const std::complex< double > I
Definition: I.h:8
double error(int i) const
error on specified element
Definition: TrackBase.h:751
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:820
void resetHitPattern()
Sets HitPattern as empty.
Definition: TrackBase.h:473
#define end
Definition: vmac.h:39
Definition: value.py:1
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
void setAlgoMask(AlgoMask a)
Definition: TrackBase.h:362
bool appendTrackerHit(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
Definition: HitPattern.cc:267
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:639
double parameter(int i) const
i-th parameter ( i = 0, ... 4 )
Definition: TrackBase.h:739
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:757
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:609
double dzError() const
error on dz
Definition: TrackBase.h:814
bool isAlgoInMask(TrackAlgorithm a) const
Definition: TrackBase.h:366
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:669
Definition: DetId.h:18
TrackAlgorithm originalAlgo() const
Definition: TrackBase.h:501
std::bitset< algoSize > AlgoMask
algo mask
Definition: TrackBase.h:146
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
AlgoMask algoMask() const
Definition: TrackBase.h:364
virtual ~TrackBase()
virtual destructor
Definition: TrackBase.cc:115
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:446
signed char nLoops() const
Definition: TrackBase.h:882
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
std::string algoName() const
Definition: TrackBase.h:508
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:28
double b
Definition: hdecay.h:120
float ndof_
number of degrees of freedom
Definition: TrackBase.h:423
bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo)
append a single hit to the HitPattern
Definition: TrackBase.h:456
static const std::string algoNames[]
Definition: TrackBase.h:148
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:510
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:903
int numberOfValidTrackerHits() const
Definition: HitPattern.h:829
void setAlgorithm(const TrackAlgorithm a)
Track algorithm.
Definition: TrackBase.h:847
ParameterVector parameters() const
Track parameters with one-to-one correspondence to the covariance matrix.
Definition: TrackBase.h:725
double lambdaError() const
error on lambda
Definition: TrackBase.h:778
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:663
fixed size matrix
float covariance_[covarianceSize]
perigee 5x5 covariance matrix
Definition: TrackBase.h:408
#define begin
Definition: vmac.h:32
HitPattern hitPattern_
hit pattern
Definition: TrackBase.h:405
double a
Definition: hdecay.h:121
CovarianceMatrix & fill(CovarianceMatrix &v) const
fill SMatrix
Definition: TrackBase.cc:120
static TrackAlgorithm algoByName(const std::string &name)
Definition: TrackBase.cc:137
Vector momentum_
momentum vector at innermost point
Definition: TrackBase.h:417
int charge() const
track electric charge
Definition: TrackBase.h:567
const Point & position() const
position
Definition: BeamSpot.h:62
unsigned long long algoMaskUL() const
Definition: TrackBase.h:365
uint8_t algorithm_
track algorithm
Definition: TrackBase.h:429
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:591
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:80
bool appendHits(const C &c, const TrackerTopology &ttopo)
append hit patterns from vector of hit references
Definition: TrackBase.h:485
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:633
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:657
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackBase.h:77
double thetaError() const
error on theta
Definition: TrackBase.h:772
bool appendMuonHit(const DetId &id, TrackingRecHit::Type hitType)
Definition: HitPattern.cc:271