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