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 
20 public:
21  struct OpaquePayload {
22  virtual ~OpaquePayload() {}
23  int tag = 0;
24  };
25 
27 
29  MeasurementEstimator(float maxSag, float minToll, float mpt)
30  : m_maxSagitta(maxSag), m_minTolerance2(minToll * minToll), m_minPt2ForHitRecoveryInGluedDet(mpt * mpt) {}
31 
32  virtual ~MeasurementEstimator() {}
33 
34  using HitReturnType = std::pair<bool, double>;
36 
43  virtual HitReturnType estimate(const TrajectoryStateOnSurface& ts, const TrackingRecHit& hit) const = 0;
44 
45  /* verify the compatibility of the Hit with the Trajectory based
46  * on hit properties other than those used in estimate
47  * (that usually computes the compatibility of the Trajectory with the Hit)
48  *
49  */
50  virtual bool preFilter(const TrajectoryStateOnSurface&, OpaquePayload const&) const { return true; }
51 
56  virtual SurfaceReturnType estimate(const TrajectoryStateOnSurface& ts, const Plane& plane) const = 0;
57 
58  virtual MeasurementEstimator* clone() const = 0;
59 
68  virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface& ts, const Plane& plane) const = 0;
69 
70  float maxSagitta() const { return m_maxSagitta; }
71  float minTolerance2() const { return m_minTolerance2; }
73 
74 private:
75  /*
76  * why here?
77  * MeasurementEstimator is the only configurable item that percolates down to geometry event by event (actually hit by hit) and not at initialization time
78  * It is therefore the natural candidate to collect all parameters that affect pattern-recongnition
79  * and require to be controlled with higher granularity than job level (such as iteration by iteration)
80  */
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  float m_minPt2ForHitRecoveryInGluedDet = std::numeric_limits<float>::max(); // 0.81 to mitigate wrong preAmpl setting
84 };
85 
86 #endif // Tracker_MeasurementEstimator_H
MeasurementEstimator
Definition: MeasurementEstimator.h:19
electrons_cff.bool
bool
Definition: electrons_cff.py:393
MeasurementEstimator::OpaquePayload::tag
int tag
Definition: MeasurementEstimator.h:23
MeasurementEstimator::maxSagitta
float maxSagitta() const
Definition: MeasurementEstimator.h:70
MeasurementEstimator::m_minTolerance2
float m_minTolerance2
Definition: MeasurementEstimator.h:82
Surface
Definition: Surface.h:36
MeasurementEstimator::MeasurementEstimator
MeasurementEstimator(float maxSag, float minToll, float mpt)
Definition: MeasurementEstimator.h:29
MeasurementEstimator::m_maxSagitta
float m_maxSagitta
Definition: MeasurementEstimator.h:81
MeasurementEstimator::HitReturnType
std::pair< bool, double > HitReturnType
Definition: MeasurementEstimator.h:34
MeasurementEstimator::clone
virtual MeasurementEstimator * clone() const =0
MeasurementEstimator::estimate
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
MeasurementEstimator::preFilter
virtual bool preFilter(const TrajectoryStateOnSurface &, OpaquePayload const &) const
Definition: MeasurementEstimator.h:50
MeasurementEstimator::minPt2ForHitRecoveryInGluedDet
float minPt2ForHitRecoveryInGluedDet() const
Definition: MeasurementEstimator.h:72
LocalTag.h
Vector2DBase
Definition: Vector2DBase.h:8
Vector2DBase.h
MeasurementEstimator::minTolerance2
float minTolerance2() const
Definition: MeasurementEstimator.h:71
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
MeasurementEstimator::OpaquePayload
Definition: MeasurementEstimator.h:21
MeasurementEstimator::OpaquePayload::~OpaquePayload
virtual ~OpaquePayload()
Definition: MeasurementEstimator.h:22
TrackingRecHit
Definition: TrackingRecHit.h:21
MeasurementEstimator::MeasurementEstimator
MeasurementEstimator()
Definition: MeasurementEstimator.h:28
MeasurementEstimator::~MeasurementEstimator
virtual ~MeasurementEstimator()
Definition: MeasurementEstimator.h:32
Plane
Definition: Plane.h:16
MeasurementEstimator::m_minPt2ForHitRecoveryInGluedDet
float m_minPt2ForHitRecoveryInGluedDet
Definition: MeasurementEstimator.h:83
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MeasurementEstimator::maximalLocalDisplacement
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
MeasurementEstimator::SurfaceReturnType
bool SurfaceReturnType
Definition: MeasurementEstimator.h:35