CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorBase.h

Go to the documentation of this file.
00001 #ifndef CommonDet_Chi2MeasurementEstimatorBase_H
00002 #define CommonDet_Chi2MeasurementEstimatorBase_H
00003 
00013 #include "TrackingTools/PatternTools/interface/MeasurementEstimator.h"
00014 
00015 class Chi2MeasurementEstimatorBase : public MeasurementEstimator {
00016 public:
00017 
00023   explicit Chi2MeasurementEstimatorBase(double maxChi2, double nSigma = 3.) : 
00024     theMaxChi2(maxChi2), theNSigma(nSigma) {}
00025 
00026   virtual std::pair<bool, double> estimate(const TrajectoryStateOnSurface& ts,
00027                                            const TransientTrackingRecHit &) const = 0;
00028 
00029   virtual bool estimate( const TrajectoryStateOnSurface& ts, 
00030                          const BoundPlane& plane) const;
00031 
00032   virtual Local2DVector 
00033   maximalLocalDisplacement( const TrajectoryStateOnSurface& ts,
00034                             const BoundPlane& plane) const;
00035 
00036   double chiSquaredCut() const {return theMaxChi2;}
00037   double nSigmaCut() const {return theNSigma;}
00038 
00039 protected:
00040 
00041   std::pair<bool,double> returnIt( double est) const {
00042     return est > chiSquaredCut() ? HitReturnType(false,est) : HitReturnType(true,est);
00043   }
00044 
00045 private:
00046   double theMaxChi2;
00047   double theNSigma;
00048 };
00049 
00050 #endif