10#ifndef ROOT_Minuit2_MinimumError
11#define ROOT_Minuit2_MinimumError
55 return InvertMatrix(fPtr->fMatrix);
63 MnPrint print(
"MinimumError::Invert");
64 print.
Warn(
"Inversion fails; return diagonal matrix");
65 for (
unsigned int i = 0; i < matrix.
Nrow(); ++i)
66 for (
unsigned int j = 0; j <= i; j++)
67 tmp(i, j) = i == j ? 1. / matrix(i, i) : 0;
73 return InvertMatrix(matrix, ifail);
76 double Dcovar()
const {
return fPtr->fDCovar; }
79 bool IsValid()
const {
return IsAvailable() && (IsPosDef() || IsMadePosDef() || IsNotPosDef()); }
80 bool IsAccurate()
const {
return IsPosDef() && Dcovar() < 0.1; }
84 bool IsNotPosDef()
const {
return GetStatus() == MnNotPosDef; }
85 bool HesseFailed()
const {
return GetStatus() == MnHesseFailed; }
86 bool InvertFailed()
const {
return GetStatus() == MnInvertFailed; }
97 std::shared_ptr<Data>
fPtr;
Class describing a symmetric matrix of size n.
unsigned int Nrow() const
MinimumError keeps the inv.
bool HasReachedCallLimit() const
static MnAlgebraicSymMatrix InvertMatrix(const MnAlgebraicSymMatrix &matrix, int &ifail)
MinimumError(const MnAlgebraicSymMatrix &mat, Status status)
MinimumError(unsigned int n)
const MnAlgebraicSymMatrix & InvHessian() const
MnAlgebraicSymMatrix Matrix() const
MnAlgebraicSymMatrix Hessian() const
std::shared_ptr< Data > fPtr
static MnAlgebraicSymMatrix InvertMatrix(const MnAlgebraicSymMatrix &matrix)
MinimumError(const MnAlgebraicSymMatrix &mat, double dcov)
bool IsMadePosDef() const
bool InvertFailed() const
Force the covariance matrix to be positive defined by adding extra terms in the diagonal.
void Warn(const Ts &... args)
int Invert(LASymMatrix &)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
MnAlgebraicSymMatrix fMatrix