CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TValidTrackingRecHit.h
Go to the documentation of this file.
1 #ifndef TValidTrackingRecHit_H
2 #define TValidTrackingRecHit_H
3 
7 
8 class GeomDetUnit;
9 
10 
16 public:
17 
19  TrackingRecHit(geom) {}
20 
21 
22  template<typename... Args>
24  TrackingRecHit(std::forward<Args>(args)...) {}
25 
26  // to be moved in children
27  TrackingRecHit * cloneHit() const { return hit()->clone();}
28 
29  // Extension of the TrackingRecHit interface
30  virtual const Surface * surface() const GCC11_FINAL {return &(det()->surface());}
31 
32 
34  return surface()->toGlobal(localPosition());
35  }
36 
41 
42  // once cache removed will obsolete the above
46  auto gp = globalPosition();
47  float r = gp.perp();
48  float errorRPhi = r*std::sqrt(float(globalError.phierr(gp)));
49  float errorR = std::sqrt(float(globalError.rerr(gp)));
50  float errorZ = std::sqrt(float(globalError.czz()));
52  gp.basicVector(), r, gp.barePhi(),
53  errorR,errorZ,errorRPhi
54  };
55  }
56 
57 
62  virtual bool canImproveWithTrack() const {return false;}
63 
64 
66  virtual float clusterProbability() const { return 1.f; }
67 
68 private:
69 
70  // hide the clone method for ReferenceCounted. Warning: this method is still
71  // accessible via the bas class TrackingRecHit interface!
72  virtual TValidTrackingRecHit * clone() const = 0;
73 
74 };
75 
76 #endif
77 
TrackingRecHit * cloneHit() const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
static GlobalError transform(const LocalError &le, const Surface &surf)
float errorGlobalR() const GCC11_FINAL
T perp() const
Definition: PV3DBase.h:72
GlobalError globalPositionError() const GCC11_FINAL
TrackingRecHitGlobalState globalState() const
TValidTrackingRecHit(Args &&...args)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
T phierr(const GlobalPoint &aPoint) const
float errorGlobalRPhi() const GCC11_FINAL
TValidTrackingRecHit(const GeomDet &geom)
const GeomDet * det() const
T sqrt(T t)
Definition: SSEVec.h:48
virtual TrackingRecHit * clone() const =0
virtual TrackingRecHit const * hit() const
virtual LocalError localPositionError() const =0
virtual float clusterProbability() const
cluster probability, overloaded by pixel rechits.
virtual GlobalPoint globalPosition() const GCC11_FINAL
T rerr(const GlobalPoint &aPoint) const
virtual TValidTrackingRecHit * clone() const =0
string const
Definition: compareJSON.py:14
float errorGlobalZ() const GCC11_FINAL
virtual const Surface * surface() const GCC11_FINAL
virtual LocalPoint localPosition() const =0
virtual bool canImproveWithTrack() const
Unlimited (trivial) bounds.