CMS 3D CMS Logo

TValidTrackingRecHit.h
Go to the documentation of this file.
1 #ifndef TValidTrackingRecHit_H
2 #define TValidTrackingRecHit_H
3 
7 
13 public:
15 
16  template <typename... Args>
17  TValidTrackingRecHit(Args&&... args) : TrackingRecHit(std::forward<Args>(args)...) {}
18 
19  // to be moved in children
20  TrackingRecHit* cloneHit() const override { return hit()->clone(); }
21 
22  // Extension of the TrackingRecHit interface
23  const Surface* surface() const final { return &(det()->surface()); }
24 
26 
29  }
30  float errorGlobalR() const final { return std::sqrt(globalPositionError().rerr(globalPosition())); }
31  float errorGlobalZ() const final { return std::sqrt(globalPositionError().czz()); }
32  float errorGlobalRPhi() const final {
33  return globalPosition().perp() * sqrt(globalPositionError().phierr(globalPosition()));
34  }
35 
36  // once cache removed will obsolete the above
39  auto gp = globalPosition();
40  float r = gp.perp();
41  float errorRPhi = r * std::sqrt(float(globalError.phierr(gp)));
42  float errorR = std::sqrt(float(globalError.rerr(gp)));
43  float errorZ = std::sqrt(float(globalError.czz()));
44  return (TrackingRecHitGlobalState){gp.basicVector(), r, gp.barePhi(), errorR, errorZ, errorRPhi};
45  }
46 
51  bool canImproveWithTrack() const override { return false; }
52 
54  virtual float clusterProbability() const { return 1.f; }
55 
56 private:
57  // hide the clone method for ReferenceCounted. Warning: this method is still
58  // accessible via the bas class TrackingRecHit interface!
59  TValidTrackingRecHit* clone() const override = 0;
60 };
61 
62 #endif
writedatasetfile.args
args
Definition: writedatasetfile.py:18
GlobalErrorBase::phierr
T phierr(const GlobalPoint &aPoint) const
Definition: GlobalErrorBase.h:149
TrackingRecHitGlobalState.h
TValidTrackingRecHit::cloneHit
TrackingRecHit * cloneHit() const override
Definition: TValidTrackingRecHit.h:20
TValidTrackingRecHit::errorGlobalRPhi
float errorGlobalRPhi() const final
Definition: TValidTrackingRecHit.h:32
GeomDet
Definition: GeomDet.h:27
TrackingRecHit::hit
virtual TrackingRecHit const * hit() const
Definition: TrackingRecHit.h:75
TrackingRecHit::det
const GeomDet * det() const
Definition: TrackingRecHit.h:122
Surface
Definition: Surface.h:36
TransientTrackingRecHit.h
watchdog.const
const
Definition: watchdog.py:83
TrackingRecHit::localPosition
virtual LocalPoint localPosition() const =0
TValidTrackingRecHit::canImproveWithTrack
bool canImproveWithTrack() const override
Definition: TValidTrackingRecHit.h:51
TValidTrackingRecHit::globalState
TrackingRecHitGlobalState globalState() const
Definition: TValidTrackingRecHit.h:37
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
ErrorFrameTransformer
Definition: ErrorFrameTransformer.h:12
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
TValidTrackingRecHit::TValidTrackingRecHit
TValidTrackingRecHit(const GeomDet &geom)
Definition: TValidTrackingRecHit.h:14
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
Point3DBase< float, GlobalTag >
TrackingRecHitGlobalState
Definition: TrackingRecHitGlobalState.h:7
GlobalErrorBase::rerr
T rerr(const GlobalPoint &aPoint) const
Definition: GlobalErrorBase.h:138
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
TValidTrackingRecHit::errorGlobalZ
float errorGlobalZ() const final
Definition: TValidTrackingRecHit.h:31
TValidTrackingRecHit::clusterProbability
virtual float clusterProbability() const
cluster probability, overloaded by pixel rechits.
Definition: TValidTrackingRecHit.h:54
TValidTrackingRecHit::globalPositionError
GlobalError globalPositionError() const final
Definition: TValidTrackingRecHit.h:27
TValidTrackingRecHit::clone
TValidTrackingRecHit * clone() const override=0
GlobalErrorBase< double, ErrorMatrixTag >
TrackingRecHit::clone
virtual TrackingRecHit * clone() const =0
TValidTrackingRecHit::surface
const Surface * surface() const final
Definition: TValidTrackingRecHit.h:23
TrackingRecHit
Definition: TrackingRecHit.h:21
alignCSCRings.r
r
Definition: alignCSCRings.py:93
std
Definition: JetResolutionObject.h:76
ErrorFrameTransformer.h
TValidTrackingRecHit
Definition: TValidTrackingRecHit.h:12
GlobalErrorBase::czz
T czz() const
Definition: GlobalErrorBase.h:107
TValidTrackingRecHit::errorGlobalR
float errorGlobalR() const final
Definition: TValidTrackingRecHit.h:30
TValidTrackingRecHit::globalPosition
GlobalPoint globalPosition() const final
Definition: TValidTrackingRecHit.h:25
ErrorFrameTransformer::transform
static GlobalError transform(const LocalError &le, const Surface &surf)
Definition: ErrorFrameTransformer.h:16
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
TrackingRecHit::localPositionError
virtual LocalError localPositionError() const =0
TValidTrackingRecHit::TValidTrackingRecHit
TValidTrackingRecHit(Args &&... args)
Definition: TValidTrackingRecHit.h:17