![]() |
![]() |
00001 #include "TrackingTools/KalmanUpdators/interface/KFStripUpdator.h" 00002 #include "TrackingTools/KalmanUpdators/interface/StripMeasurementTransformator.h" 00003 00004 TrajectoryStateOnSurface 00005 KFStripUpdator::update(const TSOS& aTsos, const TransientTrackingRecHit& aHit) const { 00006 00007 double pzSign = aTsos.localParameters().pzSign(); 00008 00009 StripMeasurementTransformator myTrafo(aTsos, aHit); 00010 00011 AlgebraicMatrix25 H(myTrafo.projectionMatrix()); 00012 AlgebraicVector2 m(myTrafo.hitParameters()); 00013 AlgebraicVector5 x(myTrafo.trajectoryParameters()); 00014 AlgebraicVector2 px(myTrafo.projectedTrajectoryParameters()); 00015 // AlgebraicVector px = H*x; 00016 00017 AlgebraicSymMatrix22 V(myTrafo.hitError()); 00018 const AlgebraicSymMatrix55 &C = myTrafo.trajectoryError(); 00019 AlgebraicSymMatrix22 pC(myTrafo.projectedTrajectoryError()); 00020 // AlgebraicSymMatrix pC = C.similarity(H); 00021 00022 AlgebraicSymMatrix22 R(V + pC); 00023 //int ierr; R.invert(ierr); // if (ierr != 0) throw exception; 00024 R.Invert(); 00025 00026 // Compute Kalman gain matrix 00027 // AlgebraicMatrix Hm2l(myTrafo.measurement2LocalProj()); 00028 AlgebraicMatrix52 K(C * ROOT::Math::Transpose(H) * R); 00029 00030 // Compute local filtered state vector 00031 AlgebraicVector5 fsv(x + K * (m - px)); 00032 00033 // Compute covariance matrix of local filtered state vector 00034 AlgebraicMatrix55 I = AlgebraicMatrixID(); 00035 AlgebraicMatrix55 M = (I - K * H); 00036 AlgebraicSymMatrix55 fse = ROOT::Math::Similarity(M,C) + ROOT::Math::Similarity(K,V); 00037 00038 return TSOS( LTP(fsv, pzSign), LTE(fse), aTsos.surface(),&(aTsos.globalParameters().magneticField())); 00039 } 00040 00041 00042 00043