#include <fitter.h>
◆ Fitter()
4{
9}
double _q
Definition: fitter.h:12
std::vector< double > _y
Definition: fitter.h:16
double _chi2
Definition: fitter.h:14
double _errx
Definition: fitter.h:17
unsigned short _nPoints
Definition: fitter.h:18
double _m
Definition: fitter.h:11
double _r
Definition: fitter.h:13
std::vector< double > _x
Definition: fitter.h:15
double _erry
Definition: fitter.h:17
◆ ~Fitter()
◆ addPoint()
void Fitter::addPoint |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
◆ evaluateLinearFit()
bool Fitter::evaluateLinearFit |
( |
| ) |
|
29{
31 return false;
32 double s = 0, sx = 0, sy = 0, sxx = 0, syy = 0, sxy = 0;
34
35 for (
unsigned short i = 0; i <
_nPoints; i++)
36 {
40 sx += x;
41 sy += y;
42 sxx += x*x;
43 syy += y*y;
44 sxy += x*y;
45 }
46
47 _r = (
s*sxy-sx*sy)/(sqrt(
s*sxx-sx*sx)*sqrt(
s*syy-sy*sy));
54
55 double den = 1./(
s*sxx - sx*sx);
56 _m = (
s*sxy - sx*sy)*den;
57
61
62 for (
unsigned short i = 0; i <
_nPoints; i++)
63 {
67 }
68
69
70
71 return true;
72}
void d()
Definition: RecDispEX.C:381
s
Definition: check_shower.C:55
◆ getChi2()
double Fitter::getChi2 |
( |
| ) |
|
|
inline |
◆ getIntercept()
double Fitter::getIntercept |
( |
| ) |
|
|
inline |
◆ getPearsonCoefficent()
double Fitter::getPearsonCoefficent |
( |
| ) |
|
|
inline |
◆ getSlope()
double Fitter::getSlope |
( |
| ) |
|
|
inline |
◆ printStatistics()
void Fitter::printStatistics |
( |
| ) |
|
75{
77 <<
"\n y = " <<
_m <<
" * x + " <<
_q
78 <<
"\n r = " <<
_r <<
"\nchi2 = " <<
_chi2 << std::endl;
79}
◆ setErrXY()
void Fitter::setErrXY |
( |
double |
errx, |
|
|
double |
erry |
|
) |
| |
◆ _chi2
◆ _errx
◆ _erry
◆ _m
◆ _nPoints
unsigned short Fitter::_nPoints |
|
private |
◆ _q
◆ _r
◆ _x
std::vector<double> Fitter::_x |
|
private |
◆ _y
std::vector<double> Fitter::_y |
|
private |
The documentation for this class was generated from the following files:
- /home/antonio/fedra_doxygen/src/appl/rwcToEdb/fitter.h
- /home/antonio/fedra_doxygen/src/appl/rwcToEdb/fitter.cpp