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 {
27 class TrackExtra : public TrackExtraBase
28 {
29 public:
31  enum { dimension = 5 };
33  enum { covarianceSize = dimension * (dimension + 1) / 2 };
41  typedef unsigned int index;
42 
46  outerOk_(false),
47  outerDetId_(0),
50  innerOk_(false),
51  innerDetId_(0),
53  seedRef_() {
54  for (index i = 0; i < covarianceSize; ++i) {
55  outerCovariance_[i] = 0;
56  innerCovariance_[i] = 0;
57  }
58  }
59 
61  TrackExtra(const Point & outerPosition, const Vector & outerMomentum, bool ok ,
62  const Point & innerPosition, const Vector & innerMomentum, bool iok,
63  const CovarianceMatrix& outerState, unsigned int outerId,
64  const CovarianceMatrix& innerState, unsigned int innerId,
65  PropagationDirection seedDir,
67 
69  const Point &outerPosition() const {
70  return outerPosition_;
71  }
73  const Vector &outerMomentum() const {
74  return outerMomentum_;
75  }
77  bool outerOk() const {
78  return outerOk_;
79  }
81  const Point &innerPosition() const {
82  return innerPosition_;
83  }
85  const Vector &innerMomentum() const {
86  return innerMomentum_;
87  }
89  bool innerOk() const {
90  return innerOk_;
91  }
93  double outerPx() const {
94  return outerMomentum_.X();
95  }
97  double outerPy() const {
98  return outerMomentum_.Y();
99  }
101  double outerPz() const {
102  return outerMomentum_.Z();
103  }
105  double outerX() const {
106  return outerPosition_.X();
107  }
109  double outerY() const {
110  return outerPosition_.Y();
111  }
113  double outerZ() const {
114  return outerPosition_.Z();
115  }
117  double outerP() const {
118  return outerMomentum().R();
119  }
121  double outerPt() const {
122  return outerMomentum().Rho();
123  }
125  double outerPhi() const {
126  return outerMomentum().Phi();
127  }
129  double outerEta() const {
130  return outerMomentum().Eta();
131  }
133  double outerTheta() const {
134  return outerMomentum().Theta();
135  }
137  double outerRadius() const {
138  return outerPosition().Rho();
139  }
140 
142  CovarianceMatrix outerStateCovariance() const;
144  CovarianceMatrix innerStateCovariance() const;
146  CovarianceMatrix & fillOuter CMS_THREAD_SAFE (CovarianceMatrix &v) const;
148  CovarianceMatrix & fillInner CMS_THREAD_SAFE (CovarianceMatrix &v) const;
150  unsigned int outerDetId() const {
151  return outerDetId_;
152  }
154  unsigned int innerDetId() const {
155  return innerDetId_;
156  }
157  // direction how the hits were sorted in the original seed
159  return seedDir_;
160  }
161 
168  return seedRef_;
169  }
171  seedRef_ = r;
172  }
175  trackResiduals_ = r;
176  }
177 
179  const TrackResiduals &residuals() const {
180  return trackResiduals_;
181  }
182 
183 private:
184 
190  bool outerOk_;
193  unsigned int outerDetId_;
194 
195 
201  bool innerOk_;
204  unsigned int innerDetId_;
205 
208 
211 };
212 
213 }
214 
215 #endif
216 
bool innerOk_
innermost hit validity flag
Definition: TrackExtra.h:201
double outerPz() const
z coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:101
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:188
math::XYZVector Vector
spatial vector
Definition: TrackExtra.h:37
void setSeedRef(const edm::RefToBase< TrajectorySeed > &r)
Definition: TrackExtra.h:170
double outerTheta() const
polar angle of the momentum vector at the outermost hit position
Definition: TrackExtra.h:133
math::Error< 5 >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackExtra.h:39
double outerPt() const
transverse momentum at the outermost hit position
Definition: TrackExtra.h:121
double outerRadius() const
polar radius of the outermost hit position
Definition: TrackExtra.h:137
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: TrackExtra.h:154
bool outerOk_
outermost hit validity flag
Definition: TrackExtra.h:190
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:73
ErrorD< N >::type type
Definition: Error.h:33
const TrackResiduals & residuals() const
get the residuals
Definition: TrackExtra.h:179
PropagationDirection
double outerX() const
x coordinate the outermost hit position
Definition: TrackExtra.h:105
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:192
math::XYZPoint Point
point in the space
Definition: TrackExtra.h:35
const edm::RefToBase< TrajectorySeed > & seedRef() const
Definition: TrackExtra.h:167
double outerP() const
magnitude of momentum vector at the outermost hit position
Definition: TrackExtra.h:117
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:35
TrackResiduals trackResiduals_
unbiased track residuals
Definition: TrackExtra.h:210
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:207
const Vector & innerMomentum() const
momentum vector at innermost hit position
Definition: TrackExtra.h:85
double outerPy() const
y coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:97
unsigned int index
index type
Definition: TrackExtra.h:41
#define CMS_THREAD_SAFE
unsigned int outerDetId_
Definition: TrackExtra.h:193
Vector innerMomentum_
momentum vector at innermost hit position
Definition: TrackExtra.h:199
const Point & innerPosition() const
innermost hit position
Definition: TrackExtra.h:81
unsigned int innerDetId_
Definition: TrackExtra.h:204
double outerZ() const
z coordinate the outermost hit position
Definition: TrackExtra.h:113
CovarianceMatrix & fillInner(CovarianceMatrix &v) const
fill outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:54
TrackExtra()
default constructor
Definition: TrackExtra.h:44
double outerPhi() const
azimuthal angle of the momentum vector at the outermost hit position
Definition: TrackExtra.h:125
const PropagationDirection & seedDirection() const
Definition: TrackExtra.h:158
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
Point innerPosition_
innermost hit position
Definition: TrackExtra.h:197
bool innerOk() const
returns true if the innermost hit is valid
Definition: TrackExtra.h:89
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
Definition: TrackExtra.cc:42
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:186
fixed size matrix
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:203
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: TrackExtra.h:150
double outerPx() const
x coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:93
double outerY() const
y coordinate the outermost hit position
Definition: TrackExtra.h:109
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:129
const Point & outerPosition() const
outermost hit position
Definition: TrackExtra.h:69
PropagationDirection seedDir_
Definition: TrackExtra.h:206
CovarianceMatrix & fillOuter(CovarianceMatrix &v) const
fill outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:49
void setResiduals(const TrackResiduals &r)
set the residuals
Definition: TrackExtra.h:174