CMS 3D CMS Logo

Public Member Functions

RecHitPropagator Class Reference

#include <RecHitPropagator.h>

List of all members.

Public Member Functions

TrajectoryStateOnSurface propagate (const TransientTrackingRecHit &hit, const Plane &plane, const TrajectoryStateOnSurface &ts) const

Detailed Description

Definition at line 10 of file RecHitPropagator.h.


Member Function Documentation

TrajectoryStateOnSurface RecHitPropagator::propagate ( const TransientTrackingRecHit hit,
const Plane plane,
const TrajectoryStateOnSurface ts 
) const

Definition at line 6 of file RecHitPropagator.cc.

References anyDirection, TrajectoryStateOnSurface::charge(), TransientTrackingRecHit::det(), epsilon, TrajectoryStateOnSurface::globalParameters(), TrackingRecHit::localPosition(), TrackingRecHit::localPositionError(), m, GlobalTrajectoryParameters::magneticField(), AnalyticalPropagator::propagate(), GeomDet::specificSurface(), TrajectoryStateOnSurface::surface(), LocalError::xx(), LocalError::xy(), and LocalError::yy().

Referenced by TkGluedMeasurementDet::checkHitProjection().

{
  const MagneticField& field = ts.globalParameters().magneticField();
  AnalyticalPropagator prop( &field, anyDirection);
  TrajectoryStateOnSurface tsNoErr = TrajectoryStateOnSurface( ts.globalParameters(), ts.surface());
  TrajectoryStateOnSurface hitts = prop.propagate( tsNoErr, hit.det()->specificSurface());

  // LocalVector ldir = hit.det()->specificSurface().toLocal(ts.globalMomentum());
  LocalVector ldir = hitts.localMomentum();
  LocalTrajectoryParameters ltp( hit.localPosition(), ldir, ts.charge());
  AlgebraicSymMatrix55 m;
  LocalError lhe = hit.localPositionError();
  m[3][3] = lhe.xx();
  m[3][4] = lhe.xy();
  m[4][4] = lhe.yy();

  const double epsilon = 1.e-8; // very small errors on momentum and angle
  m[0][0] = epsilon;
  m[1][1] = epsilon;
  m[2][2] = epsilon;
  LocalTrajectoryError lte( m);

  TrajectoryStateOnSurface startingState( ltp, lte, hit.det()->specificSurface(), &field);

  return prop.propagate( startingState, plane);
}