Logo ROOT   6.12/07
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 #include "Minuit2/MnMatrix.h"
13 
14 #if defined(DEBUG) || defined(WARNINGMSG)
15 #include "Minuit2/MnPrint.h"
16 #endif
17 
18 
19 namespace ROOT {
20 
21  namespace Minuit2 {
22 
23 
24 
26  // calculate Heassian: inverse of error matrix
28  int ifail = Invert(tmp);
29  if(ifail != 0) {
30 #ifdef WARNINGMSG
31  MN_INFO_MSG("BasicMinimumError: inversion fails; return diagonal matrix.");
32 #endif
34  for(unsigned int i = 0; i < fMatrix.Nrow(); i++) {
35  tmp2(i,i) = 1./fMatrix(i,i);
36  }
37  return tmp2;
38  }
39  return tmp;
40 }
41 
42  } // namespace Minuit2
43 
44 } // namespace ROOT
int Invert(LASymMatrix &)
Definition: LaInverse.cxx:22
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:51
#define MN_INFO_MSG(str)
Definition: MnPrint.h:110
unsigned int Nrow() const
Definition: LASymMatrix.h:239
MnAlgebraicSymMatrix Hessian() const