GENFIT Rev: NoNumberAvailable
Loading...
Searching...
No Matches
KalmanFitterRefTrack.h
Go to the documentation of this file.
1/* Copyright 2013, Ludwig-Maximilians Universität München,
2 Authors: Tobias Schlüter & Johannes Rauch
3
4 This file is part of GENFIT.
5
6 GENFIT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 GENFIT is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18*/
22
23#ifndef genfit_KalmanFitterRefTrack_h
24#define genfit_KalmanFitterRefTrack_h
25
26#include "AbsKalmanFitter.h"
27
28
29namespace genfit {
30
32class TrackPoint;
33
38 public:
39 KalmanFitterRefTrack(unsigned int maxIterations = 4, double deltaPval = 1e-3, double blowUpFactor = 1e3,
40 bool squareRootFormalism = false)
41 : AbsKalmanFitter(maxIterations, deltaPval, blowUpFactor), refitAll_(false), deltaChi2Ref_(1),
42 squareRootFormalism_(squareRootFormalism)
43 {}
44
46
51 TrackPoint* fitTrack(Track* tr, const AbsTrackRep* rep, double& chi2, double& ndf, int direction);
52
53 void processTrackWithRep(Track* tr, const AbsTrackRep* rep, bool resortHits = false) override;
54
62 bool prepareTrack(Track* tr, const AbsTrackRep* rep, bool setSortingParams, int& nFailedHits);
63
65 void setRefitAll(bool refit = true) {refitAll_ = refit;}
66
71 void setDeltaChi2Ref(double dChi2) {deltaChi2Ref_ = dChi2;}
72
73 private:
74 void processTrackPoint(KalmanFitterInfo* fi, const KalmanFitterInfo* prevFi, const TrackPoint* tp, double& chi2, double& ndf, int direction);
75 void processTrackPointSqrt(KalmanFitterInfo* fi, const KalmanFitterInfo* prevFi, const TrackPoint* tp, double& chi2, double& ndf, int direction);
76
83 bool removeOutdated(Track* tr, const AbsTrackRep* rep, int& notChangedUntil, int& notChangedFrom);
84
86 void removeForwardBackwardInfo(Track* tr, const AbsTrackRep* rep, int notChangedUntil, int notChangedFrom) const;
87
88 bool refitAll_; // always refit all points or only if reference states have changed
89 double deltaChi2Ref_; // reference track update cut
90
91 // aux variables for prepareTrack
94 TMatrixDSym FNoiseMatrix_;
95 TMatrixDSym BNoiseMatrix_;
98
99 // aux variables for processTrackPoint
100 TVectorD p_;
101 TMatrixDSym C_;
102 TMatrixDSym covSumInv_;
103 TMatrixDSym Rinv_;
104 TVectorD res_;
105
106 // aux variables for removeOutdated
107 TVectorD resM_;
108
110
111 public:
112 ClassDefOverride(KalmanFitterRefTrack, 1)
113
114};
115
116} /* End of namespace genfit */
118
119#endif //genfit_KalmanFitterRefTrack_h
AbsKalmanFitter(unsigned int maxIterations=4, double deltaPval=1e-3, double blowUpFactor=1e3)
Abstract base class for a track representation.
Definition AbsTrackRep.h:66
Collects information needed and produced by a AbsKalmanFitter implementations and is specific to one ...
void processTrackPoint(KalmanFitterInfo *fi, const KalmanFitterInfo *prevFi, const TrackPoint *tp, double &chi2, double &ndf, int direction)
void removeForwardBackwardInfo(Track *tr, const AbsTrackRep *rep, int notChangedUntil, int notChangedFrom) const
If refitAll_, remove all information.
KalmanFitterRefTrack(unsigned int maxIterations=4, double deltaPval=1e-3, double blowUpFactor=1e3, bool squareRootFormalism=false)
bool removeOutdated(Track *tr, const AbsTrackRep *rep, int &notChangedUntil, int &notChangedFrom)
Remove referenceStates if they are too far from smoothed states.
void setRefitAll(bool refit=true)
If true always refit all points, otherwise fit points only if reference states have changed.
bool prepareTrack(Track *tr, const AbsTrackRep *rep, bool setSortingParams, int &nFailedHits)
Prepare the track.
void processTrackWithRep(Track *tr, const AbsTrackRep *rep, bool resortHits=false) override
void processTrackPointSqrt(KalmanFitterInfo *fi, const KalmanFitterInfo *prevFi, const TrackPoint *tp, double &chi2, double &ndf, int direction)
TrackPoint * fitTrack(Track *tr, const AbsTrackRep *rep, double &chi2, double &ndf, int direction)
Fit the track.
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
Definition Track.h:71
Object containing AbsMeasurement and AbsFitterInfo objects.
Definition TrackPoint.h:46
Defines for I/O streams used for error and debug printing.