CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/TrackingTools/KalmanUpdators/src/KFStrip1DUpdator.cc

Go to the documentation of this file.
00001 #include "TrackingTools/KalmanUpdators/interface/KFStrip1DUpdator.h"
00002 #include "TrackingTools/KalmanUpdators/interface/Strip1DMeasurementTransformator.h"
00003 
00004 TrajectoryStateOnSurface 
00005 KFStrip1DUpdator::update(const TSOS& aTsos, const TransientTrackingRecHit& aHit) const {
00006 
00007   double pzSign = aTsos.localParameters().pzSign();
00008 
00009   Strip1DMeasurementTransformator myTrafo(aTsos, aHit);
00010 
00011   double m = myTrafo.hitParameters();
00012   AlgebraicVector5 x(myTrafo.trajectoryParameters());
00013   double px = myTrafo.projectedTrajectoryParameters();
00014   
00015   AlgebraicMatrix15 H(myTrafo.projectionMatrix());
00016   double V = myTrafo.hitError();
00017   AlgebraicSymMatrix55 C(myTrafo.trajectoryError());
00018   double pC = myTrafo.projectedTrajectoryError();
00019 
00020   double R = 1./(V + pC);
00021   
00022   // Compute Kalman gain matrix
00023   AlgebraicMatrix51 K(R * (C * ROOT::Math::Transpose(H)));
00024 
00025   // Compute local filtered state vector
00026   AlgebraicVector5 fsv = x + K.Col(0) * (m - px);
00027 
00028   // Compute covariance matrix of local filtered state vector
00029   AlgebraicSymMatrix55 I = AlgebraicMatrixID();
00030   AlgebraicMatrix55 M = I - K * H;
00031   AlgebraicSymMatrix55 fse = ROOT::Math::Similarity(M, C) +  ROOT::Math::Similarity(K, AlgebraicSymMatrix11(V) );
00032 //   AlgebraicMatrix M((I - K * H)*C);            // already commented when CLHEP was in use
00033 //   AlgebraicSymMatrix fse(5,0); fse.assign(M);  // already commented when CLHEP was in use
00034 
00035   return TSOS( LTP(fsv, pzSign), LTE(fse), aTsos.surface(), &(aTsos.globalParameters().magneticField()), aTsos.surfaceSide() );  
00036 }
00037 
00038 
00039 
00040 
00041