CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeasurementEstimator.h
Go to the documentation of this file.
1 #ifndef Tracker_MeasurementEstimator_H
2 #define Tracker_MeasurementEstimator_H
3 
6 #include <utility>
7 
8 class Plane;
10 class Surface;
11 class TrackingRecHit;
12 
21 public:
22 
23  struct OpaquePayload { virtual ~OpaquePayload(){} int tag=0;};
24 
26 
27 
29  MeasurementEstimator(float maxSag, float minToll) :
30  m_maxSagitta(maxSag),
31  m_minTolerance2(minToll*minToll){}
32 
33  virtual ~MeasurementEstimator() {}
34 
35  using HitReturnType = std::pair<bool,double>;
36  using SurfaceReturnType = bool;
37 
45  const TrackingRecHit& hit) const = 0;
46 
47  /* verify the compatibility of the Hit with the Trajectory based
48  * on hit properties other than those used in estimate
49  * (that usually computes the compatibility of the Trajectory with the Hit)
50  *
51  */
52  virtual bool preFilter(const TrajectoryStateOnSurface&, OpaquePayload const &) const { return true;}
53 
54 
60  const Plane& plane) const = 0;
61 
62  virtual MeasurementEstimator* clone() const = 0;
63 
72  virtual Local2DVector
74  const Plane& plane) const=0;
75 
76  float maxSagitta() const { return m_maxSagitta;}
77  float minTolerance2() const { return m_minTolerance2;}
78 
79 
80 private:
81  float m_maxSagitta=-1.; // maximal sagitta for linear approximation
82  float m_minTolerance2=100.; // square of minimum tolerance ot be considered inside a detector
83 
84 };
85 
86 #endif // Tracker_MeasurementEstimator_H
float minTolerance2() const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
Definition: Plane.h:17
virtual MeasurementEstimator * clone() const =0
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
std::pair< bool, double > HitReturnType
MeasurementEstimator(float maxSag, float minToll)