CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecHitPropagator.h
Go to the documentation of this file.
1 #ifndef RecHitPropagator_H
2 #define RecHitPropagator_H
3 
5 
7 class MagneticField;
8 class Plane;
9 
11 public:
12 
14  const Plane& plane,
15  const TrajectoryStateOnSurface& ts) const;
16 
17 };
18 
20 
21 // propagate from glued to mono/stereo
22 inline
23 TrajectoryStateOnSurface fastProp(const TrajectoryStateOnSurface& ts, const Plane& oPlane, const Plane& tPlane) {
24  GlobalVector gdir = ts.globalMomentum();
25 
26  double delta = tPlane.localZ(oPlane.position());
27  LocalVector ldir = tPlane.toLocal(gdir); // fast prop!
28  LocalPoint lPos = tPlane.toLocal( ts.globalPosition());
29  LocalPoint projectedPos = lPos - ldir * delta/ldir.z();
30  // we can also patch it up as only the position-errors are used...
31  GlobalTrajectoryParameters gp(tPlane.toGlobal(projectedPos),gdir,ts.charge(), &ts.globalParameters().magneticField());
32  if (ts.hasError())
33  return TrajectoryStateOnSurface(gp,ts.curvilinearError(),tPlane);
34  else
35  return TrajectoryStateOnSurface(gp,tPlane);
36 
37 
38 }
39 
40 #endif
dbl * delta
Definition: mlp_gen.cc:36
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
TrajectoryStateOnSurface propagate(const TransientTrackingRecHit &hit, const Plane &plane, const TrajectoryStateOnSurface &ts) const
const CurvilinearTrajectoryError & curvilinearError() const
float localZ(const GlobalPoint &gp) const
Definition: Plane.h:49
GlobalPoint globalPosition() const
Definition: Plane.h:17
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:64
const GlobalTrajectoryParameters & globalParameters() const
TrajectoryStateOnSurface fastProp(const TrajectoryStateOnSurface &ts, const Plane &oPlane, const Plane &tPlane)
GlobalVector globalMomentum() const
const MagneticField & magneticField() const
const PositionType & position() const