PandaRoot
genfit::FitStatus Class Reference

Class where important numbers and properties of a fit can be stored. More...

#include <FitStatus.h>

Inheritance diagram for genfit::FitStatus:
genfit::KalmanFitStatus

Public Member Functions

 FitStatus ()
 
virtual ~FitStatus ()
 
virtual FitStatusclone () const
 
bool isFitted () const
 Has the track been fitted? More...
 
bool isFitConverged (bool inAllPoints=true) const
 Did the fit converge (in all Points or only partially)? More...
 
bool isFitConvergedFully () const
 
bool isFitConvergedPartially () const
 
int getNFailedPoints () const
 
bool hasTrackChanged () const
 Has anything in the Track been changed since the fit? More...
 
bool isTrackPruned () const
 Has the track been pruned after the fit? More...
 
double getCharge () const
 Get the fitted charge. More...
 
double getChi2 () const
 Get chi^2 of the fit. More...
 
double getNdf () const
 Get the degrees of freedom of the fit. More...
 
virtual double getPVal () const
 Get the p value of the fit. More...
 
void setIsFitted (bool fitted=true)
 
void setIsFitConvergedFully (bool fitConverged=true)
 
void setIsFitConvergedPartially (bool fitConverged=true)
 
void setNFailedPoints (int nFailedPoints)
 
void setHasTrackChanged (bool trackChanged=true)
 
void setCharge (double charge)
 
PruneFlagsgetPruneFlags ()
 
void setChi2 (const double &chi2)
 
void setNdf (const double &ndf)
 
virtual void Print (const Option_t *="") const
 

Protected Member Functions

 ClassDef (FitStatus, 3)
 

Protected Attributes

bool isFitted_
 has the track been fitted? More...
 
bool isFitConvergedFully_
 did the fit converge with all TrackPoints? More...
 
bool isFitConvergedPartially_
 did the fit converge with a subset of all TrackPoints? More...
 
int nFailedPoints_
 Number of failed TrackPoints. More...
 
bool trackHasChanged_
 has anything in the Track been changed since the fit? -> fit isn't valid anymore More...
 
PruneFlags pruneFlags_
 Prune flags. More...
 
double charge_
 fitted charge More...
 
double chi2_
 
double ndf_
 

Detailed Description

Class where important numbers and properties of a fit can be stored.

Author
Johannes Rauch (Technische Universität München, original author)

Definition at line 70 of file FitStatus.h.

Constructor & Destructor Documentation

◆ FitStatus()

genfit::FitStatus::FitStatus ( )
inline

Definition at line 73 of file FitStatus.h.

75  ndf_(-1e99)
76  {
77  ;
78  }
int nFailedPoints_
Number of failed TrackPoints.
Definition: FitStatus.h:144
bool isFitConvergedFully_
did the fit converge with all TrackPoints?
Definition: FitStatus.h:140
PruneFlags pruneFlags_
Prune flags.
Definition: FitStatus.h:148
bool trackHasChanged_
has anything in the Track been changed since the fit? -> fit isn&#39;t valid anymore
Definition: FitStatus.h:146
bool isFitted_
has the track been fitted?
Definition: FitStatus.h:138
bool isFitConvergedPartially_
did the fit converge with a subset of all TrackPoints?
Definition: FitStatus.h:142
double charge_
fitted charge
Definition: FitStatus.h:150

◆ ~FitStatus()

virtual genfit::FitStatus::~FitStatus ( )
inlinevirtual

Definition at line 80 of file FitStatus.h.

80 {};

Member Function Documentation

◆ ClassDef()

genfit::FitStatus::ClassDef ( FitStatus  ,
 
)
protected

◆ clone()

virtual FitStatus* genfit::FitStatus::clone ( ) const
inlinevirtual

Reimplemented in genfit::KalmanFitStatus.

Definition at line 82 of file FitStatus.h.

82 { return new FitStatus(*this); }

◆ getCharge()

double genfit::FitStatus::getCharge ( ) const
inline

Get the fitted charge.

Definition at line 110 of file FitStatus.h.

110 { return charge_; }
double charge_
fitted charge
Definition: FitStatus.h:150

