File indexing completed on 2025-08-05 08:18:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef genfit_KalmanFitterRefTrack_h
0024 #define genfit_KalmanFitterRefTrack_h
0025
0026 #include "AbsKalmanFitter.h"
0027
0028
0029 namespace genfit {
0030
0031 class KalmanFitterInfo;
0032 class TrackPoint;
0033
0034
0035
0036
0037 class KalmanFitterRefTrack : public AbsKalmanFitter {
0038 public:
0039 KalmanFitterRefTrack(unsigned int maxIterations = 4, double deltaPval = 1e-3, double blowUpFactor = 1e3,
0040 bool squareRootFormalism = false)
0041 : AbsKalmanFitter(maxIterations, deltaPval, blowUpFactor), refitAll_(false), deltaChi2Ref_(1),
0042 squareRootFormalism_(squareRootFormalism)
0043 {}
0044
0045 virtual ~KalmanFitterRefTrack() {}
0046
0047
0048
0049
0050
0051 TrackPoint* fitTrack(Track* tr, const AbsTrackRep* rep, double& chi2, double& ndf, int direction);
0052
0053 void processTrackWithRep(Track* tr, const AbsTrackRep* rep, bool resortHits = false) override;
0054
0055
0056
0057
0058
0059
0060
0061
0062 bool prepareTrack(Track* tr, const AbsTrackRep* rep, bool setSortingParams, int& nFailedHits);
0063
0064
0065 void setRefitAll(bool refit = true) {refitAll_ = refit;}
0066
0067
0068
0069
0070
0071 void setDeltaChi2Ref(double dChi2) {deltaChi2Ref_ = dChi2;}
0072
0073 private:
0074 void processTrackPoint(KalmanFitterInfo* fi, const KalmanFitterInfo* prevFi, const TrackPoint* tp, double& chi2, double& ndf, int direction);
0075 void processTrackPointSqrt(KalmanFitterInfo* fi, const KalmanFitterInfo* prevFi, const TrackPoint* tp, double& chi2, double& ndf, int direction);
0076
0077
0078
0079
0080
0081
0082
0083 bool removeOutdated(Track* tr, const AbsTrackRep* rep, int& notChangedUntil, int& notChangedFrom);
0084
0085
0086 void removeForwardBackwardInfo(Track* tr, const AbsTrackRep* rep, int notChangedUntil, int notChangedFrom) const;
0087
0088 bool refitAll_;
0089 double deltaChi2Ref_;
0090
0091
0092 TMatrixD FTransportMatrix_;
0093 TMatrixD BTransportMatrix_;
0094 TMatrixDSym FNoiseMatrix_;
0095 TMatrixDSym BNoiseMatrix_;
0096 TVectorD forwardDeltaState_;
0097 TVectorD backwardDeltaState_;
0098
0099
0100 TVectorD p_;
0101 TMatrixDSym C_;
0102 TMatrixDSym covSumInv_;
0103 TMatrixDSym Rinv_;
0104 TVectorD res_;
0105
0106
0107 TVectorD resM_;
0108
0109 bool squareRootFormalism_;
0110
0111 public:
0112 ClassDefOverride(KalmanFitterRefTrack, 1)
0113
0114 };
0115
0116 }
0117
0118
0119 #endif