GENFIT  Rev:NoNumberAvailable
Public Member Functions | Private Member Functions | Private Attributes | List of all members
genfit::KalmanFitter Class Reference

Simple Kalman filter implementation. More...

#include <KalmanFitter.h>

Inheritance diagram for genfit::KalmanFitter:
Inheritance graph
Collaboration diagram for genfit::KalmanFitter:
Collaboration graph

Public Member Functions

 KalmanFitter (unsigned int maxIterations=4, double deltaPval=1e-3, double blowUpFactor=1e3, bool squareRootFormalism=false)
 
 ~KalmanFitter ()
 
void processTrackWithRep (Track *tr, const AbsTrackRep *rep, bool resortHits=false)
 Hit resorting currently NOT supported. More...
 
void processTrackPartially (Track *tr, const AbsTrackRep *rep, int startId=0, int endId=-1)
 
void useSquareRootFormalism (bool squareRootFormalism=true)
 
- Public Member Functions inherited from genfit::AbsKalmanFitter
 AbsKalmanFitter (unsigned int maxIterations=4, double deltaPval=1e-3, double blowUpFactor=1e3)
 
virtual ~AbsKalmanFitter ()
 
void getChiSquNdf (const Track *tr, const AbsTrackRep *rep, double &bChi2, double &fChi2, double &bNdf, double &fNdf) const
 
double getChiSqu (const Track *tr, const AbsTrackRep *rep, int direction=-1) const
 
double getNdf (const Track *tr, const AbsTrackRep *rep, int direction=-1) const
 
double getRedChiSqu (const Track *tr, const AbsTrackRep *rep, int direction=-1) const
 
double getPVal (const Track *tr, const AbsTrackRep *rep, int direction=-1) const
 
unsigned int getMinIterations () const
 
unsigned int getMaxIterations () const
 
double getDeltaPval () const
 
double getRelChi2Change () const
 
double getBlowUpFactor () const
 
bool getResetOffDiagonals () const
 
double getBlowUpMaxVal () const
 
eMultipleMeasurementHandling getMultipleMeasurementHandling () const
 
int getMaxFailedHits () const
 
virtual void setMinIterations (unsigned int n)
 Set the minimum number of iterations. More...
 
virtual void setMaxIterations (unsigned int n)
 Set the maximum number of iterations. More...
 
void setDeltaPval (double deltaPval)
 Set Convergence criterion. More...
 
void setRelChi2Change (double relChi2Change)
 
void setBlowUpFactor (double blowUpFactor)
 
void setResetOffDiagonals (bool resetOffDiagonals)
 
void setBlowUpMaxVal (double blowUpMaxVal)
 Limit the cov entries to this maximum value when blowing up the cov. Set to negative value to disable. Default is 1.E6. More...
 
void setMultipleMeasurementHandling (eMultipleMeasurementHandling mmh)
 How should multiple measurements be handled? More...
 
virtual void setMaxFailedHits (int val)
 
bool isTrackPrepared (const Track *tr, const AbsTrackRep *rep) const
 
bool isTrackFitted (const Track *tr, const AbsTrackRep *rep) const
 
bool canIgnoreWeights () const
 returns if the fitter can ignore the weights and handle the MeasurementOnPlanes as if they had weight 1. More...
 
- Public Member Functions inherited from genfit::AbsFitter
 AbsFitter ()
 
virtual ~AbsFitter ()
 
void processTrack (Track *, bool resortHits=false)
 
virtual void setDebugLvl (unsigned int lvl=1)
 

Private Member Functions

 KalmanFitter (const KalmanFitter &)
 
KalmanFitteroperator= (KalmanFitter const &)
 
bool fitTrack (Track *tr, const AbsTrackRep *rep, double &chi2, double &ndf, int startId, int endId, int &nFailedHits)
 
void processTrackPoint (TrackPoint *tp, const AbsTrackRep *rep, double &chi2, double &ndf, int direction)
 

Private Attributes

boost::scoped_ptr< MeasuredStateOnPlanecurrentState_
 
bool squareRootFormalism_
 

Additional Inherited Members

- Protected Member Functions inherited from genfit::AbsKalmanFitter
const std::vector< MeasurementOnPlane * > getMeasurements (const KalmanFitterInfo *fi, const TrackPoint *tp, int direction) const
 get the measurementsOnPlane taking the multipleMeasurementHandling_ into account More...
 
- Protected Attributes inherited from genfit::AbsKalmanFitter
unsigned int minIterations_
 Minimum number of iterations to attempt. Forward and backward are counted as one iteration. More...
 
unsigned int maxIterations_
 Maximum number of iterations to attempt. Forward and backward are counted as one iteration. More...
 
double deltaPval_
 Convergence criterion. More...
 
double relChi2Change_
 
double blowUpFactor_
 Blow up the covariance of the forward (backward) fit by this factor before seeding the backward (forward) fit. More...
 
