1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-12-24 01:24:30 +00:00

minimiser interface improvement

This commit is contained in:
2016-04-01 21:39:49 +01:00
parent c294553991
commit ca73ef1269
4 changed files with 50 additions and 26 deletions

View File

@@ -25,8 +25,7 @@
using namespace std;
using namespace Latan;
static constexpr double initErr = 0.1;
static constexpr unsigned int maxTry = 10u;
static constexpr double initErr = 0.1;
/******************************************************************************
* MinuitMinimizer implementation *
@@ -137,28 +136,21 @@ const DVec & MinuitMinimizer::operator()(const DoubleFunction &f)
int status;
unsigned int n = 0;
if (getVerbosity() >= Verbosity::Normal)
{
cout << "========== Minuit minimization, pass #1";
cout << " ==========" << endl;
}
min->SetStrategy(0);
min->Minimize();
min->SetStrategy(2);
do
{
n++;
if (getVerbosity() >= Verbosity::Normal)
{
cout << "========== Minuit minimization, pass #" << n + 1;
cout << " ==========" << endl;
cout << " =========" << endl;
}
min->SetStrategy(2);
min->Minimize();
status = min->Status();
} while (status and (n < maxTry));
n++;
} while (status and (n < getMaxPass()));
if (getVerbosity() >= Verbosity::Normal)
{
cout << "======================================" << endl;
cout << "=================================================" << endl;
}
switch (status)
{