//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class MatrixChi2 // see MatrixChi2.hh for details // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM (original author) // // //----------------------------------------------------------- // Panda Headers ---------------------- // This Class' Header ------------------ #include "MatrixChi2.h" // C/C++ Headers ---------------------- // Collaborating Class Headers -------- // Class Member definitions ----------- double MatrixChi2::operator()(const TMatrixT& x1, const TMatrixT& cov1, const TMatrixT& x2, const TMatrixT& cov2) { TMatrixT d=x1-x2; TMatrixT C=cov1+cov2; double det=0; C.Invert(&det); TMatrixT chisq=d.T()*(C*d); return chisq[0][0]; }