All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces
KHit.h File Reference

Kalman filter measurement class template. More...

#include "cetlib_except/exception.h"
#include "lardata/RecoObjects/KHitBase.h"
#include "lardata/RecoObjects/Propagator.h"

Go to the source code of this file.

Classes

class  trkf::KHit< N >
 

Namespaces

 trkf
 

Detailed Description

Kalman filter measurement class template.

Author
H. Greenlee

Class KHit represents a general measurement on a surface. It is specialized compared to base class KHitBase by specifying the dimension of the measurement vector by an integer template parameter N.

KHit class inherits the following attribute from KHitBase.

  1. Measurement surface.
  2. Prediction surface.

KHit adds the following attributes.

  1. Measurement vector.
  2. Measurement error matrix.
  3. Prediction vector.
  4. Prediction error matrix.
  5. Residual vector.
  6. Residual error matrix.
  7. Inverse of residual error matrix.
  8. Kalman H-matrix.
  9. Incremental chisquare.

The first two attributes (measurement vector + error matrix) are filled during construction, and the remaining attributes are left in a default state.

The remaining attributes (also prediction surface attribute of base class) are filled by the prediction method. The attributes that are filled in by the prediction method are mutable, and prediction method is const. The actual calculation of the prediction vector, prediction error matrix, and H-matrix are left to be implemented by a derived class, which must override the pure virtual method subpredict. The remaining unfilled attributes are calculated locally in this class in the prediction method inherited from KHitBase.

The measurement and prediction surfaces are not required to be the same. If they are different, the method predict is required to make an internal propagation from the prediction surface to the measurement surface, which propagation influeces the calculated H-matrix, as well as the prediction vector and error.

The intended use case is as follows.

  1. Track (KETrack) is propagated to measurement surface. Methods predict and update will throw an exception of track surface does not match measurement surface.
  2. Prediction is updated by calling method KHit::predict.
  3. At this point the calling program can make a cut on the incremental chisquare, returned by method KHit::chisq.
  4. If the chisquare cut passes, update track by calling method KHit::update.

Definition in file KHit.h.