SND@LHC Software
|
Determinstic Annealing Filter (DAF) implementation. More...
#include <DAF.h>
Public Member Functions | |
DAF (bool useRefKalman=true, double deltaWeight=1e-3, double deltaPval=1e-3) | |
Create DAF. Per default, use KalmanFitterRefTrack as fitter. | |
DAF (AbsKalmanFitter *kalman, double deltaWeight=1e-3, double deltaPval=1e-3) | |
Create DAF. Use the provided AbsKalmanFitter as fitter. | |
~DAF () | |
void | processTrackWithRep (Track *tr, const AbsTrackRep *rep, bool resortHits=false) |
Process a track using the DAF. | |
void | setProbCut (const double prob_cut) |
Set the probability cut for the weight calculation for the hits. | |
void | addProbCut (const double prob_cut, const int measDim) |
Set the probability cut for the weight calculation for the hits for a specific measurement dimensionality. | |
void | setBetas (double b1, double b2=-1, double b3=-1., double b4=-1., double b5=-1., double b6=-1., double b7=-1., double b8=-1., double b9=-1., double b10=-1.) |
Configure the annealing scheme. | |
void | setAnnealingScheme (double bStart, double bFinal, unsigned int nSteps) |
Configure the annealing scheme. | |
void | setMaxIterations (unsigned int n) |
Set the maximum number of iterations. | |
void | setConvergenceDeltaWeight (double delta) |
If all weights change less than delta between two iterations, the fit is regarded as converged. | |
AbsKalmanFitter * | getKalman () const |
virtual void | setMaxFailedHits (int val) |
virtual void | setDebugLvl (unsigned int lvl=1) |
![]() | |
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 |
eMultipleMeasurementHandling | getMultipleMeasurementHandling () const |
virtual void | setMinIterations (unsigned int n) |
Set the minimum number of iterations. | |
void | setDeltaPval (double deltaPval) |
Set Convergence criterion. | |
void | setRelChi2Change (double relChi2Change) |
void | setMultipleMeasurementHandling (eMultipleMeasurementHandling mmh) |
How should multiple measurements be handled? | |
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. | |
![]() | |
AbsFitter () | |
virtual | ~AbsFitter () |
void | processTrack (Track *, bool resortHits=true) |
Private Member Functions | |
DAF (const DAF &) | |
DAF & | operator= (genfit::DAF const &) |
bool | calcWeights (Track *trk, const AbsTrackRep *rep, double beta) |
Calculate and set the weights for the next fitting pass. Return if convergence is met. The convergence criterium is the largest absolute change of all weights. | |
Private Attributes | |
double | deltaWeight_ |
std::vector< double > | betas_ |
std::map< int, double > | chi2Cuts_ |
boost::scoped_ptr< AbsKalmanFitter > | kalman_ |
Additional Inherited Members | |
![]() | |
const std::vector< MeasurementOnPlane * > | getMeasurements (const KalmanFitterInfo *fi, const TrackPoint *tp, int direction) const |
get the measurementsOnPlane taking the multipleMeasurementHandling_ into account | |
![]() | |
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. | |
eMultipleMeasurementHandling | multipleMeasurementHandling_ |
How to handle if there are multiple MeasurementsOnPlane. | |
int | maxFailedHits_ |
![]() | |
unsigned int | debugLvl_ |
Determinstic Annealing Filter (DAF) implementation.
The DAF is an iterative Kalman filter with annealing. It is capable of fitting tracks which are contaminated with noise hits. The algorithm is taken from the references R. Fruehwirth & A. Strandlie, Computer Physics Communications 120 (1999) 197-214 and CERN thesis: Dissertation by Matthias Winkler.
The weights which were assigned to the hits by the DAF are accessible in the MeasurementOnPlane objects in the KalmanFitterInfo objects.
|
private |
genfit::DAF::DAF | ( | bool | useRefKalman = true , |
double | deltaWeight = 1e-3 , |
||
double | deltaPval = 1e-3 |
||
) |
Create DAF. Per default, use KalmanFitterRefTrack as fitter.
useRefKalman | If false, use KalmanFitter as fitter. |
Definition at line 42 of file DAF.cc.
genfit::DAF::DAF | ( | AbsKalmanFitter * | kalman, |
double | deltaWeight = 1e-3 , |
||
double | deltaPval = 1e-3 |
||
) |
Create DAF. Use the provided AbsKalmanFitter as fitter.
void genfit::DAF::addProbCut | ( | const double | prob_cut, |
const int | measDim | ||
) |
Set the probability cut for the weight calculation for the hits for a specific measurement dimensionality.
Definition at line 179 of file DAF.cc.
|
private |
Calculate and set the weights for the next fitting pass. Return if convergence is met. The convergence criterium is the largest absolute change of all weights.
Definition at line 254 of file DAF.cc.
|
inline |
|
private |
|
virtual |
Process a track using the DAF.
Implements genfit::AbsFitter.
Definition at line 75 of file DAF.cc.
void genfit::DAF::setAnnealingScheme | ( | double | bStart, |
double | bFinal, | ||
unsigned int | nSteps | ||
) |
Configure the annealing scheme.
Set a start and end temperature and the number of steps. A logarithmic sequence of temperatures will be calculated. Also sets minIterations_ and maxIterations_.
Definition at line 230 of file DAF.cc.
void genfit::DAF::setBetas | ( | double | b1, |
double | b2 = -1 , |
||
double | b3 = -1. , |
||
double | b4 = -1. , |
||
double | b5 = -1. , |
||
double | b6 = -1. , |
||
double | b7 = -1. , |
||
double | b8 = -1. , |
||
double | b9 = -1. , |
||
double | b10 = -1. |
||
) |
Configure the annealing scheme.
In the current implementation you need to provide at least one temperature and not more then ten temperatures. Also sets minIterations_ and maxIterations_.
Definition at line 194 of file DAF.cc.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from genfit::AbsKalmanFitter.
Definition at line 105 of file DAF.h.
|
inlinevirtual |
Set the maximum number of iterations.
Reimplemented from genfit::AbsKalmanFitter.
Definition at line 98 of file DAF.h.
void genfit::DAF::setProbCut | ( | const double | prob_cut | ) |
Set the probability cut for the weight calculation for the hits.
By default the cut values for measurements of dimensionality from 1 to 5 are calculated. If you what to have cut values for an arbitrary measurement dimensionality use addProbCut(double prob_cut, int maxDim);
Definition at line 173 of file DAF.cc.
|
private |