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