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;
static void fitPoint(PointArray &points, double fExclChi2, bool bDump, SimpleStats &stats)
Estimate a new point from the given points.
static void fitLine(PointArray &points, double fExclChi2, bool bDump, LinStats &stats)
Fit a straight line through the given points.
static void SimpleStatistics(const PointArray &points, SimpleStats &stats)
Calculate simple statistics for the Y values of a set of points.
std::vector< Point * > PointArray
A vector of points.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Point(double x_, double y_, double slope_)
Single point and slope to next point.
A structure to hold linear fit statistics.
void eval(double fX, double &fY, double &fYerr) const
Evaluate a point along the fitted line.
void clear()
Clear the statistics before a new fit.
double fCov[2][2]
The parameter covariance matrix.
std::string toString() const
Get a string representation of the fit parameters.
double fIntercept
Intercept of the fit line.
double fChi2
Chi-squared of the fit.
double fSlope
Slope of the fit line.
bool bExclude
If set, exclude the point from all calculations.
const void * pData
Any external data provided by the caller.
Point()
Default constructor.
double fX
The X coordinate.
double fChi2
Contribution to the Chi2.
int nIdx
Index of the point in the original list.
double fY
The Y coordinate.
std::string toString() const