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>
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  trackResiduals_() {
55  index idx = 0;
56  for (index i = 0; i < dimension; ++ i) {
57  for (index j = 0; j <= i; ++ j) {
58  outerCovariance_[idx] = 0;
59  innerCovariance_[idx] = 0;
60  ++idx;
61  }
62  }
63  }
64 
66  TrackExtra(const Point & outerPosition, const Vector & outerMomentum, bool ok ,
67  const Point & innerPosition, const Vector & innerMomentum, bool iok,
68  const CovarianceMatrix& outerState, unsigned int outerId,
69  const CovarianceMatrix& innerState, unsigned int innerId,
70  PropagationDirection seedDir,
72 
74  const Point &outerPosition() const {
75  return outerPosition_;
76  }
78  const Vector &outerMomentum() const {
79  return outerMomentum_;
80  }
82  bool outerOk() const {
83  return outerOk_;
84  }
86  const Point &innerPosition() const {
87  return innerPosition_;
88  }
90  const Vector &innerMomentum() const {
91  return innerMomentum_;
92  }
94  bool innerOk() const {
95  return innerOk_;
96  }
98  double outerPx() const {
99  return outerMomentum_.X();
100  }
102  double outerPy() const {
103  return outerMomentum_.Y();
104  }
106  double outerPz() const {
107  return outerMomentum_.Z();
108  }
110  double outerX() const {
111  return outerPosition_.X();
112  }
114  double outerY() const {
115  return outerPosition_.Y();
116  }
118  double outerZ() const {
119  return outerPosition_.Z();
120  }
122  double outerP() const {
123  return outerMomentum().R();
124  }
126  double outerPt() const {
127  return outerMomentum().Rho();
128  }
130  double outerPhi() const {
131  return outerMomentum().Phi();
132  }
134  double outerEta() const {
135  return outerMomentum().Eta();
136  }
138  double outerTheta() const {
139  return outerMomentum().Theta();
140  }
142  double outerRadius() const {
143  return outerPosition().Rho();
144  }
145 
147  CovarianceMatrix outerStateCovariance() const;
149  CovarianceMatrix innerStateCovariance() const;
151  CovarianceMatrix & fillOuter CMS_THREAD_SAFE (CovarianceMatrix &v) const;
153  CovarianceMatrix & fillInner CMS_THREAD_SAFE (CovarianceMatrix &v) const;
155  unsigned int outerDetId() const {
156  return outerDetId_;
157  }
159  unsigned int innerDetId() const {
160  return innerDetId_;
161  }
162  // direction how the hits were sorted in the original seed
164  return seedDir_;
165  }
166 
173  return seedRef_;
174  }
176  seedRef_ = r;
177  }
180  trackResiduals_ = r;
181  }
182 
184  const TrackResiduals &residuals() const {
185  return trackResiduals_;
186  }
187 
188 private:
189 
195  bool outerOk_;
198  unsigned int outerDetId_;
199 
200 
206  bool innerOk_;
209  unsigned int innerDetId_;
210 
213 
216 };
217 
218 }
219 
220 #endif
221 
bool innerOk_
innermost hit validity flag
Definition: TrackExtra.h:206
double outerPz() const
z coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:106
Vector outerMomentum_
momentum vector at outermost hit position
Definition: TrackExtra.h:193
int i
Definition: DBlmapReader.cc:9
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: TrackExtra.h:172
math::XYZVector Vector
spatial vector
Definition: TrackExtra.h:37
double outerTheta() const
polar angle of the momentum vector at the outermost hit position
Definition: TrackExtra.h:138
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:126
double outerRadius() const
polar radius of the outermost hit position
Definition: TrackExtra.h:142
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: TrackExtra.h:159
bool outerOk_
outermost hit validity flag
Definition: TrackExtra.h:195
const Vector & outerMomentum() const
momentum vector at outermost hit position
Definition: TrackExtra.h:78
ErrorD< N >::type type
Definition: Error.h:39
void setSeedRef(edm::RefToBase< TrajectorySeed > &r)
Definition: TrackExtra.h:175
const TrackResiduals & residuals() const
get the residuals
Definition: TrackExtra.h:184
PropagationDirection
double outerX() const
x coordinate the outermost hit position
Definition: TrackExtra.h:110
float outerCovariance_[covarianceSize]
outermost trajectory state curvilinear errors
Definition: TrackExtra.h:197
math::XYZPoint Point
point in the space
Definition: TrackExtra.h:35
double outerP() const
magnitude of momentum vector at the outermost hit position
Definition: TrackExtra.h:122
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
Definition: TrackExtra.cc:35
TrackResiduals trackResiduals_
unbiased track residuals
Definition: TrackExtra.h:215
edm::RefToBase< TrajectorySeed > seedRef_
Definition: TrackExtra.h:212
int j
Definition: DBlmapReader.cc:9
const Vector & innerMomentum() const
momentum vector at innermost hit position
Definition: TrackExtra.h:90
double outerPy() const
y coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:102
unsigned int index
index type
Definition: TrackExtra.h:41
#define CMS_THREAD_SAFE
unsigned int outerDetId_
Definition: TrackExtra.h:198
Vector innerMomentum_
momentum vector at innermost hit position
Definition: TrackExtra.h:204
const Point & innerPosition() const
innermost hit position
Definition: TrackExtra.h:86
unsigned int innerDetId_
Definition: TrackExtra.h:209
double outerZ() const
z coordinate the outermost hit position
Definition: TrackExtra.h:118
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:130
PropagationDirection seedDirection() const
Definition: TrackExtra.h:163
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:202
bool innerOk() const
returns true if the innermost hit is valid
Definition: TrackExtra.h:94
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
Definition: TrackExtra.cc:42
Point outerPosition_
outermost hit position
Definition: TrackExtra.h:191
float innerCovariance_[covarianceSize]
innermost trajectory state
Definition: TrackExtra.h:208
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: TrackExtra.h:155
double outerPx() const
x coordinate of momentum vector at the outermost hit position
Definition: TrackExtra.h:98
double outerY() const
y coordinate the outermost hit position
Definition: TrackExtra.h:114
volatile std::atomic< bool > shutdown_flag false
bool outerOk() const
returns true if the outermost hit is valid
Definition: TrackExtra.h:82
double outerEta() const
pseudorapidity the momentum vector at the outermost hit position
Definition: TrackExtra.h:134
const Point & outerPosition() const
outermost hit position
Definition: TrackExtra.h:74
PropagationDirection seedDir_
Definition: TrackExtra.h:211
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:179