bool resetOffDiagonals_
 Reset the off-diagonals to 0 when blowing up the cov. More...
 
double blowUpMaxVal_
 Limit the cov entries to this maxuimum value when blowing up the cov. More...
 
eMultipleMeasurementHandling multipleMeasurementHandling_
 How to handle if there are multiple MeasurementsOnPlane. More...
 
int maxFailedHits_
 
- Protected Attributes inherited from genfit::AbsFitter
unsigned int debugLvl_
 

Detailed Description

Simple Kalman filter implementation.

Definition at line 42 of file KalmanFitter.h.

Constructor & Destructor Documentation

◆ KalmanFitter() [1/2]

genfit::KalmanFitter::KalmanFitter ( const KalmanFitter )
private

◆ KalmanFitter() [2/2]

genfit::KalmanFitter::KalmanFitter ( unsigned int  maxIterations = 4,
double  deltaPval = 1e-3,
double  blowUpFactor = 1e3,
bool  squareRootFormalism = false 
)
inline

Definition at line 52 of file KalmanFitter.h.

◆ ~KalmanFitter()

genfit::KalmanFitter::~KalmanFitter ( )
inline

Definition at line 57 of file KalmanFitter.h.

Member Function Documentation

◆ fitTrack()

bool KalmanFitter::fitTrack ( Track tr,
const AbsTrackRep rep,
double &  chi2,
double &  ndf,
int  startId,
int  endId,
int &  nFailedHits 
)
private

◆ operator=()

KalmanFitter& genfit::KalmanFitter::operator= ( KalmanFitter const &  )
private

◆ processTrackPartially()

void KalmanFitter::processTrackPartially ( Track tr,
const AbsTrackRep rep,
int  startId = 0,
int  endId = -1 
)

◆ processTrackPoint()

void KalmanFitter::processTrackPoint ( TrackPoint tp,
const AbsTrackRep rep,
double &  chi2,
double &  ndf,
int  direction 
)
private

◆ processTrackWithRep()

void KalmanFitter::processTrackWithRep ( Track tr,
const AbsTrackRep rep,
bool  resortHits = false 
)
virtual

Hit resorting currently NOT supported.

Implements genfit::AbsFitter.

Definition at line 112 of file KalmanFitter.cc.

References genfit::AbsKalmanFitter::blowUpFactor_, genfit::AbsKalmanFitter::blowUpMaxVal_, currentState_, genfit::AbsFitter::debugLvl_, genfit::debugOut, genfit::AbsKalmanFitter::deltaPval_, genfit::errorOut, fitTrack(), genfit::Track::getCardinalRep(), genfit::Track::getCovSeed(), genfit::Track::getFitStatus(), genfit::TrackPoint::getFitterInfo(), genfit::Track::getPointWithMeasurement(), genfit::Track::getPointWithMeasurementAndFitterInfo(), genfit::AbsTrackRep::getPosMomCov(), genfit::AbsTrackRep::getQop(), genfit::Track::getStateSeed(), genfit::Track::getTimeSeed(), genfit::TrackPoint::hasFitterInfo(), genfit::FitStatus::isTrackPruned(), genfit::AbsKalmanFitter::maxIterations_, genfit::AbsKalmanFitter::minIterations_, genfit::AbsKalmanFitter::relChi2Change_, genfit::AbsKalmanFitter::resetOffDiagonals_, genfit::KalmanFitStatus::setBackwardChi2(), genfit::KalmanFitStatus::setBackwardNdf(), genfit::FitStatus::setCharge(), genfit::Track::setFitStatus(), genfit::KalmanFitStatus::setForwardChi2(), genfit::KalmanFitStatus::setForwardNdf(), genfit::FitStatus::setIsFitConvergedFully(), genfit::FitStatus::setIsFitConvergedPartially(), genfit::FitStatus::setIsFitted(), genfit::FitStatus::setNFailedPoints(), genfit::KalmanFitStatus::setNumIterations(), genfit::AbsTrackRep::setPosMomCov(), genfit::AbsTrackRep::setQop(), genfit::AbsTrackRep::setTime(), and genfit::Exception::what().

◆ useSquareRootFormalism()

void genfit::KalmanFitter::useSquareRootFormalism ( bool  squareRootFormalism = true)
inline

Definition at line 66 of file KalmanFitter.h.

References squareRootFormalism_.

Member Data Documentation

◆ currentState_

boost::scoped_ptr<MeasuredStateOnPlane> genfit::KalmanFitter::currentState_
private

Definition at line 74 of file KalmanFitter.h.

Referenced by processTrackPartially(), processTrackPoint(), and processTrackWithRep().

◆ squareRootFormalism_

bool genfit::KalmanFitter::squareRootFormalism_
private

Definition at line 79 of file KalmanFitter.h.

Referenced by processTrackPoint(), and useSquareRootFormalism().


The documentation for this class was generated from the following files: