CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KFStripUpdator.cc
Go to the documentation of this file.
4 
5 
7 KFStripUpdator::update(const TSOS& aTsos, const TransientTrackingRecHit& aHit) const {
8 
9  double pzSign = aTsos.localParameters().pzSign();
10 
11  StripMeasurementTransformator myTrafo(aTsos, aHit);
12 
14  AlgebraicVector2 m(myTrafo.hitParameters());
17  // AlgebraicVector px = H*x;
18 
19  AlgebraicSymMatrix22 V(myTrafo.hitError());
20  const AlgebraicSymMatrix55 &C = myTrafo.trajectoryError();
22  // AlgebraicSymMatrix pC = C.similarity(H);
23 
24  AlgebraicSymMatrix22 R(V + pC);
25  //int ierr; R.invert(ierr); // if (ierr != 0) throw exception;
27 
28  // Compute Kalman gain matrix
29  // AlgebraicMatrix Hm2l(myTrafo.measurement2LocalProj());
30  AlgebraicMatrix52 K(C * ROOT::Math::Transpose(H) * R);
31 
32  // Compute local filtered state vector
33  AlgebraicVector5 fsv(x + K * (m - px));
34 
35  // Compute covariance matrix of local filtered state vector
37  AlgebraicMatrix55 M = (I - K * H);
38  AlgebraicSymMatrix55 fse = ROOT::Math::Similarity(M,C) + ROOT::Math::Similarity(K,V);
39 
40  return TSOS( LTP(fsv, pzSign), LTE(fse), aTsos.surface(),&(aTsos.globalParameters().magneticField()));
41 }
42 
43 
44 
45 
virtual TSOS update(const TSOS &aTsos, const TransientTrackingRecHit &aHit) const
double pzSign() const
Sign of the z-component of the momentum in the local frame.
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
const LocalTrajectoryParameters & localParameters() const
TrajectoryStateOnSurface TSOS
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 2, ROOT::Math::MatRepStd< double, 5, 2 > > AlgebraicMatrix52
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
LocalTrajectoryParameters LTP
const std::complex< double > I
Definition: I.h:8
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const GlobalTrajectoryParameters & globalParameters() const
ROOT::Math::SMatrix< double, 2, 5, ROOT::Math::MatRepStd< double, 2, 5 > > AlgebraicMatrix25
const Surface & surface() const
const MagneticField & magneticField() const
Definition: DDAxes.h:10
LocalTrajectoryError LTE
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
ROOT::Math::SVector< double, 2 > AlgebraicVector2