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 
20  typedef std::vector<ConstRecHitPointer> RecHitContainer;
21  typedef std::vector<ConstRecHitPointer> ConstRecHitContainer;
22 
25 
26 
27  template<typename... Args>
29  TransientTrackingRecHit(std::forward<Args>(args)...), geom_(geom) {}
30 
31  // to be moved in children
32  TrackingRecHit * cloneHit() const { return hit()->clone();}
33 
34  // Extension of the TrackingRecHit interface
35  virtual const GeomDet * det() const GCC11_FINAL {return geom_;}
36  virtual const Surface * surface() const GCC11_FINAL {return &(det()->surface());}
37 
38 
40  return surface()->toGlobal(localPosition());
41  }
42 
47 
48  // once cache removed will obsolete the above
52  auto gp = globalPosition();
53  float r = gp.perp();
54  float errorRPhi = r*std::sqrt(float(globalError.phierr(gp)));
55  float errorR = std::sqrt(float(globalError.rerr(gp)));
56  float errorZ = std::sqrt(float(globalError.czz()));
58  gp.basicVector(), r, gp.barePhi(),
59  errorR,errorZ,errorRPhi
60  };
61  }
62 
63 
68  virtual bool canImproveWithTrack() const {return false;}
69 
70 
72  virtual float clusterProbability() const { return 1.f; }
73 
74 private:
75 
76  const GeomDet * geom_ ;
77 
78 
79  // hide the clone method for ReferenceCounted. Warning: this method is still
80  // accessible via the bas class TrackingRecHit interface!
81  virtual TValidTrackingRecHit * clone() const = 0;
82 
83 };
84 
85 #endif
86 
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
ConstReferenceCountingPointer< TransientTrackingRecHit > ConstRecHitPointer
GlobalError globalPositionError() const GCC11_FINAL
TrackingRecHitGlobalState globalState() const
virtual const TrackingRecHit * hit() const =0
virtual const GeomDet * det() const GCC11_FINAL
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
T phierr(const GlobalPoint &aPoint) const
float errorGlobalRPhi() const GCC11_FINAL
std::vector< ConstRecHitPointer > ConstRecHitContainer
TValidTrackingRecHit(const GeomDet *geom)
T sqrt(T t)
Definition: SSEVec.h:48
virtual TrackingRecHit * clone() const =0
std::vector< ConstRecHitPointer > RecHitContainer
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
TValidTrackingRecHit(const GeomDet *geom, Args &&...args)
dictionary args
float errorGlobalZ() const GCC11_FINAL
virtual const Surface * surface() const GCC11_FINAL
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
virtual bool canImproveWithTrack() const
Unlimited (trivial) bounds.