CMS 3D CMS Logo

Public Member Functions | Private Types

KFStripUpdator Class Reference

#include <KFStripUpdator.h>

Inheritance diagram for KFStripUpdator:
TrajectoryStateUpdator

List of all members.

Public Member Functions

virtual KFStripUpdatorclone () const
 KFStripUpdator ()
virtual TSOS update (const TSOS &aTsos, const TransientTrackingRecHit &aHit) const
 ~KFStripUpdator ()

Private Types

typedef LocalTrajectoryError LTE
typedef LocalTrajectoryParameters LTP
typedef TrajectoryStateOnSurface TSOS

Detailed Description

A Kalman Updator that works in the measurement frame and uses both hit coordinates. Ported from ORCA.

Date:
2007/05/09 13:50:25
Revision:
1.3
Author:
todorov, cerati

Definition at line 15 of file KFStripUpdator.h.


Member Typedef Documentation

Definition at line 21 of file KFStripUpdator.h.

Definition at line 20 of file KFStripUpdator.h.

Definition at line 19 of file KFStripUpdator.h.


Constructor & Destructor Documentation

KFStripUpdator::KFStripUpdator ( ) [inline]

Definition at line 25 of file KFStripUpdator.h.

Referenced by clone().

{}
KFStripUpdator::~KFStripUpdator ( ) [inline]

Definition at line 27 of file KFStripUpdator.h.

{}

Member Function Documentation

virtual KFStripUpdator* KFStripUpdator::clone ( void  ) const [inline, virtual]

Implements TrajectoryStateUpdator.

Definition at line 31 of file KFStripUpdator.h.

References KFStripUpdator().

  {
    return new KFStripUpdator(*this);
  }
TrajectoryStateOnSurface KFStripUpdator::update ( const TSOS aTsos,
const TransientTrackingRecHit aHit 
) const [virtual]

Implements TrajectoryStateUpdator.

Definition at line 7 of file KFStripUpdator.cc.

References funct::C, TrajectoryStateOnSurface::globalParameters(), StripMeasurementTransformator::hitError(), StripMeasurementTransformator::hitParameters(), Exhume::I, invertPosDefMatrix(), TrajectoryStateOnSurface::localParameters(), m, GlobalTrajectoryParameters::magneticField(), StripMeasurementTransformator::projectedTrajectoryError(), StripMeasurementTransformator::projectedTrajectoryParameters(), StripMeasurementTransformator::projectionMatrix(), LocalTrajectoryParameters::pzSign(), dttmaxenums::R, TrajectoryStateOnSurface::surface(), StripMeasurementTransformator::trajectoryError(), StripMeasurementTransformator::trajectoryParameters(), and x.

Referenced by KFSwitchingUpdator::update().

                                                                                   {

  double pzSign = aTsos.localParameters().pzSign();

  StripMeasurementTransformator myTrafo(aTsos, aHit);

  AlgebraicMatrix25 H(myTrafo.projectionMatrix());
  AlgebraicVector2 m(myTrafo.hitParameters());
  AlgebraicVector5 x(myTrafo.trajectoryParameters());
  AlgebraicVector2 px(myTrafo.projectedTrajectoryParameters());
  //  AlgebraicVector px = H*x;
  
  AlgebraicSymMatrix22 V(myTrafo.hitError());
  const AlgebraicSymMatrix55 &C = myTrafo.trajectoryError();
  AlgebraicSymMatrix22 pC(myTrafo.projectedTrajectoryError());
  //  AlgebraicSymMatrix pC = C.similarity(H);

  AlgebraicSymMatrix22 R(V + pC);
  //int ierr; R.invert(ierr); // if (ierr != 0) throw exception;
  invertPosDefMatrix(R);
  
  // Compute Kalman gain matrix
  //  AlgebraicMatrix Hm2l(myTrafo.measurement2LocalProj());
  AlgebraicMatrix52 K(C * ROOT::Math::Transpose(H) * R);

  // Compute local filtered state vector
  AlgebraicVector5 fsv(x + K * (m - px));

  // Compute covariance matrix of local filtered state vector
  AlgebraicMatrix55 I = AlgebraicMatrixID();
  AlgebraicMatrix55 M = (I - K * H);
  AlgebraicSymMatrix55 fse = ROOT::Math::Similarity(M,C) + ROOT::Math::Similarity(K,V);

  return TSOS( LTP(fsv, pzSign), LTE(fse), aTsos.surface(),&(aTsos.globalParameters().magneticField()));  
}