CMS 3D CMS Logo

List of all members | Public Member Functions
KFUpdator Class Referencefinal

#include <KFUpdator.h>

Inheritance diagram for KFUpdator:
TrajectoryStateUpdator

Public Member Functions

KFUpdatorclone () const override
 
 KFUpdator ()
 
TrajectoryStateOnSurface update (const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
 
- Public Member Functions inherited from TrajectoryStateUpdator
 TrajectoryStateUpdator ()
 
virtual ~TrajectoryStateUpdator ()
 

Detailed Description

Update trajectory state by combining predicted state and measurement as prescribed in the Kalman Filter algorithm (see R. Fruhwirth, NIM A262 (1987) 444).

x_filtered = x_predicted + K * (measurement - H * x_predicted)

x_filtered, x_predicted filtered and predicted state vectors
measurement measurement vector
H "measurement matrix" projects state vector onto measurement space
K Kalman gain matrix
(formulae for K and error matrix of filtered state not shown)

This implementation works for measurements of all dimensions. It relies on CLHEP double precision vectors and matrices for matrix calculations.

Arguments: TrajectoryState & predicted state
RecHit & reconstructed hit

Initial author: P.Vanlaer 25.02.1999 Ported from ORCA.

Author
vanlaer, cerati

Definition at line 32 of file KFUpdator.h.

Constructor & Destructor Documentation

◆ KFUpdator()

KFUpdator::KFUpdator ( )
inline

Definition at line 36 of file KFUpdator.h.

Referenced by clone().

36 {}

Member Function Documentation

◆ clone()

KFUpdator* KFUpdator::clone ( void  ) const
inlineoverridevirtual

Implements TrajectoryStateUpdator.

Definition at line 40 of file KFUpdator.h.

References KFUpdator().

40 { return new KFUpdator(*this); }
KFUpdator()
Definition: KFUpdator.h:36

◆ update()

TrajectoryStateOnSurface KFUpdator::update ( const TrajectoryStateOnSurface tsos,
const TrackingRecHit aRecHit 
) const
overridevirtual

Implements TrajectoryStateUpdator.

Definition at line 177 of file KFUpdator.cc.

References TrackingRecHit::dimension(), Exception, and mergeVDriftHistosByStation::name.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), CosmicTrajectoryBuilder::AddHit(), CRackTrajectoryBuilder::AddHit(), SeedFromNuclearInteraction::construct(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), progressbar.ProgressBar::finish(), CosmicMuonSmoother::fit(), MatrixUtil.Steps::overwrite(), TkMSParameterizationBuilder::produce(), ConvBremSeedProducer::produce(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), SimpleCosmicBONSeeder::seeds(), CosmicMuonSmoother::smooth(), GsfMultiStateUpdator::update(), and KFSwitching1DUpdator::update().

177  {
178  switch (aRecHit.dimension()) {
179  case 1:
180  return lupdate<1>(tsos, aRecHit);
181  case 2:
182  return lupdate<2>(tsos, aRecHit);
183  case 3:
184  return lupdate<3>(tsos, aRecHit);
185  case 4:
186  return lupdate<4>(tsos, aRecHit);
187  case 5:
188  return lupdate<5>(tsos, aRecHit);
189  }
190  throw cms::Exception("Rec hit of invalid dimension (not 1,2,3,4,5)")
191  << "The value was " << aRecHit.dimension() << ", type is " << typeid(aRecHit).name() << "\n";
192 }
virtual int dimension() const =0