From 5787cf0544decd6fb6f7d645f3b26c31c6678568 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Thu, 3 Apr 2014 10:04:59 +0200 Subject: [PATCH] Minuit message for invalid minimisation --- lib/MinuitMinimizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/MinuitMinimizer.cpp b/lib/MinuitMinimizer.cpp index d9b3bf0..bc63f61 100644 --- a/lib/MinuitMinimizer.cpp +++ b/lib/MinuitMinimizer.cpp @@ -96,6 +96,10 @@ const DVec & MinuitMinimizer::operator()(const DoubleFunction &f) MnMigrad migrad2(minuitF, parameters, 2); min = migrad2(); + if (!min.IsValid()) + { + LATAN_WARNING("MINUIT library reported that minimization result is not valid"); + } for (unsigned int i = 0; i < x.size(); ++i) { x(i) = min.UserParameters().Value(i);