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 
13 public:
14 
16  TrackingRecHit(geom) {}
17 
18 
19  template<typename... Args>
21  TrackingRecHit(std::forward<Args>(args)...) {}
22 
23  // to be moved in children
24  TrackingRecHit * cloneHit() const { return hit()->clone();}
25 
26  // Extension of the TrackingRecHit interface
27  virtual const Surface * surface() const final {return &(det()->surface());}
28 
29 
30  virtual GlobalPoint globalPosition() const final {
31  return surface()->toGlobal(localPosition());
32  }
33 
35  float errorGlobalR() const final { return std::sqrt(globalPositionError().rerr(globalPosition()));}
36  float errorGlobalZ() const final { return std::sqrt(globalPositionError().czz()); }
37  float errorGlobalRPhi() const final { return globalPosition().perp()*sqrt(globalPositionError().phierr(globalPosition())); }
38 
39  // once cache removed will obsolete the above
43  auto gp = globalPosition();
44  float r = gp.perp();
45  float errorRPhi = r*std::sqrt(float(globalError.phierr(gp)));
46  float errorR = std::sqrt(float(globalError.rerr(gp)));
47  float errorZ = std::sqrt(float(globalError.czz()));
49  gp.basicVector(), r, gp.barePhi(),
50  errorR,errorZ,errorRPhi
51  };
52  }
53 
54 
59  virtual bool canImproveWithTrack() const {return false;}
60 
61 
63  virtual float clusterProbability() const { return 1.f; }
64 
65 private:
66 
67  // hide the clone method for ReferenceCounted. Warning: this method is still
68  // accessible via the bas class TrackingRecHit interface!
69  virtual TValidTrackingRecHit * clone() const = 0;
70 
71 };
72 
73 #endif
74 
TrackingRecHit * cloneHit() const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
static GlobalError transform(const LocalError &le, const Surface &surf)
T perp() const
Definition: PV3DBase.h:72
GlobalError globalPositionError() const final
TrackingRecHitGlobalState globalState() const
virtual GlobalPoint globalPosition() const final
TValidTrackingRecHit(Args &&...args)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
T phierr(const GlobalPoint &aPoint) const
float errorGlobalR() const final
TValidTrackingRecHit(const GeomDet &geom)
const GeomDet * det() const
T sqrt(T t)
Definition: SSEVec.h:18
float errorGlobalRPhi() const final
virtual TrackingRecHit * clone() const =0
float errorGlobalZ() const final
virtual TrackingRecHit const * hit() const
virtual LocalError localPositionError() const =0
virtual float clusterProbability() const
cluster probability, overloaded by pixel rechits.
T rerr(const GlobalPoint &aPoint) const
virtual TValidTrackingRecHit * clone() const =0
string const
Definition: compareJSON.py:14
virtual LocalPoint localPosition() const =0
virtual bool canImproveWithTrack() const
virtual const Surface * surface() const final