CMS 3D CMS Logo

Chi2MeasurementEstimatorForTrackerHits.cc

Go to the documentation of this file.
00001 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00002 #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorForTrackerHits.h"
00003 #include "TrackingTools/PatternTools/interface/MeasurementExtractor.h"
00004 #include "DataFormats/GeometrySurface/interface/BoundPlane.h"
00005 
00006 std::pair<bool,double> 
00007 Chi2MeasurementEstimatorForTrackerHits::estimate(
00008         const TrajectoryStateOnSurface& tsos,
00009         const TransientTrackingRecHit& aRecHit) const {
00010         if (!cacheUpToDate_) {
00011                 AlgebraicVector5 par5 = tsos.localParameters().vector();
00012                 tsosMeasuredParameters_[0] = par5[3]; 
00013                 tsosMeasuredParameters_[1] = par5[4]; 
00014                 const AlgebraicSymMatrix55 &err5 = tsos.localError().matrix();
00015                 tsosMeasuredError_ = err5.Sub<AlgebraicSymMatrix22>(3,3);
00016                 cacheUpToDate_ = true;
00017         }
00018         AlgebraicVector2     r = asSVector<2>(aRecHit.parameters())      - tsosMeasuredParameters_;
00019         AlgebraicSymMatrix22 R = asSMatrix<2>(aRecHit.parametersError()) + tsosMeasuredError_;
00020         R.Invert();
00021         return returnIt( ROOT::Math::Similarity(r, R) );
00022 }
00023 

Generated on Tue Jun 9 17:48:22 2009 for CMSSW by  doxygen 1.5.4