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