6#include "CLHEP/Matrix/Matrix.h"
7#include "CLHEP/Matrix/SymMatrix.h"
17 double chisq()
const {
return _chisq; }
18 void add(
double ,
double,
double);
21 double a()
const {
return _a; }
22 double b()
const {
return _b; }
23 double z(
double s)
const {
return _a *
s + _b; }
24 double d(
double s,
double z)
const {
return z - _a *
s - _b; }
25 int nc()
const {
return _nc; }
27 inline friend std::ostream&
operator<<(std::ostream&,
const zav&);
48 _a = _b = _w = _sav = _ssav = _zav = _szav = _zzav = 0;
50 _c22 = _c21 = _c11 = _sig_inv = 0;
55 _w = _sav = _ssav = _zav = _szav = _zzav = 0;
57 _c22 = _c21 = _c11 = _sig_inv = 0;
69 _sig_inv = c->_sig_inv;
75 _w = _sav = _ssav = _zav = _szav = _zzav =
76 _sig_inv = _c11 = _c21 = _c22 = 0;
116 double sig = _ssav * _w - _sav * _sav;
119 _a = ( _szav * _w - _sav * _zav ) * _sig_inv;
120 _b = ( _ssav * _zav - _sav * _szav ) * _sig_inv;
121 _chisq = _zzav - 2 * _a * _szav - 2 * _b * _zav + _a * _a * _ssav
122 + _b * _b * _w + 2 * _a * _b * _sav;
123 _c11 = _w * _sig_inv;
124 _c21 = - _sav * _sig_inv;
125 _c22 = _ssav * _sig_inv;
128 _c11 = _c21 = _c22 = 0;
138 o <<
" zav::w=" << z._w <<
" sav=" << z._sav <<
" zav=" << z._zav
139 <<
" nc=" << z._nc <<
" chisq=" << z._chisq <<
" a=" << z._a
140 <<
" b=" << z._b <<
" c11=" << z._c11 <<
" c21=" << z._c21
141 <<
" c22=" << z._c22 <<
" sig_inv=" << z._sig_inv << std::endl;
std::ostream & operator<<(std::ostream &o, const zav &z)
friend std::ostream & operator<<(std::ostream &, const zav &)
void add(double, double, double)
double d(double s, double z) const