A structure to hold linear fit statistics.
More...
#include <Fit2D.h>
|
| | LinStats () |
| | Constructor.
|
| void | clear () |
| | Clear the statistics before a new fit.
|
| void | eval (double fX, double &fY, double &fYerr) const |
| | Evaluate a point along the fitted line.
|
| std::string | toString () const |
| | Get a string representation of the fit parameters.
|
|
| int | n |
| | Number of points.
|
| double | fIntercept |
| | Intercept of the fit line.
|
| double | fSlope |
| | Slope of the fit line.
|
| double | fCov [2][2] |
| | The parameter covariance matrix.
|
| double | fChi2 |
| | Chi-squared of the fit.
|
A structure to hold linear fit statistics.
Definition at line 76 of file Fit2D.h.
◆ LinStats()
| Muon::Fit2D::LinStats::LinStats |
( |
| ) |
|
|
inline |
Constructor.
Definition at line 163 of file Fit2D.h.
163 :
168 {
170 }
double fCov[2][2]
The parameter covariance matrix.
double fIntercept
Intercept of the fit line.
double fChi2
Chi-squared of the fit.
double fSlope
Slope of the fit line.
◆ clear()
| void Muon::Fit2D::LinStats::clear |
( |
| ) |
|
|
inline |
Clear the statistics before a new fit.
Definition at line 172 of file Fit2D.h.
◆ eval()
| void Muon::Fit2D::LinStats::eval |
( |
double | fX, |
|
|
double & | fY, |
|
|
double & | fYerr ) const |
Evaluate a point along the fitted line.
- Parameters
-
| fX | The X value of the point to project |
| fY | [output] The projected Y value |
| fYerr | [output] The error of the projected Y value |
Definition at line 26 of file Fit2D.cxx.
◆ toString()
| std::string Muon::Fit2D::LinStats::toString |
( |
| ) |
const |
Get a string representation of the fit parameters.
Definition at line 31 of file Fit2D.cxx.
32{
33 std::ostringstream oss;
36 <<
", Cov=[[" <<
fCov[0][0] <<
"," <<
fCov[0][1] <<
"],["
37 <<
fCov[1][0] <<
"," <<
fCov[1][1] <<
"]]"
38 <<
", Chi2=" <<
fChi2;
39
40 return oss.str();
41}
◆ fChi2
| double Muon::Fit2D::LinStats::fChi2 |
Chi-squared of the fit.
Definition at line 82 of file Fit2D.h.
◆ fCov
| double Muon::Fit2D::LinStats::fCov[2][2] |
The parameter covariance matrix.
Definition at line 81 of file Fit2D.h.
◆ fIntercept
| double Muon::Fit2D::LinStats::fIntercept |
Intercept of the fit line.
Definition at line 79 of file Fit2D.h.
◆ fSlope
| double Muon::Fit2D::LinStats::fSlope |
Slope of the fit line.
Definition at line 80 of file Fit2D.h.
| int Muon::Fit2D::LinStats::n |
Number of points.
Definition at line 78 of file Fit2D.h.
The documentation for this struct was generated from the following files: