CMS 3D CMS Logo

RecHitPropagator.cc

Go to the documentation of this file.
00001 #include "RecoTracker/MeasurementDet/interface/RecHitPropagator.h"
00002 #include "TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h"
00003 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00004 
00005 TrajectoryStateOnSurface 
00006 RecHitPropagator::propagate( const TransientTrackingRecHit& hit,
00007                              const Plane& plane, 
00008                              const TrajectoryStateOnSurface& ts) const
00009 {
00010   const MagneticField& field = ts.globalParameters().magneticField();
00011   AnalyticalPropagator prop( &field, anyDirection);
00012   TrajectoryStateOnSurface tsNoErr = TrajectoryStateOnSurface( ts.globalParameters(), ts.surface());
00013   TrajectoryStateOnSurface hitts = prop.propagate( tsNoErr, hit.det()->specificSurface());
00014 
00015   // LocalVector ldir = hit.det()->specificSurface().toLocal(ts.globalMomentum());
00016   LocalVector ldir = hitts.localMomentum();
00017   LocalTrajectoryParameters ltp( hit.localPosition(), ldir, ts.charge());
00018   AlgebraicSymMatrix m(5,0);
00019   LocalError lhe = hit.localPositionError();
00020   m[3][3] = lhe.xx();
00021   m[3][4] = lhe.xy();
00022   m[4][4] = lhe.yy();
00023 
00024   const double epsilon = 1.e-8; // very small errors on momentum and angle
00025   m[0][0] = epsilon;
00026   m[1][1] = epsilon;
00027   m[2][2] = epsilon;
00028   LocalTrajectoryError lte( m);
00029 
00030   TrajectoryStateOnSurface startingState( ltp, lte, hit.det()->specificSurface(), &field);
00031 
00032   return prop.propagate( startingState, plane);
00033 }

Generated on Tue Jun 9 17:45:29 2009 for CMSSW by  doxygen 1.5.4