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_KalmanFitter_h
0024 #define genfit_KalmanFitter_h
0025
0026 #include "AbsKalmanFitter.h"
0027
0028 #include <memory>
0029
0030
0031 namespace genfit {
0032
0033 class KalmanFitterInfo;
0034 class MeasuredStateOnPlane;
0035 class TrackPoint;
0036
0037
0038
0039
0040 class KalmanFitter : public AbsKalmanFitter {
0041
0042 private:
0043
0044
0045 KalmanFitter(const KalmanFitter&);
0046 KalmanFitter& operator=(KalmanFitter const&);
0047
0048 public:
0049
0050 KalmanFitter(unsigned int maxIterations = 4, double deltaPval = 1e-3, double blowUpFactor = 1e3, bool squareRootFormalism = false)
0051 : AbsKalmanFitter(maxIterations, deltaPval, blowUpFactor), currentState_(nullptr),
0052 squareRootFormalism_(squareRootFormalism)
0053 {}
0054
0055 ~KalmanFitter() {}
0056
0057
0058 void processTrackWithRep(Track* tr, const AbsTrackRep* rep, bool resortHits = false) override;
0059
0060
0061
0062 void processTrackPartially(Track* tr, const AbsTrackRep* rep, int startId = 0, int endId = -1);
0063
0064 void useSquareRootFormalism(bool squareRootFormalism = true) {squareRootFormalism_ = squareRootFormalism;}
0065
0066 private:
0067 bool fitTrack(Track* tr, const AbsTrackRep* rep, double& chi2, double& ndf, int startId, int endId, int& nFailedHits);
0068 void processTrackPoint(TrackPoint* tp,
0069 const AbsTrackRep* rep, double& chi2, double& ndf, int direction);
0070
0071 std::unique_ptr<MeasuredStateOnPlane> currentState_;
0072
0073 bool squareRootFormalism_;
0074
0075 public:
0076 ClassDefOverride(KalmanFitter,1)
0077
0078 };
0079
0080 }
0081
0082
0083 #endif