CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Chi2MeasurementEstimatorBase.h
Go to the documentation of this file.
1 #ifndef CommonDet_Chi2MeasurementEstimatorBase_H
2 #define CommonDet_Chi2MeasurementEstimatorBase_H
3 
12 #include<limits>
13 
15 public:
16 
22  explicit Chi2MeasurementEstimatorBase(double maxChi2, double nSigma = 3., float maxDisp=std::numeric_limits<float>::max()) :
23  theMaxChi2(maxChi2), theNSigma(nSigma), theMaxDisplacement(maxDisp) {}
24 
25  Chi2MeasurementEstimatorBase(double maxChi2, double nSigma, float maxDisp,
26  float maxSag, float minToll) :
27  MeasurementEstimator(maxSag,minToll),
28  theMaxChi2(maxChi2), theNSigma(nSigma), theMaxDisplacement(maxDisp) {}
29 
30 
31  virtual std::pair<bool, double> estimate(const TrajectoryStateOnSurface& ts,
32  const TrackingRecHit &) const = 0;
33 
34  virtual bool estimate( const TrajectoryStateOnSurface& ts,
35  const Plane& plane) const final;
36 
37  virtual Local2DVector
39  const Plane& plane) const final;
40 
41  double chiSquaredCut() const {return theMaxChi2;}
42  double nSigmaCut() const {return theNSigma;}
43 
44 protected:
45 
46  std::pair<bool,double> returnIt( double est) const {
47  return est > chiSquaredCut() ? HitReturnType(false,est) : HitReturnType(true,est);
48  }
49 
50 private:
51  const double theMaxChi2;
52  const double theNSigma;
53  const float theMaxDisplacement;
54 };
55 
56 #endif
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma, float maxDisp, float maxSag, float minToll)
std::pair< bool, double > returnIt(double est) const
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const =0
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const final
Definition: Plane.h:17
std::pair< bool, double > HitReturnType