CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorBase.h"
00002 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00003 #include "DataFormats/GeometrySurface/interface/BoundPlane.h"
00004 
00005 bool Chi2MeasurementEstimatorBase::estimate( const TrajectoryStateOnSurface& ts, 
00006                                              const BoundPlane& plane) const
00007 {
00008   if ( ts.hasError()) {
00009     return plane.bounds().inside( ts.localPosition(), 
00010                                   ts.localError().positionError(),
00011                                   nSigmaCut());
00012   }
00013   else return plane.bounds().inside(ts.localPosition());
00014 }
00015 
00016 MeasurementEstimator::Local2DVector 
00017 Chi2MeasurementEstimatorBase::maximalLocalDisplacement( const TrajectoryStateOnSurface& ts,
00018                                                         const BoundPlane& plane) const
00019 {
00020   if ( ts.hasError()) {
00021     LocalError le = ts.localError().positionError();
00022     return Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut());
00023   }
00024   else return Local2DVector(0,0);
00025 }