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_KalmanFitStatus_h
0024 #define genfit_KalmanFitStatus_h
0025
0026 #include "FitStatus.h"
0027
0028 #include <Math/ProbFunc.h>
0029
0030
0031 namespace genfit {
0032
0033
0034
0035
0036 class KalmanFitStatus : public FitStatus {
0037
0038 public:
0039
0040 KalmanFitStatus() :
0041 FitStatus(), numIterations_(0), fittedWithDaf_(false), fittedWithReferenceTrack_(false),
0042 trackLen_(0), fChi2_(-1e99), fNdf_(-1e99), fPval_(-1e99) {;}
0043
0044 virtual ~KalmanFitStatus() {};
0045
0046 virtual FitStatus* clone() const override {return new KalmanFitStatus(*this);}
0047
0048 unsigned int getNumIterations() const {return numIterations_;}
0049 bool isFittedWithDaf() const {return fittedWithDaf_;}
0050 bool isFittedWithReferenceTrack() const {return fittedWithReferenceTrack_;}
0051 double getTrackLen() const {return trackLen_;}
0052 double getForwardChi2() const {return fChi2_;}
0053 double getBackwardChi2() const {return FitStatus::getChi2();}
0054 double getForwardNdf() const {return fNdf_;}
0055 double getBackwardNdf() const {return FitStatus::getNdf();}
0056
0057 double getForwardPVal() const {return std::max(0.,ROOT::Math::chisquared_cdf_c(fChi2_, fNdf_));}
0058 double getBackwardPVal() const {return FitStatus::getPVal(); }
0059
0060 void setNumIterations(unsigned int numIterations) {numIterations_ = numIterations;}
0061 void setIsFittedWithDaf(bool fittedWithDaf = true) {fittedWithDaf_ = fittedWithDaf;}
0062 void setIsFittedWithReferenceTrack(bool fittedWithReferenceTrack = true) {fittedWithReferenceTrack_ = fittedWithReferenceTrack;}
0063 void setTrackLen(double trackLen) {trackLen_ = trackLen;}
0064 void setForwardChi2(double fChi2) {fChi2_ = fChi2;}
0065 void setBackwardChi2(double bChi2) {FitStatus::setChi2(bChi2);}
0066 void setForwardNdf(double fNdf) {fNdf_ = fNdf;}
0067 void setBackwardNdf(double bNdf) {FitStatus::setNdf(bNdf);}
0068
0069 virtual void Print(const Option_t* = "") const override;
0070
0071 protected:
0072
0073 unsigned int numIterations_;
0074 bool fittedWithDaf_;
0075 bool fittedWithReferenceTrack_;
0076
0077 double trackLen_;
0078
0079 double fChi2_;
0080 double fNdf_;
0081 double fPval_;
0082
0083 public:
0084
0085 ClassDefOverride(KalmanFitStatus, 1)
0086
0087 };
0088
0089 }
0090
0091
0092 #endif