CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/TrackingTools/KalmanUpdators/src/Chi2Strip1DEstimator.cc

Go to the documentation of this file.
00001 #include "TrackingTools/KalmanUpdators/interface/Chi2Strip1DEstimator.h"
00002 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00003 #include "Geometry/CommonTopologies/interface/StripTopology.h"
00004 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00005 
00006 using namespace std;
00007 
00008 pair<bool,double>
00009 Chi2Strip1DEstimator::estimate(const TrajectoryStateOnSurface& state,
00010                                const TransientTrackingRecHit& hit) const {
00011 
00012   if(//hit.isMatched() || 
00013      hit.detUnit()->type().isTrackerPixel() 
00014      ) return HitReturnType(false,0.);
00015   
00016  
00017   const StripTopology* topology = 
00018     dynamic_cast<const StripTopology*>(&(hit.detUnit()->topology())); 
00019   
00020   double m = topology->measurementPosition(hit.localPosition()).x();
00021   
00022   double x = topology->measurementPosition(state.localPosition()).x();
00023   
00024   double V =
00025     topology->measurementError(hit.localPosition(),
00026                                hit.localPositionError()).uu();
00027   double C = 
00028     topology->measurementError(state.localPosition(),
00029                                state.localError().positionError()).uu();
00030   double r = m - x;
00031   double R = V + C;
00032 
00033   double est = r*r/R;
00034 
00035   return returnIt(est);
00036 }
00037