CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
RecHitPropagator Class Reference

#include <RecHitPropagator.h>

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().

9 {
10  const MagneticField& field = ts.globalParameters().magneticField();
11  AnalyticalPropagator prop( &field, anyDirection);
13  TrajectoryStateOnSurface hitts = prop.propagate( tsNoErr, hit.det()->specificSurface());
14 
15  // LocalVector ldir = hit.det()->specificSurface().toLocal(ts.globalMomentum());
16  LocalVector ldir = hitts.localMomentum();
17  LocalTrajectoryParameters ltp( hit.localPosition(), ldir, ts.charge());
18  AlgebraicSymMatrix m(5,0);
19  LocalError lhe = hit.localPositionError();
20  m[3][3] = lhe.xx();
21  m[3][4] = lhe.xy();
22  m[4][4] = lhe.yy();
23 
24  const double epsilon = 1.e-8; // very small errors on momentum and angle
25  m[0][0] = epsilon;
26  m[1][1] = epsilon;
27  m[2][2] = epsilon;
28  LocalTrajectoryError lte( m);
29 
30  TrajectoryStateOnSurface startingState( ltp, lte, hit.det()->specificSurface(), &field);
31 
32  return prop.propagate( startingState, plane);
33 }
float xx() const
Definition: LocalError.h:19
float xy() const
Definition: LocalError.h:20
virtual const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:40
float yy() const
Definition: LocalError.h:21
const GlobalTrajectoryParameters & globalParameters() const
virtual LocalError localPositionError() const =0
const Surface & surface() const
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
CLHEP::HepSymMatrix AlgebraicSymMatrix
const MagneticField & magneticField() const
const double epsilon
virtual LocalPoint localPosition() const =0