CMS 3D CMS Logo

RecHitPropagator.h
Go to the documentation of this file.
1 #ifndef RecHitPropagator_H
2 #define RecHitPropagator_H
3 
5 
6 class TrackingRecHit;
7 class MagneticField;
8 class Plane;
9 
11 public:
13  const Plane& plane,
14  const TrajectoryStateOnSurface& ts) const;
15 };
16 
18 
19 // propagate from glued to mono/stereo
20 inline TrajectoryStateOnSurface fastProp(const TrajectoryStateOnSurface& ts, const Plane& oPlane, const Plane& tPlane) {
21  GlobalVector gdir = ts.globalMomentum();
22 
23  double delta = tPlane.localZ(oPlane.position());
24  LocalVector ldir = tPlane.toLocal(gdir); // fast prop!
25  LocalPoint lPos = tPlane.toLocal(ts.globalPosition());
26  LocalPoint projectedPos = lPos - ldir * delta / ldir.z();
27  // we can also patch it up as only the position-errors are used...
29  tPlane.toGlobal(projectedPos), gdir, ts.charge(), &ts.globalParameters().magneticField());
30  if (ts.hasError())
31  return TrajectoryStateOnSurface(gp, ts.curvilinearError(), tPlane);
32  else
33  return TrajectoryStateOnSurface(gp, tPlane);
34 }
35 
36 #endif
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:81
const CurvilinearTrajectoryError & curvilinearError() const
float localZ(const GlobalPoint &gp) const
Definition: Plane.h:45
GlobalPoint globalPosition() const
Definition: Plane.h:16
TrajectoryStateOnSurface fastProp(const TrajectoryStateOnSurface &ts, const Plane &oPlane, const Plane &tPlane)
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:61
#define dso_hidden
Definition: Visibility.h:12
const GlobalTrajectoryParameters & globalParameters() const
GlobalVector globalMomentum() const
const MagneticField & magneticField() const
const PositionType & position() const