|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef MUONLINEARSEGMENTMAKERUTILITIES_FIT2D_H
6 #define MUONLINEARSEGMENTMAKERUTILITIES_FIT2D_H
8 #include "GaudiKernel/MsgStream.h"
100 void eval(
double fX,
double& fY,
double& fYerr)
const;
140 nIdx(0), fX(0.0), fY(0.0), fW(1.0), fChi2(0.0), bExclude(false), pData(NULL)
145 nIdx(nIdx), fX(fX), fY(fY), fW(fW), fChi2(0.0), bExclude(false), pData(pData)
160 fMean = fStd = fChi2 = 0.0;
175 fIntercept = fSlope = fChi2 = 0.0;
176 memset(fCov, 0,
sizeof(fCov));
185 #endif //MUONLINEARSEGMENTMAKERUTILITIES_FIT2D_H
static void fitLine(PointArray &points, double fExclChi2, bool bDump, LinStats &stats)
Fit a straight line through the given points.
A 2D linear regression calculator.
void clear()
Clear the statistics before a new fit.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Point()
Default constructor.
double fSlope
Slope of the fit line.
int nIdx
Index of the point in the original list.
double fY
The Y coordinate.
A structure to hold linear fit statistics.
double fCov[2][2]
The parameter covariance matrix.
void eval(double fX, double &fY, double &fYerr) const
Evaluate a point along the fitted line.
A 2D point used in statistics and fit.
static void fitPoint(PointArray &points, double fExclChi2, bool bDump, SimpleStats &stats)
Estimate a new point from the given points.
double fChi2
Contribution to the Chi2.
const void * pData
Any external data provided by the caller.
bool bExclude
If set, exclude the point from all calculations.
std::vector< Point * > PointArray
A vector of points.
std::string toString() const
Get a string representation of the fit parameters.
static void SimpleStatistics(const PointArray &points, SimpleStats &stats)
Calculate simple statistics for the Y values of a set of points.
std::string toString() const
double fChi2
Chi-squared of the fit.
double fIntercept
Intercept of the fit line.
double fX
The X coordinate.