#include <Chi2.h>
Public Member Functions | |
Chi2 (TMatrixD &, TMatrixD &, TMatrixD &) | |
double | getChi2 () |
TMatrixD & | getCovariance () |
int | getDOF () |
TMatrixD & | getSolution () |
~Chi2 () | |
Private Attributes | |
TMatrixD | covariance |
int | dof |
TMatrixD | leftMatrix |
double | myChi2 |
TMatrixD | rightMatrix |
TMatrixD | solution |
Chi2::Chi2 | ( | TMatrixD & | m, |
TMatrixD & | ym, | ||
TMatrixD & | merrors | ||
) |
Definition at line 3 of file Chi2.cc.
References covariance, dof, leftMatrix, m, myChi2, rightMatrix, and solution.
{ TMatrixD mt = m; mt.T(); TMatrixD yt = ym; yt.T(); TMatrixD m_leftMatrix(mt*merrors*m); TMatrixD m_rightMatrix(mt*merrors*ym); leftMatrix.ResizeTo(m_leftMatrix.GetNrows(), m_leftMatrix.GetNcols()); rightMatrix.ResizeTo(m_rightMatrix.GetNrows(), m_rightMatrix.GetNcols()); covariance.ResizeTo(m_leftMatrix.GetNrows(), m_leftMatrix.GetNrows()); rightMatrix = m_rightMatrix; leftMatrix = m_leftMatrix; covariance = m_leftMatrix.Invert(); TMatrixD m_solution(covariance*m_rightMatrix); solution.ResizeTo(m_solution.GetNrows(), m_solution.GetNcols()); solution = m_solution; TMatrixD m_Chi2((yt-m_solution.T()*mt)*merrors*(ym-m*solution)); myChi2 = m_Chi2(0,0); dof = ym.GetNrows()-solution.GetNrows(); }
TMatrixD & Chi2::getCovariance | ( | ) |
Definition at line 29 of file Chi2.cc.
References covariance.
Referenced by DTSurveyChamber::compute().
{return covariance;}
TMatrixD & Chi2::getSolution | ( | ) |
Definition at line 30 of file Chi2.cc.
References solution.
Referenced by DTSurveyChamber::compute().
{return solution;}
TMatrixD Chi2::covariance [private] |
Definition at line 32 of file Chi2.h.
Referenced by Chi2(), and getCovariance().
TMatrixD Chi2::leftMatrix [private] |
double Chi2::myChi2 [private] |
TMatrixD Chi2::rightMatrix [private] |
TMatrixD Chi2::solution [private] |
Definition at line 35 of file Chi2.h.
Referenced by Chi2(), and getSolution().