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  float t0 = 0.f, float beta = 0.f,
175  float covt0t0 = -1.f, float covbetabeta = -1.f);
176 
178  virtual ~TrackBase();
179 
181  bool isTimeOk() const { return covt0t0_ > 0.f; }
182 
184  double chi2() const;
185 
187  double ndof() const;
188 
190  double normalizedChi2() const;
191 
193  int charge() const;
194 
196  double qoverp() const;
197 
199  double theta() const;
200 
202  double lambda() const;
203 
205  double dxy() const;
206 
208  double d0() const;
209 
211  double dsz() const;
212 
214  double dz() const;
215 
217  double p() const;
218 
220  double pt() const;
221 
223  double px() const;
224 
226  double py() const;
227 
229  double pz() const;
230 
232  double phi() const;
233 
235  double eta() const;
236 
238  double vx() const;
239 
241  double vy() const;
242 
244  double vz() const;
245 
247  const Vector &momentum() const;
248 
250  const Point &referencePoint() const;
251 
253  double t0() const;
254 
256  double beta() const;
257 
259  const Point &vertex() const ;
260  //__attribute__((deprecated("This method is DEPRECATED, please use referencePoint() instead.")));
261 
263  double dxy(const Point &myBeamSpot) const;
264 
266  double dxy(const BeamSpot &theBeamSpot) const;
267 
269  double dsz(const Point &myBeamSpot) const;
270 
272  double dz(const Point &myBeamSpot) const;
273 
275  ParameterVector parameters() const;
276 
278  CovarianceMatrix covariance() const;
279 
281  double parameter(int i) const;
282 
284  double covariance(int i, int j) const;
285 
287  double covt0t0() const;
288 
290  double covBetaBeta() const;
291 
293  double error(int i) const;
294 
296  double qoverpError() const;
297 
299  double ptError() const;
300 
302  double thetaError() const;
303 
305  double lambdaError() const;
306 
308  double etaError() const;
309 
311  double phiError() const;
312 
314  double dxyError() const;
315 
317  double d0Error() const;
318 
320  double dszError() const;
321 
323  double dzError() const;
324 
326  double t0Error() const;
327 
329  double betaError() const;
330 
332  CovarianceMatrix &fill(CovarianceMatrix &v) const;
333 
335  static index covIndex(index i, index j);
336 
338  const HitPattern &hitPattern() const;
339 
341  unsigned short numberOfValidHits() const;
342 
344  unsigned short numberOfLostHits() const;
345 
347  double validFraction() const;
348 
350  template<typename C>
351  bool appendHits(const C &c, const TrackerTopology& ttopo);
352 
353  template<typename I>
354  bool appendHits(const I &begin, const I &end, const TrackerTopology& ttopo);
355 
357  bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology& ttopo);
358  bool appendHitPattern(const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology& ttopo);
359 
366  bool appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType);
367  bool appendHitPattern(const uint16_t pattern, TrackingRecHit::Type hitType);
368 
375  bool appendMuonHitPattern(const DetId& id, TrackingRecHit::Type hitType);
376 
378  void resetHitPattern();
379 
381  void setAlgorithm(const TrackAlgorithm a);
382 
383  void setOriginalAlgorithm(const TrackAlgorithm a);
384 
385  void setAlgoMask(AlgoMask a) { algoMask_ = a;}
386 
387  AlgoMask algoMask() const { return algoMask_;}
388  unsigned long long algoMaskUL() const { return algoMask().to_ullong();}
389  bool isAlgoInMask(TrackAlgorithm a) const {return algoMask()[a];}
390 
391 
392  TrackAlgorithm algo() const ;
393  TrackAlgorithm originalAlgo() const ;
394 
395 
396  std::string algoName() const;
397 
399 
400  static TrackAlgorithm algoByName(const std::string &name);
401 
403  bool quality(const TrackQuality) const;
404 
405  void setQuality(const TrackQuality);
406 
408 
409  static TrackQuality qualityByName(const std::string &name);
410 
411  int qualityMask() const;
412 
413  void setQualityMask(int qualMask);
414 
415  void setNLoops(signed char value);
416 
417  bool isLooper() const;
418 
419  signed char nLoops() const;
420 
421  void setStopReason(uint8_t value) { stopReason_ = value; }
422 
423  uint8_t stopReason() const { return stopReason_; }
424 
425 
426 private:
429 
432 
435 
437  float chi2_;
438 
440  Point vertex_;
441 
443  float t0_;
444 
446  Vector momentum_;
447 
450  float beta_;
451 
453  std::bitset<algoSize> algoMask_;
454 
456  float ndof_;
457 
459  char charge_;
460 
462  uint8_t algorithm_;
463 
466 
467 
469  uint8_t quality_;
470 
472  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.
473 
475  uint8_t stopReason_;
476 };
477 
478 // Access the hit pattern, indicating in which Tracker layers the track has hits.
479 inline const HitPattern & TrackBase::hitPattern() const
480 {
481  return hitPattern_;
482 }
483 
484 inline bool TrackBase::appendHitPattern(const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology& ttopo)
485 {
486  return hitPattern_.appendHit(id, hitType, ttopo);
487 }
488 
490 {
491  return hitPattern_.appendHit(hit, ttopo);
492 }
493 
494 inline bool TrackBase::appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType) {
495  return hitPattern_.appendTrackerHit(subdet, layer, stereo, hitType);
496 }
497 
499  return hitPattern_.appendHit(pattern, hitType);
500 }
501 
503  return hitPattern_.appendMuonHit(id, hitType);
504 }
505 
507 {
508  hitPattern_.clear();
509 }
510 
511 template<typename I>
512 bool TrackBase::appendHits(const I &begin, const I &end, const TrackerTopology& ttopo)
513 {
514  return hitPattern_.appendHits(begin, end, ttopo);
515 }
516 
517 template<typename C>
518 bool TrackBase::appendHits(const C &c, const TrackerTopology& ttopo)
519 {
520  return hitPattern_.appendHits(c.begin(), c.end(), ttopo);
521 }
522 
524 {
525  int a = (i <= j ? i : j);
526  int b = (i <= j ? j : i);
527  return b * (b + 1) / 2 + a;
528 }
529 
531 {
532  return (TrackAlgorithm) (algorithm_);
533 }
535 {
537 }
538 
539 
540 
542 
544 {
545  switch (q) {
546  case undefQuality:
547  return quality_ == 0;
548  case goodIterative:
550  default:
551  return (quality_ & (1 << q)) >> q;
552  }
553  return false;
554 }
555 
557 {
558  if (q == undefQuality) {
559  quality_ = 0;
560  } else {
561  quality_ |= (1 << q);
562  }
563 }
564 
566 {
567  if (int(q) < int(qualitySize) && int(q) >= 0) {
568  return qualityNames[int(q)];
569  }
570  return "undefQuality";
571 }
572 
574 {
575  if (int(a) < int(algoSize) && int(a) > 0) {
576  return algoNames[int(a)];
577  }
578  return "undefAlgorithm";
579 }
580 
581 // chi-squared of the fit
582 inline double TrackBase::chi2() const
583 {
584  return chi2_;
585 }
586 
587 // number of degrees of freedom of the fit
588 inline double TrackBase::ndof() const
589 {
590  return ndof_;
591 }
592 
593 // chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
594 inline double TrackBase::normalizedChi2() const
595 {
596  return ndof_ != 0 ? chi2_ / ndof_ : chi2_ * 1e6;
597 }
598 
599 // track electric charge
600 inline int TrackBase::charge() const
601 {
602  return charge_;
603 }
604 
605 // q / p
606 inline double TrackBase::qoverp() const
607 {
608  return charge() / p();
609 }
610 
611 // polar angle
612 inline double TrackBase::theta() const
613 {
614  return momentum_.theta();
615 }
616 
617 // Lambda angle
618 inline double TrackBase::lambda() const
619 {
620  return M_PI_2 - momentum_.theta();
621 }
622 
623 // 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.
624 inline double TrackBase::dxy() const
625 {
626  return (-vx() * py() + vy() * px()) / pt();
627 }
628 
629 // dxy parameter in perigee convention (d0 = -dxy)
630 inline double TrackBase::d0() const
631 {
632  return -dxy();
633 }
634 
635 // 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)
636 inline double TrackBase::dsz() const
637 {
638  return vz() * pt() / p() - (vx() * px() + vy() * py()) / pt() * pz() / p();
639 }
640 
641 // 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.
642 inline double TrackBase::dz() const
643 {
644  return vz() - (vx() * px() + vy() * py()) / pt() * (pz() / pt());
645 }
646 
647 // momentum vector magnitude
648 inline double TrackBase::p() const
649 {
650  return momentum_.R();
651 }
652 
653 // track transverse momentum
654 inline double TrackBase::pt() const
655 {
656  return sqrt(momentum_.Perp2());
657 }
658 
659 // x coordinate of momentum vector
660 inline double TrackBase::px() const
661 {
662  return momentum_.x();
663 }
664 
665 // y coordinate of momentum vector
666 inline double TrackBase::py() const
667 {
668  return momentum_.y();
669 }
670 
671 // z coordinate of momentum vector
672 inline double TrackBase::pz() const
673 {
674  return momentum_.z();
675 }
676 
677 // azimuthal angle of momentum vector
678 inline double TrackBase::phi() const
679 {
680  return momentum_.Phi();
681 }
682 
683 // pseudorapidity of momentum vector
684 inline double TrackBase::eta() const
685 {
686  return momentum_.Eta();
687 }
688 
689 // x coordinate of the reference point on track
690 inline double TrackBase::vx() const
691 {
692  return vertex_.x();
693 }
694 
695 // y coordinate of the reference point on track
696 inline double TrackBase::vy() const
697 {
698  return vertex_.y();
699 }
700 
701 // z coordinate of the reference point on track
702 inline double TrackBase::vz() const
703 {
704  return vertex_.z();
705 }
706 
707 // track momentum vector
709 {
710  return momentum_;
711 }
712 
713 // Reference point on the track
715 {
716  return vertex_;
717 }
718 
719 // Time at the reference point on the track
720 inline double TrackBase::t0() const
721 {
722  return t0_;
723 }
724 
725 // Velocity at the reference point on the track in natural units
726 inline double TrackBase::beta() const
727 {
728  return beta_;
729 }
730 
731 // reference point on the track. This method is DEPRECATED, please use referencePoint() instead
732 inline const TrackBase::Point & TrackBase::vertex() const
733 {
734  return vertex_;
735 }
736 
737 // dxy parameter with respect to a user-given beamSpot
738 // (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).
739 // This is a good approximation for Tracker tracks.
740 inline double TrackBase::dxy(const Point &myBeamSpot) const
741 {
742  return (-(vx() - myBeamSpot.x()) * py() + (vy() - myBeamSpot.y()) * px()) / pt();
743 }
744 
745 // dxy parameter with respect to the beamSpot taking into account the beamspot slopes
746 // (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).
747 // This is a good approximation for Tracker tracks.
748 inline double TrackBase::dxy(const BeamSpot &theBeamSpot) const
749 {
750  return dxy(theBeamSpot.position(vz()));
751 }
752 
753 // dsz parameter with respect to a user-given beamSpot
754 // (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).
755 // This is a good approximation for Tracker tracks.
756 inline double TrackBase::dsz(const Point &myBeamSpot) const
757 {
758  return (vz() - myBeamSpot.z()) * pt() / p() - ((vx() - myBeamSpot.x()) * px() + (vy() - myBeamSpot.y()) * py()) / pt() * pz() / p();
759 }
760 
761 // dz parameter with respect to a user-given beamSpot
762 // (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).
763 // This is a good approximation for Tracker tracks.
764 inline double TrackBase::dz(const Point &myBeamSpot) const
765 {
766  return (vz() - myBeamSpot.z()) - ((vx() - myBeamSpot.x()) * px() + (vy() - myBeamSpot.y()) * py()) / pt() * pz() / pt();
767 }
768 
769 // Track parameters with one-to-one correspondence to the covariance matrix
771 {
772  return TrackBase::ParameterVector(qoverp(), lambda(), phi(), dxy(), dsz());
773 }
774 
775 // return track covariance matrix
777 {
779  fill(m);
780  return m;
781 }
782 
783 // i-th parameter ( i = 0, ... 4 )
784 inline double TrackBase::parameter(int i) const
785 {
786  return parameters()[i];
787 }
788 
789 // (i,j)-th element of covariance matrix (i, j = 0, ... 4)
790 inline double TrackBase::covariance(int i, int j) const
791 {
792  return covariance_[covIndex(i, j)];
793 }
794 
795 // error on specified element
796 inline double TrackBase::error(int i) const
797 {
798  return sqrt(covariance_[covIndex(i, i)]);
799 }
800 
801 // error on signed transverse curvature
802 inline double TrackBase::qoverpError() const
803 {
804  return error(i_qoverp);
805 }
806 
807 // error on Pt (set to 1000 TeV if charge==0 for safety)
808 inline double TrackBase::ptError() const
809 {
810  return (charge() != 0) ? sqrt(
811  pt() * pt() * p() * p() / charge() / charge() * covariance(i_qoverp, i_qoverp)
812  + 2 * pt() * p() / charge() * pz() * covariance(i_qoverp, i_lambda)
813  + pz() * pz() * covariance(i_lambda, i_lambda)) : 1.e6;
814 }
815 
816 // error on theta
817 inline double TrackBase::thetaError() const
818 {
819  return error(i_lambda);
820 }
821 
822 // error on lambda
823 inline double TrackBase::lambdaError() const
824 {
825  return error(i_lambda);
826 }
827 
828 // error on eta
829 inline double TrackBase::etaError() const
830 {
831  return error(i_lambda) * p() / pt();
832 }
833 
834 // error on phi
835 inline double TrackBase::phiError() const
836 {
837  return error(i_phi);
838 }
839 
840 // error on dxy
841 inline double TrackBase::dxyError() const
842 {
843  return error(i_dxy);
844 }
845 
846 // error on d0
847 inline double TrackBase::d0Error() const
848 {
849  return error(i_dxy);
850 }
851 
852 // error on dsz
853 inline double TrackBase::dszError() const
854 {
855  return error(i_dsz);
856 }
857 
858 // error on dz
859 inline double TrackBase::dzError() const
860 {
861  return error(i_dsz) * p() / pt();
862 }
863 
864 // covariance of t0
865 inline double TrackBase::covt0t0() const
866 {
867  return covt0t0_;
868 }
869 
870 // covariance of beta
871 inline double TrackBase::covBetaBeta() const
872 {
873  return covbetabeta_;
874 }
875 
876 // error on t0
877 inline double TrackBase::t0Error() const
878 {
879  return std::sqrt(covt0t0_);
880 }
881 
882 // error on beta
883 inline double TrackBase::betaError() const
884 {
885  return std::sqrt(covbetabeta_);
886 }
887 
888 // number of valid hits found
889 inline unsigned short TrackBase::numberOfValidHits() const
890 {
892 }
893 
894 // number of cases where track crossed a layer without getting a hit.
895 inline unsigned short TrackBase::numberOfLostHits() const
896 {
898 }
899 
900 // fraction of valid hits on the track
901 inline double TrackBase::validFraction() const
902 {
907 
908  if ((valid + lost + lostIn + lostOut) == 0) {
909  return -1;
910  }
911 
912  return valid / (double)(valid + lost + lostIn + lostOut);
913 }
914 
915 //Track algorithm
917 {
918  algorithm_ = a;
919  algoMask_.reset();
921 }
922 
924 {
926  algoMask_.set(a);
927 }
928 
929 
930 
931 inline int TrackBase::qualityMask() const
932 {
933  return quality_;
934 }
935 
936 inline void TrackBase::setQualityMask(int qualMask)
937 {
938  quality_ = qualMask;
939 }
940 
941 inline void TrackBase::setNLoops(signed char value)
942 {
943  nLoops_ = value;
944 }
945 
946 inline bool TrackBase::isLooper() const
947 {
948  return (nLoops_ > 0);
949 }
950 
951 inline signed char TrackBase::nLoops() const
952 {
953  return nLoops_;
954 }
955 
956 } // namespace reco
957 
958 #endif
959 
double qoverp() const
q / p
Definition: TrackBase.h:606
bool appendMuonHitPattern(const DetId &id, TrackingRecHit::Type hitType)
Definition: TrackBase.h:502
double p() const
momentum vector magnitude
Definition: TrackBase.h:648
uint8_t stopReason_
Stop Reason.
Definition: TrackBase.h:475
float chi2_
chi-squared
Definition: TrackBase.h:437
double t0() const
time at the reference point
Definition: TrackBase.h:720
void setQualityMask(int qualMask)
Definition: TrackBase.h:936
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:714
double d0Error() const
error on d0
Definition: TrackBase.h:847
void setQuality(const TrackQuality)
Definition: TrackBase.h:556
static std::string qualityName(TrackQuality)
Definition: TrackBase.h:565
unsigned int index
index type
Definition: TrackBase.h:95
bool isLooper() const
Definition: TrackBase.h:946
bool appendHits(const I &begin, const I &end, const TrackerTopology &ttopo)
Definition: HitPattern.h:535
static index covIndex(index i, index j)
covariance matrix index in array
Definition: TrackBase.h:523
uint8_t quality_
track quality
Definition: TrackBase.h:469
double validFraction() const
fraction of valid hits on the track
Definition: TrackBase.h:901
uint8_t originalAlgorithm_
track algorithm
Definition: TrackBase.h:465
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:630
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:594
TrackBase()
default constructor
Definition: TrackBase.cc:69
TrackQuality
track quality
Definition: TrackBase.h:151
double theta() const
polar angle
Definition: TrackBase.h:612
double dxyError() const
error on dxy
Definition: TrackBase.h:841
char charge_
electric charge
Definition: TrackBase.h:459
int numberOfValidHits() const
Definition: HitPattern.h:888
Point vertex_
innermost (reference) point on track
Definition: TrackBase.h:440
uint8_t stopReason() const
Definition: TrackBase.h:423
float covbetabeta_
Definition: TrackBase.h:434
double etaError() const
error on eta
Definition: TrackBase.h:829
#define M_PI_2
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:678
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:895
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:660
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:708
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:636
signed char nLoops_
number of loops made during the building of the trajectory of a looper particle
Definition: TrackBase.h:472
TrackAlgorithm
track algorithm
Definition: TrackBase.h:99
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:987
TrackAlgorithm algo() const
Definition: TrackBase.h:530
void setNLoops(signed char value)
Definition: TrackBase.h:941
void setOriginalAlgorithm(const TrackAlgorithm a)
Definition: TrackBase.h:923
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:732
double dszError() const
error on dsz
Definition: TrackBase.h:853
bool isTimeOk() const
return true if timing measurement is usable
Definition: TrackBase.h:181
double beta() const
velocity at the reference point in natural units
Definition: TrackBase.h:726
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:684
static const std::string qualityNames[]
Definition: TrackBase.h:164
void setStopReason(uint8_t value)
Definition: TrackBase.h:421
fixed size vector
Definition: Vector.h:25
bool appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
Definition: TrackBase.h:494
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:582
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:453
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:588
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:776
T sqrt(T t)
Definition: SSEVec.h:18
double pt() const
track transverse momentum
Definition: TrackBase.h:654
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:808
double phiError() const
error on phi
Definition: TrackBase.h:835
int qualityMask() const
Definition: TrackBase.h:931
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:226
double lambda() const
Lambda angle.
Definition: TrackBase.h:618
const std::complex< double > I
Definition: I.h:8
double error(int i) const
error on specified element
Definition: TrackBase.h:796
double f[11][100]
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:889
void resetHitPattern()
Sets HitPattern as empty.
Definition: TrackBase.h:506
#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:385
bool appendTrackerHit(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
Definition: HitPattern.cc:304
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:672
double parameter(int i) const
i-th parameter ( i = 0, ... 4 )
Definition: TrackBase.h:784
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:802
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:642
double dzError() const
error on dz
Definition: TrackBase.h:859
bool isAlgoInMask(TrackAlgorithm a) const
Definition: TrackBase.h:389
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:702
Definition: DetId.h:18
TrackAlgorithm originalAlgo() const
Definition: TrackBase.h:534
double covBetaBeta() const
error on beta
Definition: TrackBase.h:871
std::bitset< algoSize > AlgoMask
algo mask
Definition: TrackBase.h:146
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:134
float covt0t0_
errors for time and velocity (separate from cov for now)
Definition: TrackBase.h:434
AlgoMask algoMask() const
Definition: TrackBase.h:387
virtual ~TrackBase()
virtual destructor
Definition: TrackBase.cc:124
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:479
signed char nLoops() const
Definition: TrackBase.h:951
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:541
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:456
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:148
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:543
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:982
int numberOfValidTrackerHits() const
Definition: HitPattern.h:893
void setAlgorithm(const TrackAlgorithm a)
Track algorithm.
Definition: TrackBase.h:916
double covt0t0() const
error on t0
Definition: TrackBase.h:865
ParameterVector parameters() const
Track parameters with one-to-one correspondence to the covariance matrix.
Definition: TrackBase.h:770
double lambdaError() const
error on lambda
Definition: TrackBase.h:823
float t0_
time at the reference point on track
Definition: TrackBase.h:443
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:696
fixed size matrix
float covariance_[covarianceSize]
perigee 5x5 covariance matrix
Definition: TrackBase.h:431
#define begin
Definition: vmac.h:32
HitPattern hitPattern_
hit pattern
Definition: TrackBase.h:428
double a
Definition: hdecay.h:121
CovarianceMatrix & fill(CovarianceMatrix &v) const
fill SMatrix
Definition: TrackBase.cc:129
double betaError() const
error on beta
Definition: TrackBase.h:883
static TrackAlgorithm algoByName(const std::string &name)
Definition: TrackBase.cc:146
Vector momentum_
momentum vector at innermost point
Definition: TrackBase.h:446
int charge() const
track electric charge
Definition: TrackBase.h:600
const Point & position() const
position
Definition: BeamSpot.h:62
unsigned long long algoMaskUL() const
Definition: TrackBase.h:388
uint8_t algorithm_
track algorithm
Definition: TrackBase.h:462
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:624
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:518
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:666
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:690
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackBase.h:77
double thetaError() const
error on theta
Definition: TrackBase.h:817
double t0Error() const
error on t0
Definition: TrackBase.h:877
bool appendMuonHit(const DetId &id, TrackingRecHit::Type hitType)
Definition: HitPattern.cc:308