CMS 3D CMS Logo

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 15 of file Chi2.h.

Constructor & Destructor Documentation

◆ Chi2()

Chi2::Chi2 ( TMatrixD &  m,
TMatrixD &  ym,
TMatrixD &  merrors 
)

Definition at line 3 of file Chi2.cc.

3  {
4  TMatrixD mt = m;
5  mt.T();
6  TMatrixD yt = ym;
7  yt.T();
8  TMatrixD m_leftMatrix(mt * merrors * m);
9  TMatrixD m_rightMatrix(mt * merrors * ym);
10  leftMatrix.ResizeTo(m_leftMatrix.GetNrows(), m_leftMatrix.GetNcols());
11  rightMatrix.ResizeTo(m_rightMatrix.GetNrows(), m_rightMatrix.GetNcols());
12  covariance.ResizeTo(m_leftMatrix.GetNrows(), m_leftMatrix.GetNrows());
13  rightMatrix = m_rightMatrix;
14  leftMatrix = m_leftMatrix;
15  covariance = m_leftMatrix.Invert();
16  TMatrixD m_solution(covariance * m_rightMatrix);
17  solution.ResizeTo(m_solution.GetNrows(), m_solution.GetNcols());
18  solution = m_solution;
19  TMatrixD m_Chi2((yt - m_solution.T() * mt) * merrors * (ym - m * solution));
20  myChi2 = m_Chi2(0, 0);
21  dof = ym.GetNrows() - solution.GetNrows();
22 }

References covariance, dof, leftMatrix, visualization-live-secondInstance_cfg::m, TtSemiLepEvtBuilder_cfi::mt, myChi2, rightMatrix, and solution.

◆ ~Chi2()

Chi2::~Chi2 ( )

Definition at line 24 of file Chi2.cc.

24 {}

Member Function Documentation

◆ getChi2()

double Chi2::getChi2 ( )

Definition at line 28 of file Chi2.cc.

28 { return myChi2; }

References myChi2.

◆ getCovariance()

TMatrixD & Chi2::getCovariance ( )

Definition at line 26 of file Chi2.cc.

26 { return covariance; }

References covariance.

Referenced by DTSurveyChamber::compute().

◆ getDOF()

int Chi2::getDOF ( )

Definition at line 29 of file Chi2.cc.

29 { return dof; }

References dof.

◆ getSolution()

TMatrixD & Chi2::getSolution ( )

Definition at line 27 of file Chi2.cc.

27 { return solution; }

References solution.

Referenced by DTSurveyChamber::compute().

Member Data Documentation

◆ covariance

TMatrixD Chi2::covariance
private

Definition at line 28 of file Chi2.h.

Referenced by Chi2(), and getCovariance().

◆ dof

int Chi2::dof
private

Definition at line 27 of file Chi2.h.

Referenced by Chi2(), and getDOF().

◆ leftMatrix

TMatrixD Chi2::leftMatrix
private

Definition at line 29 of file Chi2.h.

Referenced by Chi2().

◆ myChi2

double Chi2::myChi2
private

Definition at line 26 of file Chi2.h.

Referenced by Chi2(), and getChi2().

◆ rightMatrix

TMatrixD Chi2::rightMatrix
private

Definition at line 30 of file Chi2.h.

Referenced by Chi2().

◆ solution

TMatrixD Chi2::solution
private

Definition at line 31 of file Chi2.h.

Referenced by Chi2(), and getSolution().

Chi2::leftMatrix
TMatrixD leftMatrix
Definition: Chi2.h:29
Chi2::dof
int dof
Definition: Chi2.h:27
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
Chi2::covariance
TMatrixD covariance
Definition: Chi2.h:28
Chi2::myChi2
double myChi2
Definition: Chi2.h:26
Chi2::solution
TMatrixD solution
Definition: Chi2.h:31
Chi2::rightMatrix
TMatrixD rightMatrix
Definition: Chi2.h:30
TtSemiLepEvtBuilder_cfi.mt
mt
Definition: TtSemiLepEvtBuilder_cfi.py:47