ROOT  6.06/09
Reference Guide
BasicMinimumError.cxx
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
11 
12 #if defined(DEBUG) || defined(WARNINGMSG)
13 #include "Minuit2/MnPrint.h"
14 #endif
15 
16 
17 namespace ROOT {
18 
19  namespace Minuit2 {
20 
21 
22 
24  // calculate Heassian: inverse of error matrix
26  int ifail = Invert(tmp);
27  if(ifail != 0) {
28 #ifdef WARNINGMSG
29  MN_INFO_MSG("BasicMinimumError: inversion fails; return diagonal matrix.");
30 #endif
32  for(unsigned int i = 0; i < fMatrix.Nrow(); i++) {
33  tmp2(i,i) = 1./fMatrix(i,i);
34  }
35  return tmp2;
36  }
37  return tmp;
38 }
39 
40  } // namespace Minuit2
41 
42 } // namespace ROOT
int Invert(LASymMatrix &)
Definition: LaInverse.cxx:22
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
MnAlgebraicSymMatrix Hessian() const
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:51
unsigned int Nrow() const
Definition: LASymMatrix.h:239
#define MN_INFO_MSG(str)
Definition: MnPrint.h:110