◆ getChi2()

double genfit::FitStatus::getChi2 ( ) const
inline

Get chi^2 of the fit.

Definition at line 112 of file FitStatus.h.

Referenced by genfit::KalmanFitStatus::getBackwardChi2().

112 { return chi2_; }

◆ getNdf()

double genfit::FitStatus::getNdf ( ) const
inline

Get the degrees of freedom of the fit.

Definition at line 114 of file FitStatus.h.

Referenced by genfit::KalmanFitStatus::getBackwardNdf().

114 { return ndf_; }

◆ getNFailedPoints()

int genfit::FitStatus::getNFailedPoints ( ) const
inline

Definition at line 104 of file FitStatus.h.

104 { return nFailedPoints_; }
int nFailedPoints_
Number of failed TrackPoints.
Definition: FitStatus.h:144

◆ getPruneFlags()

PruneFlags& genfit::FitStatus::getPruneFlags ( )
inline

Definition at line 129 of file FitStatus.h.

129 { return pruneFlags_; }
PruneFlags pruneFlags_
Prune flags.
Definition: FitStatus.h:148

◆ getPVal()

virtual double genfit::FitStatus::getPVal ( ) const
inlinevirtual

Get the p value of the fit.

Virtual, because the fitter may use a different probability distribution.

Definition at line 120 of file FitStatus.h.

References max().

Referenced by genfit::KalmanFitStatus::getBackwardPVal().

120 { return std::max(0., ROOT::Math::chisquared_cdf_c(chi2_, ndf_)); }
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25

◆ hasTrackChanged()

bool genfit::FitStatus::hasTrackChanged ( ) const
inline

Has anything in the Track been changed since the fit?

Definition at line 106 of file FitStatus.h.

106 { return trackHasChanged_; }
bool trackHasChanged_
has anything in the Track been changed since the fit? -> fit isn&#39;t valid anymore
Definition: FitStatus.h:146

◆ isFitConverged()

bool genfit::FitStatus::isFitConverged ( bool  inAllPoints = true) const
inline

Did the fit converge (in all Points or only partially)?

Per default, this function will only be true, if all TrackPoints (with measurements) have been used in the fit, and the fit has converged.

If one or more TrackPoints have been skipped (e.g. plane could not be constructed or extrapolation to plane failed), but the fit otherwise met the convergence criteria, isFitConverged(false) will return true.

Definition at line 96 of file FitStatus.h.

97  {
98  if (inAllPoints)
99  return isFitConvergedFully_;
101  }
bool isFitConvergedFully_
did the fit converge with all TrackPoints?
Definition: FitStatus.h:140
bool isFitConvergedPartially_
did the fit converge with a subset of all TrackPoints?
Definition: FitStatus.h:142

◆ isFitConvergedFully()

bool genfit::FitStatus::isFitConvergedFully ( ) const
inline

Definition at line 102 of file FitStatus.h.

102 { return isFitConvergedFully_; }
bool isFitConvergedFully_
did the fit converge with all TrackPoints?
Definition: FitStatus.h:140

◆ isFitConvergedPartially()

bool genfit::FitStatus::isFitConvergedPartially ( ) const
inline

Definition at line 103 of file FitStatus.h.

103 { return isFitConvergedPartially_; }
bool isFitConvergedPartially_
did the fit converge with a subset of all TrackPoints?
Definition: FitStatus.h:142

◆ isFitted()

bool genfit::FitStatus::isFitted ( ) const
inline

Has the track been fitted?

Definition at line 85 of file FitStatus.h.

85 { return isFitted_; }
bool isFitted_
has the track been fitted?
Definition: FitStatus.h:138

◆ isTrackPruned()

bool genfit::FitStatus::isTrackPruned ( ) const
inline

Has the track been pruned after the fit?

Definition at line 108 of file FitStatus.h.

108 { return pruneFlags_.isPruned(); }
bool isPruned() const
check if any of the flags is set
PruneFlags pruneFlags_
Prune flags.
Definition: FitStatus.h:148

◆ Print()

virtual void genfit::FitStatus::Print ( const Option_t *  = "") const
virtual

