CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Chi2MeasurementEstimatorForTrackerHits.cc
Go to the documentation of this file.
6 
7 std::pair<bool,double>
8 Chi2MeasurementEstimatorForTrackerHits::estimate(
9  const TrajectoryStateOnSurface& tsos,
10  const TransientTrackingRecHit& aRecHit) const {
11  if (!cacheUpToDate_) {
12  AlgebraicVector5 par5 = tsos.localParameters().vector();
13  tsosMeasuredParameters_[0] = par5[3];
14  tsosMeasuredParameters_[1] = par5[4];
15  const AlgebraicSymMatrix55 &err5 = tsos.localError().matrix();
16  tsosMeasuredError_ = err5.Sub<AlgebraicSymMatrix22>(3,3);
17  cacheUpToDate_ = true;
18  }
19  AlgebraicVector2 r = asSVector<2>(aRecHit.parameters()) - tsosMeasuredParameters_;
20  AlgebraicSymMatrix22 R = asSMatrix<2>(aRecHit.parametersError()) + tsosMeasuredError_;
22  return returnIt( ROOT::Math::Similarity(r, R) );
23 }
24 
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
const LocalTrajectoryParameters & localParameters() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
virtual AlgebraicVector parameters() const =0
AlgebraicVector5 vector() const
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
ROOT::Math::SVector< double, 2 > AlgebraicVector2
virtual AlgebraicSymMatrix parametersError() const =0