CMS 3D CMS Logo

TrackExtra.h
Go to the documentation of this file.
1 #ifndef TrackReco_TrackExtra_h
2 #define TrackReco_TrackExtra_h
3 
14 #include <Rtypes.h>
24 
25 namespace reco {
26  class TrackExtra : public TrackExtraBase {
27  public:
29  enum { dimension = 5 };
31  enum { covarianceSize = dimension * (dimension + 1) / 2 };
39  typedef unsigned int index;
40 
43  : outerMomentum_(),
44  outerOk_(false),
45  outerDetId_(0),
48  innerOk_(false),
49  innerDetId_(0),
51  seedRef_() {
52  for (index i = 0; i < covarianceSize; ++i) {
53  outerCovariance_[i] = 0;
54  innerCovariance_[i] = 0;
55  }
56  }
57 
59  TrackExtra(const Point &outerPosition,
60  const Vector &outerMomentum,
61  bool ok,
62  const Point &innerPosition,
63  const Vector &innerMomentum,
64  bool iok,
65  const CovarianceMatrix &outerState,
66  unsigned int outerId,
67  const CovarianceMatrix &innerState,
68  unsigned int innerId,
69  PropagationDirection seedDir,
71 
73  const Point &outerPosition() const { return outerPosition_; }
75  const Vector &outerMomentum() const { return outerMomentum_; }
77  bool outerOk() const { return outerOk_; }
79  const Point &innerPosition() const { return innerPosition_; }
81  const Vector &innerMomentum() const { return innerMomentum_; }
83  bool innerOk() const { return innerOk_; }
85  double outerPx() const { return outerMomentum_.X(); }
87  double outerPy() const { return outerMomentum_.Y(); }
89  double outerPz() const { return outerMomentum_.Z(); }
91  double outerX() const { return outerPosition_.X(); }
93  double outerY() const { return outerPosition_.Y(); }
95  double outerZ() const { return outerPosition_.Z(); }
97  double outerP() const { return outerMomentum().R(); }
99  double outerPt() const { return outerMomentum().Rho(); }
101  double outerPhi() const { return outerMomentum().Phi(); }
103  double outerEta() const { return outerMomentum().Eta(); }
105  double outerTheta() const { return outerMomentum().Theta(); }
107  double outerRadius() const { return outerPosition().Rho(); }
108 
110  CovarianceMatrix outerStateCovariance() const;
112  CovarianceMatrix innerStateCovariance() const;
114  CovarianceMatrix &fillOuter CMS_THREAD_SAFE(CovarianceMatrix &v) const;
116  CovarianceMatrix &fillInner CMS_THREAD_SAFE(CovarianceMatrix &v) const;
118  unsigned int outerDetId() const { return outerDetId_; }
120  unsigned int innerDetId() const { return innerDetId_; }
121  // direction how the hits were sorted in the original seed
122  const PropagationDirection &seedDirection() const { return seedDir_; }
123 
133 
135  const TrackResiduals &residuals() const { return trackResiduals_; }
136 
137  private:
143  bool outerOk_;
146  unsigned int outerDetId_;
147 
153  bool innerOk_;
156  unsigned int innerDetId_;
157 
160 
163  };
164 
165 } // namespace reco
166 
167 #endif
bool innerOk_
innermost hit validity flag
Definition: TrackExtra.h:153
double outerPz() const
z coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:89
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:141
math::XYZVector Vector
spatial vector
Definition: TrackExtra.h:35
void setSeedRef(const edm::RefToBase< TrajectorySeed > &r)
Definition: TrackExtra.h:130
double outerTheta() const
polar angle of the momentum vector at the outermost hit position
Definition: TrackExtra.h:105
math::Error< 5 >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackExtra.h:37
double outerPt() const
transverse momentum at the outermost hit position
Definition: TrackExtra.h:99
double outerRadius() const
polar radius of the outermost hit position
Definition: TrackExtra.h:107
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: TrackExtra.h:120
bool outerOk_
outermost hit validity flag
Definition: TrackExtra.h:143
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:75
ErrorD< N >::type type
Definition: Error.h:32
const TrackResiduals & residuals() const
get the residuals
Definition: TrackExtra.h:135
PropagationDirection
double outerX() const
x coordinate the outermost hit position
Definition: TrackExtra.h:91
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:145
math::XYZPoint Point
point in the space
Definition: TrackExtra.h:33
const edm::RefToBase< TrajectorySeed > & seedRef() const
Definition: TrackExtra.h:129
double outerP() const
magnitude of momentum vector at the outermost hit position
Definition: TrackExtra.h:97
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:41
TrackResiduals trackResiduals_
unbiased track residuals
Definition: TrackExtra.h:162
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:159
const Vector & innerMomentum() const
momentum vector at innermost hit position
Definition: TrackExtra.h:81
double outerPy() const
y coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:87
unsigned int index
index type
Definition: TrackExtra.h:39
#define CMS_THREAD_SAFE
unsigned int outerDetId_
Definition: TrackExtra.h:146
Vector innerMomentum_
momentum vector at innermost hit position
Definition: TrackExtra.h:151
const Point & innerPosition() const
innermost hit position
Definition: TrackExtra.h:79
unsigned int innerDetId_
Definition: TrackExtra.h:156
double outerZ() const
z coordinate the outermost hit position
Definition: TrackExtra.h:95
CovarianceMatrix & fillInner(CovarianceMatrix &v) const
fill outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:57
TrackExtra()
default constructor
Definition: TrackExtra.h:42
double outerPhi() const
azimuthal angle of the momentum vector at the outermost hit position
Definition: TrackExtra.h:101
const PropagationDirection & seedDirection() const
Definition: TrackExtra.h:122
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
Point innerPosition_
innermost hit position
Definition: TrackExtra.h:149
bool innerOk() const
returns true if the innermost hit is valid
Definition: TrackExtra.h:83
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
Definition: TrackExtra.cc:47
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:139
fixed size matrix
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:155
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: TrackExtra.h:118
double outerPx() const
x coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:85
double outerY() const
y coordinate the outermost hit position
Definition: TrackExtra.h:93
bool outerOk() const
returns true if the outermost hit is valid
Definition: TrackExtra.h:77
double outerEta() const
pseudorapidity the momentum vector at the outermost hit position
Definition: TrackExtra.h:103
const Point & outerPosition() const
outermost hit position
Definition: TrackExtra.h:73
PropagationDirection seedDir_
Definition: TrackExtra.h:158
CovarianceMatrix & fillOuter(CovarianceMatrix &v) const
fill outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:53
void setResiduals(const TrackResiduals &r)
set the residuals
Definition: TrackExtra.h:132