CMS 3D CMS Logo

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  template<typename... Args>
26  Chi2MeasurementEstimatorBase(double maxChi2, double nSigma, float maxDisp,
27  Args && ...args) :
29  theMaxChi2(maxChi2), theNSigma(nSigma), theMaxDisplacement(maxDisp) {}
30 
31 
32  std::pair<bool, double> estimate(const TrajectoryStateOnSurface& ts,
33  const TrackingRecHit &) const override = 0;
34 
35  bool estimate( const TrajectoryStateOnSurface& ts,
36  const Plane& plane) const final;
37 
40  const Plane& plane) const final;
41 
42  double chiSquaredCut() const {return theMaxChi2;}
43  double nSigmaCut() const {return theNSigma;}
44 
45 protected:
46 
47  std::pair<bool,double> returnIt( double est) const {
48  return est > chiSquaredCut() ? HitReturnType(false,est) : HitReturnType(true,est);
49  }
50 
51 private:
52  const double theMaxChi2;
53  const double theNSigma;
54  const float theMaxDisplacement;
55 };
56 
57 #endif
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const override=0
std::pair< bool, double > returnIt(double est) const
Definition: Plane.h:17
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma, float maxDisp, Args &&...args)
std::pair< bool, double > HitReturnType
Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const final