Analysis Software
Documentation for sPHENIX simulation software
|
Simple Kalman filter implementation. More...
#include <GenFit/blob/master/fitters/include/KalmanFitter.h>
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 &) | |
KalmanFitter & | operator= (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_ |
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
|
private |
|
inline |
Definition at line 50 of file KalmanFitter.h.
View newest version in sPHENIX GitHub at line 50 of file KalmanFitter.h
|
inline |
Definition at line 55 of file KalmanFitter.h.
View newest version in sPHENIX GitHub at line 55 of file KalmanFitter.h
|
private |
Definition at line 43 of file KalmanFitter.cc.
View newest version in sPHENIX GitHub at line 43 of file KalmanFitter.cc
References assert, genfit::AbsFitter::debugLvl_, genfit::debugOut, genfit::TrackPoint::deleteFitterInfo(), Acts::UnitConstants::e, genfit::errorOut, genfit::AbsTrackRep::getDim(), genfit::Track::getNumPointsWithMeasurement(), genfit::Track::getPoint(), genfit::Track::getPointWithMeasurement(), i, genfit::AbsKalmanFitter::maxFailedHits_, genfit::AbsKalmanFitter::multipleMeasurementHandling_, processTrackPoint(), genfit::Exception::setFatal(), physmon_simulation::tp, genfit::unweightedClosestToReference, genfit::unweightedClosestToReferenceWire, genfit::weightedClosestToReference, genfit::weightedClosestToReferenceWire, and genfit::Exception::what().
Referenced by processTrackPartially(), and processTrackWithRep().
|
private |
void KalmanFitter::processTrackPartially | ( | Track * | tr, |
const AbsTrackRep * | rep, | ||
int | startId = 0 , |
||
int | endId = -1 |
||
) |
process only a part of the track. Can also be used to process the track only in backward direction. Does not alter the FitStatus and does not do multiple iterations.
Definition at line 304 of file KalmanFitter.cc.
View newest version in sPHENIX GitHub at line 304 of file KalmanFitter.cc
References genfit::AbsKalmanFitter::blowUpFactor_, genfit::AbsKalmanFitter::blowUpMaxVal_, Acts::Test::cov, currentState_, genfit::AbsFitter::debugLvl_, genfit::debugOut, fitTrack(), genfit::Track::getCardinalRep(), genfit::Track::getCovSeed(), genfit::Track::getFitStatus(), genfit::KalmanFitterInfo::getFittedState(), genfit::TrackPoint::getFitterInfo(), genfit::Track::getNumPointsWithMeasurement(), genfit::Track::getPointWithMeasurement(), genfit::AbsTrackRep::getPosMomCov(), genfit::AbsTrackRep::getQop(), genfit::Track::getStateSeed(), genfit::Track::getTimeSeed(), genfit::TrackPoint::hasFitterInfo(), genfit::KalmanFitterInfo::hasPredictionsAndUpdates(), genfit::FitStatus::isTrackPruned(), Acts::Test::pos, genfit::AbsKalmanFitter::resetOffDiagonals_, genfit::AbsTrackRep::setPosMomCov(), genfit::AbsTrackRep::setQop(), and genfit::AbsTrackRep::setTime().
|
private |
Definition at line 382 of file KalmanFitter.cc.
View newest version in sPHENIX GitHub at line 382 of file KalmanFitter.cc
References assert, genfit::AbsKalmanFitter::canIgnoreWeights(), Acts::Test::cov, currentState_, genfit::AbsFitter::debugLvl_, genfit::debugOut, E, genfit::AbsTrackRep::extrapolateToPlane(), genfit::StateOnPlane::getAuxInfo(), genfit::MeasuredStateOnPlane::getCov(), genfit::TrackPoint::getFitterInfo(), genfit::MeasurementOnPlane::getHMatrix(), genfit::AbsKalmanFitter::getMeasurements(), genfit::TrackPoint::getRawMeasurements(), genfit::StateOnPlane::getState(), genfit::MeasurementOnPlane::getWeight(), H, genfit::TrackPoint::hasFitterInfo(), genfit::TrackPoint::hasRawMeasurements(), genfit::tools::invertMatrix(), it, genfit::tools::kalmanUpdateSqrt(), Acts::PrimitivesView3DTest::plane, Acts::IntegrationTest::R, S(), genfit::TrackPoint::setFitterInfo(), squareRootFormalism_, filter::state, and Acts::KalmanVertexTrackUpdater::update().
Referenced by fitTrack().
|
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().
|
inline |
Definition at line 64 of file KalmanFitter.h.
View newest version in sPHENIX GitHub at line 64 of file KalmanFitter.h
References squareRootFormalism_.
|
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().
|
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().