CMS 3D CMS Logo

MeasurementEstimator.h
Go to the documentation of this file.
1 #ifndef Tracker_MeasurementEstimator_H
2 #define Tracker_MeasurementEstimator_H
3 
6 #include<limits>
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, float mpt) :
30  m_maxSagitta(maxSag),
31  m_minTolerance2(minToll*minToll),
33  {}
34 
35  virtual ~MeasurementEstimator() {}
36 
37  using HitReturnType = std::pair<bool,double>;
38  using SurfaceReturnType = bool;
39 
47  const TrackingRecHit& hit) const = 0;
48 
49  /* verify the compatibility of the Hit with the Trajectory based
50  * on hit properties other than those used in estimate
51  * (that usually computes the compatibility of the Trajectory with the Hit)
52  *
53  */
54  virtual bool preFilter(const TrajectoryStateOnSurface&, OpaquePayload const &) const { return true;}
55 
56 
62  const Plane& plane) const = 0;
63 
64  virtual MeasurementEstimator* clone() const = 0;
65 
74  virtual Local2DVector
76  const Plane& plane) const=0;
77 
78  float maxSagitta() const { return m_maxSagitta;}
79  float minTolerance2() const { return m_minTolerance2;}
81 
82 private:
83  /*
84  * why here?
85  * MeasurementEstimator is the only configurable item that percolates down to geometry event by event (actually hit by hit) and not at initialization time
86  * It is therefore the natural candidate to collect all parameters that affect pattern-recongnition
87  * and require to be controlled with higher granularity than job level (such as iteration by iteration)
88  */
89  float m_maxSagitta=-1.; // maximal sagitta for linear approximation
90  float m_minTolerance2=100.; // square of minimum tolerance ot be considered inside a detector
91  float m_minPt2ForHitRecoveryInGluedDet=std::numeric_limits<float>::max(); // 0.81 to mitigate wrong preAmpl setting
92 };
93 
94 #endif // Tracker_MeasurementEstimator_H
float minTolerance2() const
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
float minPt2ForHitRecoveryInGluedDet() const
Definition: Plane.h:17
MeasurementEstimator(float maxSag, float minToll, float mpt)
virtual MeasurementEstimator * clone() const =0
std::pair< bool, double > HitReturnType
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0