CMS 3D CMS Logo

Public Member Functions | Private Attributes

Chi2 Class Reference

#include <Chi2.h>

List of all members.

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

Detailed Description

Chi2 calculation in survey data for drift tube chambers

Date:
2007/04/17 07:45:02
Revision:
1.2
Author:
Pablo Martinez Ruiz del Arbol

Definition at line 17 of file Chi2.h.


Constructor & Destructor Documentation

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();


}
Chi2::~Chi2 ( )

Definition at line 27 of file Chi2.cc.

{}

Member Function Documentation

double Chi2::getChi2 ( )

Definition at line 31 of file Chi2.cc.

References myChi2.

{return myChi2;}
TMatrixD & Chi2::getCovariance ( )

Definition at line 29 of file Chi2.cc.

References covariance.

Referenced by DTSurveyChamber::compute().

{return covariance;}
int Chi2::getDOF ( )

Definition at line 32 of file Chi2.cc.

References dof.

{return dof;}
TMatrixD & Chi2::getSolution ( )

Definition at line 30 of file Chi2.cc.

References solution.

Referenced by DTSurveyChamber::compute().

{return solution;}

Member Data Documentation

TMatrixD Chi2::covariance [private]

Definition at line 32 of file Chi2.h.

Referenced by Chi2(), and getCovariance().

int Chi2::dof [private]

Definition at line 31 of file Chi2.h.

Referenced by Chi2(), and getDOF().

TMatrixD Chi2::leftMatrix [private]

Definition at line 33 of file Chi2.h.

Referenced by Chi2().

double Chi2::myChi2 [private]

Definition at line 30 of file Chi2.h.

Referenced by Chi2(), and getChi2().

TMatrixD Chi2::rightMatrix [private]

Definition at line 34 of file Chi2.h.

Referenced by Chi2().

TMatrixD Chi2::solution [private]

Definition at line 35 of file Chi2.h.

Referenced by Chi2(), and getSolution().