test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Chi2 Class Reference

#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
 

Detailed Description

Chi2 calculation in survey data for drift tube chambers

Date:
2007/04/13 18:05:35
Revision:
1.1
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, visualization-live-secondInstance_cfg::m, myChi2, rightMatrix, and solution.

3  {
4 
5  TMatrixD mt = m;
6  mt.T();
7  TMatrixD yt = ym;
8  yt.T();
9  TMatrixD m_leftMatrix(mt*merrors*m);
10  TMatrixD m_rightMatrix(mt*merrors*ym);
11  leftMatrix.ResizeTo(m_leftMatrix.GetNrows(), m_leftMatrix.GetNcols());
12  rightMatrix.ResizeTo(m_rightMatrix.GetNrows(), m_rightMatrix.GetNcols());
13  covariance.ResizeTo(m_leftMatrix.GetNrows(), m_leftMatrix.GetNrows());
14  rightMatrix = m_rightMatrix;
15  leftMatrix = m_leftMatrix;
16  covariance = m_leftMatrix.Invert();
17  TMatrixD m_solution(covariance*m_rightMatrix);
18  solution.ResizeTo(m_solution.GetNrows(), m_solution.GetNcols());
19  solution = m_solution;
20  TMatrixD m_Chi2((yt-m_solution.T()*mt)*merrors*(ym-m*solution));
21  myChi2 = m_Chi2(0,0);
22  dof = ym.GetNrows()-solution.GetNrows();
23 
24 
25 }
TMatrixD covariance
Definition: Chi2.h:32
TMatrixD rightMatrix
Definition: Chi2.h:34
TMatrixD solution
Definition: Chi2.h:35
double myChi2
Definition: Chi2.h:30
TMatrixD leftMatrix
Definition: Chi2.h:33
int dof
Definition: Chi2.h:31
Chi2::~Chi2 ( )

Definition at line 27 of file Chi2.cc.

27 {}

Member Function Documentation

double Chi2::getChi2 ( )

Definition at line 31 of file Chi2.cc.

References myChi2.

31 {return myChi2;}
double myChi2
Definition: Chi2.h:30
TMatrixD & Chi2::getCovariance ( )

Definition at line 29 of file Chi2.cc.

References covariance.

Referenced by DTSurveyChamber::compute().

29 {return covariance;}
TMatrixD covariance
Definition: Chi2.h:32
int Chi2::getDOF ( )

Definition at line 32 of file Chi2.cc.

References dof.

32 {return dof;}
int dof
Definition: Chi2.h:31
TMatrixD & Chi2::getSolution ( )

Definition at line 30 of file Chi2.cc.

References solution.

Referenced by DTSurveyChamber::compute().

30 {return solution;}
TMatrixD solution
Definition: Chi2.h:35

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