10#ifndef ROOT_Minuit2_MinimumError
11#define ROOT_Minuit2_MinimumError
56 if (fPtr->fHessian.size() == 0)
57 fPtr->fHessian = InvertMatrix(fPtr->fMatrix);
58 return fPtr->fHessian;
66 MnPrint print(
"MinimumError::Invert");
67 print.
Warn(
"Inversion fails; return diagonal matrix");
68 for (
unsigned int i = 0; i <
matrix.Nrow(); ++i)
69 for (
unsigned int j = 0;
j <= i;
j++)
70 tmp(i,
j) = i ==
j ? 1. /
matrix(i, i) : 0;
79 double Dcovar()
const {
return fPtr->fDCovar; }
82 bool IsValid()
const {
return IsAvailable() && (IsPosDef() || IsMadePosDef() || IsNotPosDef()); }
83 bool IsAccurate()
const {
return IsPosDef() && Dcovar() < 0.1; }
87 bool IsNotPosDef()
const {
return GetStatus() == MnNotPosDef; }
88 bool HesseFailed()
const {
return GetStatus() == MnHesseFailed; }
89 bool InvertFailed()
const {
return GetStatus() == MnInvertFailed; }
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Class describing a symmetric matrix of size n.
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
const MnAlgebraicSymMatrix & Hessian() const
MnAlgebraicSymMatrix Matrix() const
std::shared_ptr< Data > fPtr
static MnAlgebraicSymMatrix InvertMatrix(const MnAlgebraicSymMatrix &matrix)
MinimumError(const MnAlgebraicSymMatrix &mat, const MnAlgebraicSymMatrix &hess, double dcov)
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 &)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
MnAlgebraicSymMatrix fHessian
MnAlgebraicSymMatrix fMatrix