CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackExtra.h
Go to the documentation of this file.
1 #ifndef TrackReco_TrackExtra_h
2 #define TrackReco_TrackExtra_h
3 
14 #include <Rtypes.h>
23 
24 namespace reco
25 {
26 class TrackExtra : public TrackExtraBase
27 {
28 public:
30  enum { dimension = 5 };
32  enum { covarianceSize = dimension * (dimension + 1) / 2 };
40  typedef unsigned int index;
41 
45  outerOk_(false),
46  outerDetId_(0),
49  innerOk_(false),
50  innerDetId_(0),
52  seedRef_(),
53  trackResiduals_() {
54  index idx = 0;
55  for (index i = 0; i < dimension; ++ i) {
56  for (index j = 0; j <= i; ++ j) {
57  outerCovariance_[idx] = 0;
58  innerCovariance_[idx] = 0;
59  ++idx;
60  }
61  }
62  }
63 
65  TrackExtra(const Point & outerPosition, const Vector & outerMomentum, bool ok ,
66  const Point & innerPosition, const Vector & innerMomentum, bool iok,
67  const CovarianceMatrix& outerState, unsigned int outerId,
68  const CovarianceMatrix& innerState, unsigned int innerId,
69  PropagationDirection seedDir,
71 
73  const Point &outerPosition() const {
74  return outerPosition_;
75  }
77  const Vector &outerMomentum() const {
78  return outerMomentum_;
79  }
81  bool outerOk() const {
82  return outerOk_;
83  }
85  const Point &innerPosition() const {
86  return innerPosition_;
87  }
89  const Vector &innerMomentum() const {
90  return innerMomentum_;
91  }
93  bool innerOk() const {
94  return innerOk_;
95  }
97  double outerPx() const {
98  return outerMomentum_.X();
99  }
101  double outerPy() const {
102  return outerMomentum_.Y();
103  }
105  double outerPz() const {
106  return outerMomentum_.Z();
107  }
109  double outerX() const {
110  return outerPosition_.X();
111  }
113  double outerY() const {
114  return outerPosition_.Y();
115  }
117  double outerZ() const {
118  return outerPosition_.Z();
119  }
121  double outerP() const {
122  return outerMomentum().R();
123  }
125  double outerPt() const {
126  return outerMomentum().Rho();
127  }
129  double outerPhi() const {
130  return outerMomentum().Phi();
131  }
133  double outerEta() const {
134  return outerMomentum().Eta();
135  }
137  double outerTheta() const {
138  return outerMomentum().Theta();
139  }
141  double outerRadius() const {
142  return outerPosition().Rho();
143  }
144 
146  CovarianceMatrix outerStateCovariance() const;
148  CovarianceMatrix innerStateCovariance() const;
150  CovarianceMatrix & fillOuter CMS_THREAD_SAFE (CovarianceMatrix &v) const;
152  CovarianceMatrix & fillInner CMS_THREAD_SAFE (CovarianceMatrix &v) const;
154  unsigned int outerDetId() const {
155  return outerDetId_;
156  }
158  unsigned int innerDetId() const {
159  return innerDetId_;
160  }
161  // direction how the hits were sorted in the original seed
163  return seedDir_;
164  }
165 
172  return seedRef_;
173  }
175  seedRef_ = r;
176  }
179  trackResiduals_ = r;
180  }
181 
183  const TrackResiduals &residuals() const {
184  return trackResiduals_;
185  }
186 
187 private:
188 
194  bool outerOk_;
197  unsigned int outerDetId_;
198 
199 
205  bool innerOk_;
208  unsigned int innerDetId_;
209 
212 
215 };
216 
217 }
218 
219 #endif
220 
bool innerOk_
innermost hit validity flag
Definition: TrackExtra.h:205
double outerPz() const
z coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:105
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:192
int i
Definition: DBlmapReader.cc:9
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: TrackExtra.h:171
math::XYZVector Vector
spatial vector
Definition: TrackExtra.h:36
double outerTheta() const
polar angle of the momentum vector at the outermost hit position
Definition: TrackExtra.h:137
math::Error< 5 >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackExtra.h:38
double outerPt() const
transverse momentum at the outermost hit position
Definition: TrackExtra.h:125
double outerRadius() const
polar radius of the outermost hit position
Definition: TrackExtra.h:141
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: TrackExtra.h:158
bool outerOk_
outermost hit validity flag
Definition: TrackExtra.h:194
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:77
ErrorD< N >::type type
Definition: Error.h:39
void setSeedRef(edm::RefToBase< TrajectorySeed > &r)
Definition: TrackExtra.h:174
const TrackResiduals & residuals() const
get the residuals
Definition: TrackExtra.h:183
PropagationDirection
double outerX() const
x coordinate the outermost hit position
Definition: TrackExtra.h:109
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:196
math::XYZPoint Point
point in the space
Definition: TrackExtra.h:34
double outerP() const
magnitude of momentum vector at the outermost hit position
Definition: TrackExtra.h:121
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:35
TrackResiduals trackResiduals_
unbiased track residuals
Definition: TrackExtra.h:214
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:211
int j
Definition: DBlmapReader.cc:9
const Vector & innerMomentum() const
momentum vector at innermost hit position
Definition: TrackExtra.h:89
double outerPy() const
y coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:101
unsigned int index
index type
Definition: TrackExtra.h:40
unsigned int outerDetId_
Definition: TrackExtra.h:197
Vector innerMomentum_
momentum vector at innermost hit position
Definition: TrackExtra.h:203
const Point & innerPosition() const
innermost hit position
Definition: TrackExtra.h:85
unsigned int innerDetId_
Definition: TrackExtra.h:208
double outerZ() const
z coordinate the outermost hit position
Definition: TrackExtra.h:117
CovarianceMatrix & fillInner(CovarianceMatrix &v) const
fill outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:54
TrackExtra()
default constructor
Definition: TrackExtra.h:43
double outerPhi() const
azimuthal angle of the momentum vector at the outermost hit position
Definition: TrackExtra.h:129
PropagationDirection seedDirection() const
Definition: TrackExtra.h:162
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
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
Point innerPosition_
innermost hit position
Definition: TrackExtra.h:201
bool innerOk() const
returns true if the innermost hit is valid
Definition: TrackExtra.h:93
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
Definition: TrackExtra.cc:42
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:190
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:207
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: TrackExtra.h:154
double outerPx() const
x coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:97
double outerY() const
y coordinate the outermost hit position
Definition: TrackExtra.h:113
volatile std::atomic< bool > shutdown_flag false
bool outerOk() const
returns true if the outermost hit is valid
Definition: TrackExtra.h:81
#define CMS_THREAD_SAFE
double outerEta() const
pseudorapidity the momentum vector at the outermost hit position
Definition: TrackExtra.h:133
const Point & outerPosition() const
outermost hit position
Definition: TrackExtra.h:73
PropagationDirection seedDir_
Definition: TrackExtra.h:210
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:178