Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
genfit::KalmanFitter Class Reference

Simple Kalman filter implementation. More...

#include <GenFit/blob/master/fitters/include/KalmanFitter.h>

+ Inheritance diagram for genfit::KalmanFitter:
+ Collaboration diagram for genfit::KalmanFitter:

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) override
 Hit resorting currently NOT supported.
 
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.
 
virtual void setMaxIterations (unsigned int n)
 Set the maximum number of iterations.
 
void setDeltaPval (double deltaPval)
 Set Convergence criterion.
 
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.
 
void setMultipleMeasurementHandling (eMultipleMeasurementHandling mmh)
 How should multiple measurements be handled?
 
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.
 
- 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

std::unique_ptr
< MeasuredStateOnPlane
currentState_
 
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
 
- Protected Attributes inherited from genfit::AbsKalmanFitter
unsigned int minIterations_
 Minimum number of iterations to attempt. Forward and backward are counted as one iteration.
 
unsigned int maxIterations_
 Maximum number of iterations to attempt. Forward and backward are counted as one iteration.
 
double deltaPval_
 Convergence criterion.
 
double relChi2Change_
 
double blowUpFactor_
 Blow up the covariance of the forward (backward) fit by this factor before seeding the backward (forward) fit.
 
bool resetOffDiagonals_
 Reset the off-diagonals to 0 when blowing up the cov.
 
double blowUpMaxVal_
 Limit the cov entries to this maxuimum value when blowing up the cov.
 
eMultipleMeasurementHandling multipleMeasurementHandling_
 How to handle if there are multiple MeasurementsOnPlane.
 
int maxFailedHits_
 

Detailed Description

Simple Kalman filter implementation.

Definition at line 40 of file KalmanFitter.h.

View newest version in sPHENIX GitHub at line 40 of file KalmanFitter.h

Constructor & Destructor Documentation

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

Definition at line 50 of file KalmanFitter.h.

View newest version in sPHENIX GitHub at line 50 of file KalmanFitter.h

genfit::KalmanFitter::~KalmanFitter ( )
inline

Definition at line 55 of file KalmanFitter.h.

View newest version in sPHENIX GitHub at line 55 of file KalmanFitter.h

Member Function Documentation

bool KalmanFitter::fitTrack ( Track tr,
const AbsTrackRep rep,
double chi2,
double ndf,
int  startId,
int  endId,
int &  nFailedHits 
)
private
KalmanFitter& genfit::KalmanFitter::operator= ( KalmanFitter const &  )
private
void KalmanFitter::processTrackPoint ( TrackPoint tp,
const AbsTrackRep rep,
double chi2,
double ndf,
int  direction 
)
private
void KalmanFitter::processTrackWithRep ( Track tr,
const AbsTrackRep rep,
bool  resortHits = false 
)
overridevirtual

Hit resorting currently NOT supported.

Implements genfit::AbsFitter.

Definition at line 112 of file KalmanFitter.cc.

View newest version in sPHENIX GitHub at line 112 of file KalmanFitter.cc

References genfit::AbsKalmanFitter::blowUpFactor_, genfit::AbsKalmanFitter::blowUpMaxVal_, charge(), Acts::Test::cov, currentState_, genfit::AbsFitter::debugLvl_, genfit::debugOut, genfit::AbsKalmanFitter::deltaPval_, Acts::UnitConstants::e, genfit::errorOut, fitTrack(), genfit::Track::getCardinalRep(), genfit::Track::getCovSeed(), genfit::Track::getFitStatus(), genfit::KalmanFitterInfo::getFittedState(), genfit::TrackPoint::getFitterInfo(), genfit::Track::getPointWithMeasurement(), genfit::Track::getPointWithMeasurementAndFitterInfo(), genfit::AbsTrackRep::getPosMomCov(), genfit::AbsTrackRep::getQop(), genfit::Track::getStateSeed(), genfit::Track::getTimeSeed(), genfit::Track::hasFitStatus(), genfit::TrackPoint::hasFitterInfo(), genfit::KalmanFitterInfo::hasPredictionsAndUpdates(), genfit::FitStatus::isTrackPruned(), genfit::AbsKalmanFitter::maxIterations_, genfit::AbsKalmanFitter::minIterations_, Acts::Test::pos, 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(), utils::status, physmon_simulation::tp, Acts::KalmanVertexTrackUpdater::update(), and genfit::Exception::what().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 64 of file KalmanFitter.h.

View newest version in sPHENIX GitHub at line 64 of file KalmanFitter.h

References squareRootFormalism_.

Member Data Documentation

std::unique_ptr<MeasuredStateOnPlane> genfit::KalmanFitter::currentState_
private

Definition at line 71 of file KalmanFitter.h.

View newest version in sPHENIX GitHub at line 71 of file KalmanFitter.h

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

bool genfit::KalmanFitter::squareRootFormalism_
private

Definition at line 73 of file KalmanFitter.h.

View newest version in sPHENIX GitHub at line 73 of file KalmanFitter.h

Referenced by processTrackPoint(), and useSquareRootFormalism().


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