File indexing completed on 2024-06-18 02:20:06
0001 #ifndef TrackReco_Track_h
0002 #define TrackReco_Track_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "DataFormats/TrackReco/interface/TrackBase.h"
0020 #include "DataFormats/TrackReco/interface/TrackExtra.h"
0021 #include "DataFormats/TrackReco/interface/TrackExtraFwd.h"
0022 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
0023 #include "FWCore/Utilities/interface/thread_safety_macros.h"
0024
0025 namespace reco {
0026
0027 class Track : public TrackBase {
0028 public:
0029
0030 Track() {}
0031
0032
0033 ~Track() override;
0034
0035
0036 Track(double chi2,
0037 double ndof,
0038 const Point& referencePoint,
0039 const Vector& momentum,
0040 int charge,
0041 const CovarianceMatrix&,
0042 TrackAlgorithm = undefAlgorithm,
0043 TrackQuality quality = undefQuality,
0044 float t0 = 0,
0045 float beta = 0,
0046 float covt0t0 = -1.,
0047 float covbetabeta = -1.);
0048
0049
0050 bool outerOk() const { return extra_.isNonnull() && extra_.isAvailable() && extra_->outerOk(); }
0051
0052
0053 bool innerOk() const { return extra_.isNonnull() && extra_.isAvailable() && extra_->innerOk(); }
0054
0055
0056 const math::XYZPoint& innerPosition() const { return extra_->innerPosition(); }
0057
0058
0059 const math::XYZVector& innerMomentum() const { return extra_->innerMomentum(); }
0060
0061
0062 const math::XYZPoint& outerPosition() const { return extra_->outerPosition(); }
0063
0064
0065 const math::XYZVector& outerMomentum() const { return extra_->outerMomentum(); }
0066
0067
0068 CovarianceMatrix outerStateCovariance() const { return extra_->outerStateCovariance(); }
0069
0070
0071 CovarianceMatrix innerStateCovariance() const { return extra_->innerStateCovariance(); }
0072
0073
0074 CovarianceMatrix& fillOuter CMS_THREAD_SAFE(CovarianceMatrix& v) const { return extra_->fillOuter(v); }
0075
0076 CovarianceMatrix& fillInner CMS_THREAD_SAFE(CovarianceMatrix& v) const { return extra_->fillInner(v); }
0077
0078
0079 unsigned int outerDetId() const { return extra_->outerDetId(); }
0080
0081
0082 unsigned int innerDetId() const { return extra_->innerDetId(); }
0083
0084
0085 auto recHits() const { return extra_->recHits(); }
0086
0087
0088 trackingRecHit_iterator recHitsBegin() const { return extra_->recHitsBegin(); }
0089
0090
0091 trackingRecHit_iterator recHitsEnd() const { return extra_->recHitsEnd(); }
0092
0093
0094 TrackingRecHitRef recHit(size_t i) const { return extra_->recHit(i); }
0095
0096
0097 size_t recHitsSize() const { return extra_->recHitsSize(); }
0098
0099
0100 double outerPx() const { return extra_->outerPx(); }
0101
0102
0103 double outerPy() const { return extra_->outerPy(); }
0104
0105
0106 double outerPz() const { return extra_->outerPz(); }
0107
0108
0109 double outerX() const { return extra_->outerX(); }
0110
0111
0112 double outerY() const { return extra_->outerY(); }
0113
0114
0115 double outerZ() const { return extra_->outerZ(); }
0116
0117
0118 double outerP() const { return extra_->outerP(); }
0119
0120
0121 double outerPt() const { return extra_->outerPt(); }
0122
0123
0124 double outerPhi() const { return extra_->outerPhi(); }
0125
0126
0127 double outerEta() const { return extra_->outerEta(); }
0128
0129
0130 double outerTheta() const { return extra_->outerTheta(); }
0131
0132
0133 double outerRadius() const { return extra_->outerRadius(); }
0134
0135
0136 void setExtra(const TrackExtraRef& ref) { extra_ = ref; }
0137
0138
0139 const TrackExtraRef& extra() const { return extra_; }
0140
0141
0142 unsigned short found() const { return numberOfValidHits(); }
0143
0144
0145 unsigned short lost() const { return numberOfLostHits(); }
0146
0147
0148 const PropagationDirection& seedDirection() const { return extra_->seedDirection(); }
0149
0150
0151
0152
0153
0154
0155 const edm::RefToBase<TrajectorySeed>& seedRef() const { return extra_->seedRef(); }
0156
0157
0158 const TrackResiduals& residuals() const { return extra_->residuals(); }
0159
0160
0161 bool recHitsOk() const { return extra_.isNonnull() && extra_.isAvailable() && extra_->recHitsOk(); }
0162
0163 private:
0164
0165 TrackExtraRef extra_;
0166 };
0167
0168 }
0169
0170 #endif