Reimplemented in genfit::KalmanFitStatus.

◆ setCharge()

void genfit::FitStatus::setCharge ( double  charge)
inline

Definition at line 127 of file FitStatus.h.

127 { charge_ = charge; }
double charge_
fitted charge
Definition: FitStatus.h:150

◆ setChi2()

void genfit::FitStatus::setChi2 ( const double &  chi2)
inline

Definition at line 131 of file FitStatus.h.

Referenced by genfit::KalmanFitStatus::setBackwardChi2().

131 { chi2_ = chi2; }

◆ setHasTrackChanged()

void genfit::FitStatus::setHasTrackChanged ( bool  trackChanged = true)
inline

Definition at line 126 of file FitStatus.h.

126 { trackHasChanged_ = trackChanged; }
bool trackHasChanged_
has anything in the Track been changed since the fit? -> fit isn&#39;t valid anymore
Definition: FitStatus.h:146

◆ setIsFitConvergedFully()

void genfit::FitStatus::setIsFitConvergedFully ( bool  fitConverged = true)
inline

Definition at line 123 of file FitStatus.h.

123 { isFitConvergedFully_ = fitConverged; }
bool isFitConvergedFully_
did the fit converge with all TrackPoints?
Definition: FitStatus.h:140

◆ setIsFitConvergedPartially()

void genfit::FitStatus::setIsFitConvergedPartially ( bool  fitConverged = true)
inline

Definition at line 124 of file FitStatus.h.

124 { isFitConvergedPartially_ = fitConverged; }
bool isFitConvergedPartially_
did the fit converge with a subset of all TrackPoints?
Definition: FitStatus.h:142

◆ setIsFitted()

void genfit::FitStatus::setIsFitted ( bool  fitted = true)
inline

Definition at line 122 of file FitStatus.h.

122 { isFitted_ = fitted; }
bool isFitted_
has the track been fitted?
Definition: FitStatus.h:138

◆ setNdf()

void genfit::FitStatus::setNdf ( const double &  ndf)
inline

Definition at line 132 of file FitStatus.h.

References genfit::PruneFlags::Print().

Referenced by genfit::KalmanFitStatus::setBackwardNdf().

132 { ndf_ = ndf; }

◆ setNFailedPoints()

void genfit::FitStatus::setNFailedPoints ( int  nFailedPoints)
inline

Definition at line 125 of file FitStatus.h.

125 { nFailedPoints_ = nFailedPoints; }
int nFailedPoints_
Number of failed TrackPoints.
Definition: FitStatus.h:144

Member Data Documentation

◆ charge_

double genfit::FitStatus::charge_
protected

fitted charge

Definition at line 150 of file FitStatus.h.

◆ chi2_

double genfit::FitStatus::chi2_
protected

These are provided for the sake of the fitter, and their interpretation may vary. For the Kalman-derived fitters in particular, this corresponds to the backwards fit.

Definition at line 154 of file FitStatus.h.

◆ isFitConvergedFully_

bool genfit::FitStatus::isFitConvergedFully_
protected

did the fit converge with all TrackPoints?

Definition at line 140 of file FitStatus.h.

◆ isFitConvergedPartially_

bool genfit::FitStatus::isFitConvergedPartially_
protected

did the fit converge with a subset of all TrackPoints?

Definition at line 142 of file FitStatus.h.

◆ isFitted_

bool genfit::FitStatus::isFitted_
protected

has the track been fitted?

Definition at line 138 of file FitStatus.h.

◆ ndf_

double genfit::FitStatus::ndf_
protected

Definition at line 155 of file FitStatus.h.

◆ nFailedPoints_

int genfit::FitStatus::nFailedPoints_
protected

Number of failed TrackPoints.

Definition at line 144 of file FitStatus.h.

◆ pruneFlags_

PruneFlags genfit::FitStatus::pruneFlags_
protected

Prune flags.

Definition at line 148 of file FitStatus.h.

◆ trackHasChanged_

bool genfit::FitStatus::trackHasChanged_
protected

has anything in the Track been changed since the fit? -> fit isn't valid anymore

Definition at line 146 of file FitStatus.h.


The documentation for this class was generated from the following file: