23 #ifndef genfit_FitStatus_h 24 #define genfit_FitStatus_h 27 #include <Math/ProbFuncMathCore.h> 49 void setFlags(Option_t *option =
"");
51 bool hasFlags(Option_t *option =
"CFLWRMIU")
const;
55 void Print(
const Option_t * =
"")
const;
58 enum fields { C = 1 << 0, F = 1 << 1, L = 1 << 2, W = 1 << 3, R = 1 << 4, M = 1 << 5, I = 1 << 6, U = 1 << 7 };
74 : isFitted_(false), isFitConvergedFully_(false), isFitConvergedPartially_(false), nFailedPoints_(0), trackHasChanged_(false), pruneFlags_(), charge_(0), chi2_(-1e99),
99 return isFitConvergedFully_;
100 return isFitConvergedPartially_;
120 virtual double getPVal()
const {
return std::max(0., ROOT::Math::chisquared_cdf_c(chi2_, ndf_)); }
131 void setChi2(
const double &chi2) { chi2_ = chi2; }
132 void setNdf(
const double &ndf) { ndf_ = ndf; }
134 virtual void Print(
const Option_t * =
"")
const;
163 #endif // genfit_FitStatus_h
void setChi2(const double &chi2)
int nFailedPoints_
Number of failed TrackPoints.
bool isPruned() const
check if any of the flags is set
bool hasFlags(Option_t *option="CFLWRMIU") const
check if all the given flags are set
void setIsFitConvergedFully(bool fitConverged=true)
bool isTrackPruned() const
Has the track been pruned after the fit?
void setFlags(Option_t *option="")
does not reset! If a flag is already true and is not in opt, it will stay true.
bool isFitConvergedFully_
did the fit converge with all TrackPoints?
Class where important numbers and properties of a fit can be stored.
Info which information has been pruned from the Track.
PruneFlags pruneFlags_
Prune flags.
bool trackHasChanged_
has anything in the Track been changed since the fit? -> fit isn't valid anymore
bool hasTrackChanged() const
Has anything in the Track been changed since the fit?
int getNFailedPoints() const
void setIsFitConvergedPartially(bool fitConverged=true)
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
void setIsFitted(bool fitted=true)
double getCharge() const
Get the fitted charge.
void setNFailedPoints(int nFailedPoints)
PruneFlags & getPruneFlags()
bool isFitConverged(bool inAllPoints=true) const
Did the fit converge (in all Points or only partially)?
virtual FitStatus * clone() const
bool isFitted_
has the track been fitted?
bool isFitted() const
Has the track been fitted?
void Print(const Option_t *="") const
bool isFitConvergedPartially() const
virtual double getPVal() const
Get the p value of the fit.
bool isFitConvergedFully() const
void setHasTrackChanged(bool trackChanged=true)
double getNdf() const
Get the degrees of freedom of the fit.
bool isFitConvergedPartially_
did the fit converge with a subset of all TrackPoints?
void setCharge(double charge)
void setNdf(const double &ndf)
double getChi2() const
Get chi^2 of the fit.
double charge_
fitted charge