42 using const_pointer =
const T *;
43 using const_reference =
const T &;
48 fData[
fSize] = prefix;
64 const_pointer begin()
const {
return fData; }
66 const_reference back()
const {
return *(end() - 1); }
69 static constexpr unsigned fMaxSize = 10;
139 const char *prev =
"";
143 if (std::strcmp(cs, prev) != 0)
174 std::ostringstream os;
177 std::string prefix = os.str();
182 if (prefix.find(s) != std::string::npos)
189 : fFcn(fcn), fEdm(edm), fNcalls(ncalls), fIter(iter)
204 os << std::setw(4) <<
x.fIter <<
" - ";
206 os <<
"FCN = " << std::setw(
WIDTH) <<
x.fFcn <<
" Edm = " << std::setw(
WIDTH) <<
x.fEdm
207 <<
" NCalls = " << std::setw(6) <<
x.fNcalls;
216 const int nrow =
vec.size();
217 for (
int i = 0; i < nrow; i++) {
229 const int pr = os.precision(8);
230 const int n = matrix.
Nrow();
231 for (
int i = 0; i <
n; i++) {
233 for (
int j = 0; j <
n; j++) {
245 os <<
"\n Pos | Name | type | Value | Error +/-";
247 int pr = os.precision();
251 os <<
"\n" << std::setw(5) << p.Number() <<
" | " << std::setw(10) << p.Name() <<
" |";
254 else if (p.IsFixed())
256 else if (p.HasLimits())
262 os << p.Value() <<
" | " << std::setw(12);
266 if (std::fabs(p.Value() - p.LowerLimit()) < eps2) {
267 os <<
" (at lower limit)";
268 }
else if (std::fabs(p.Value() - p.UpperLimit()) < eps2) {
269 os <<
" (at upper limit)";
282 const int pr = os.precision(6);
284 unsigned int n = matrix.
Nrow();
285 for (
unsigned int i = 0; i <
n; i++) {
287 for (
unsigned int j = 0; j <
n; j++) {
292 double di = matrix(i, i);
293 for (
unsigned int j = 0; j <
n; j++) {
294 double dj = matrix(j, j);
296 os << matrix(i, j) / std::sqrt(std::fabs(di * dj));
306 const int pr = os.precision(6);
320 os <<
"\n Valid : " << (state.
IsValid() ?
"yes" :
"NO") <<
"\n Function calls: " << state.
NFcn()
321 <<
"\n Minimum value : " << state.
Fval() <<
"\n Edm : " << state.
Edm()
323 <<
"\n Covariance and correlation matrix: ";
327 os <<
"matrix is not present or not valid";
329 os <<
"\n Global correlation coefficients: " << state.
GlobalCC();
339 os <<
"\n Valid : " << (min.
IsValid() ?
"yes" :
"NO") <<
"\n Function calls: " << min.
NFcn()
340 <<
"\n Minimum value : " << min.
Fval() <<
"\n Edm : " << min.
Edm()
343 os <<
"\n Internal covariance matrix: " << min.
Error().
Matrix();
349 os <<
"\n FunctionMinimum is invalid:";
351 os <<
"\n State is invalid";
353 os <<
"\n Edm is above max";
355 os <<
"\n Reached call limit";
366 os <<
"\n Minimum value : " << min.
Fval() <<
"\n Edm : " << min.
Edm()
367 <<
"\n Internal parameters:" << min.
Vec() <<
"\n Internal gradient :" << min.
Gradient().
Vec();
369 os <<
"\n Internal covariance matrix:" << min.
Error().
Matrix();
378 os <<
"MnMachinePrecision " << prec.
Eps() <<
'\n';
387 os <<
"Minos # of function calls: " << me.
NFcn() <<
'\n';
390 os <<
"Minos Error is not valid." <<
'\n';
392 os <<
"lower Minos Error is not valid." <<
'\n';
394 os <<
"upper Minos Error is not valid." <<
'\n';
396 os <<
"Minos Error is Lower limit of Parameter " << me.
Parameter() <<
"." <<
'\n';
398 os <<
"Minos Error is Upper limit of Parameter " << me.
Parameter() <<
"." <<
'\n';
400 os <<
"Minos number of function calls for Lower Error exhausted." <<
'\n';
402 os <<
"Minos number of function calls for Upper Error exhausted." <<
'\n';
404 os <<
"Minos found a new Minimum in negative direction." <<
'\n';
408 os <<
"Minos found a new Minimum in positive direction." <<
'\n';
412 int pr = os.precision();
418 <<
"| positive " <<
'\n';
419 os << std::setw(4) << me.
Parameter() << std::setw(5) <<
"||";
433 os <<
"Contours # of function calls: " << ce.
NFcn() <<
'\n';
434 os <<
"MinosError in x: " <<
'\n';
436 os <<
"MinosError in y: " <<
'\n';
440 for (
auto ipar = ce().begin(); ipar != ce().end(); ++ipar) {
441 os << ipar - ce().begin() <<
" " << (*ipar).first <<
" " << (*ipar).second <<
'\n';
448std::ostream &
operator<<(std::ostream &os,
const std::pair<double, double> &point)
450 os <<
"\t x = " << point.first <<
" y = " << point.second << std::endl;
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
const MinosError & YMinosError() const
unsigned int NFcn() const
const MinosError & XMinosError() const
const MnAlgebraicVector & Vec() const
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
const MinimumParameters & Parameters() const
const MinimumError & Error() const
bool HasReachedCallLimit() const
const MinimumState & State() const
const MnUserParameters & UserParameters() const
bool IsAboveMaxEdm() const
bool HasValidCovariance() const
Class describing a symmetric matrix of size n.
unsigned int Nrow() const
MnAlgebraicSymMatrix Matrix() const
const MnAlgebraicVector & Vec() const
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
const MinimumError & Error() const
const MnAlgebraicVector & Vec() const
bool HasCovariance() const
const FunctionGradient & Gradient() const
Class holding the result of Minos (lower and upper values) for a specific parameter.
unsigned int NFcn() const
unsigned int Parameter() const
const MnUserParameterState & UpperState() const
bool AtUpperLimit() const
bool AtLowerMaxFcn() const
const MnUserParameterState & LowerState() const
bool AtUpperMaxFcn() const
bool AtLowerLimit() const
class for global correlation coefficient
const std::vector< double > & GlobalCC() const
Sets the relative floating point (double) arithmetic precision.
double Eps() const
eps returns the smallest possible number so that 1.+eps > 1.
double Eps2() const
eps2 returns 2*sqrt(eps)
MnPlot produces a text-screen graphical output of (x,y) points, e.g.
Oneline(double fcn, double edm, int ncalls, int iter=-1)
static void ClearFilter()
static void AddFilter(const char *prefix)
static void ShowPrefixStack(bool yes)
static int SetGlobalLevel(int level)
MnPrint(const char *prefix, int level=MnPrint::GlobalLevel())
static void StreamPrefix(std::ostringstream &os)
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
unsigned int Nrow() const
class which holds the external user and/or internal Minuit representation of the parameters and error...
const MnUserParameters & Parameters() const
unsigned int NFcn() const
const MnGlobalCorrelationCoeff & GlobalCC() const
const char * Name(unsigned int) const
const MnUserCovariance & Covariance() const
int CovarianceStatus() const
bool HasCovariance() const
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
const MnMachinePrecision & Precision() const
const std::vector< ROOT::Minuit2::MinuitParameter > & Parameters() const
access to parameters (row-wise)
std::vector< std::string > gPrefixFilter
thread_local PrefixStack< const char * > gPrefixStack
thread_local int gPrintLevel
void StreamFullPrefix(std::ostringstream &os)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...