30constexpr int PRECISION = 10;
31constexpr int WIDTH = PRECISION + 7;
152 const char *prev =
"";
156 if (std::strcmp(
cs, prev) != 0)
187 std::ostringstream os;
190 std::string prefix = os.str();
195 if (prefix.find(s) != std::string::npos)
202 : fFcn(
fcn), fEdm(edm), fNcalls(
ncalls), fIter(iter)
217 os << std::setw(4) <<
x.fIter <<
" - ";
218 const int pr = os.precision(PRECISION);
219 os <<
"FCN = " << std::setw(
WIDTH) <<
x.fFcn <<
" Edm = " << std::setw(
WIDTH) <<
x.fEdm
220 <<
" NCalls = " << std::setw(6) <<
x.fNcalls;
228 const int pr = os.precision(PRECISION);
229 const unsigned int nrow =
vec.size();
232 for (
unsigned int i = 0; i <
np; i++) {
249 const int pr = os.precision(8);
252 for (
unsigned int i = 0; i <
nrow; i++) {
263 for (
unsigned int j = 0;
j <
nrow;
j++) {
281 os <<
"\n Pos | Name | type | Value | Error +/-";
283 int pr = os.precision();
287 os <<
"\n" << std::setw(5) <<
p.Number() <<
" | " << std::setw(10) <<
p.Name() <<
" |";
290 else if (
p.IsFixed())
292 else if (
p.HasLimits())
296 os.precision(PRECISION);
298 os <<
p.Value() <<
" | " << std::setw(12);
302 if (std::fabs(
p.Value() -
p.LowerLimit()) <
eps2) {
303 os <<
" (at lower limit)";
304 }
else if (std::fabs(
p.Value() -
p.UpperLimit()) <
eps2) {
305 os <<
" (at upper limit)";
318 const int pr = os.precision(6);
320 unsigned int n =
matrix.Nrow();
321 for (
unsigned int i = 0; i <
n; i++) {
323 for (
unsigned int j = 0;
j <
n;
j++) {
329 for (
unsigned int j = 0;
j <
n;
j++) {
332 os <<
matrix(i,
j) / std::sqrt(std::fabs(
di *
dj));
342 const int pr = os.precision(6);
343 for (
auto &&
x :
coeff.GlobalCC()) {
355 const int pr = os.precision(PRECISION);
356 os <<
"\n Valid : " << (state.
IsValid() ?
"yes" :
"NO") <<
"\n Function calls: " << state.
NFcn()
357 <<
"\n Minimum value : " << state.
Fval() <<
"\n Edm : " << state.
Edm()
359 <<
"\n Covariance and correlation matrix: ";
363 os <<
"matrix is not present or not valid";
365 os <<
"\n Global correlation coefficients: " << state.
GlobalCC();
374 const int pr = os.precision(PRECISION);
375 os <<
"\n Valid : " << (min.IsValid() ?
"yes" :
"NO") <<
"\n Function calls: " << min.NFcn()
376 <<
"\n Minimum value : " << min.Fval() <<
"\n Edm : " << min.Edm()
377 <<
"\n Internal parameters: " << min.Parameters().Vec();
378 if (min.HasValidCovariance())
379 os <<
"\n Internal covariance matrix: " << min.Error().Matrix();
380 os <<
"\n External parameters: " << min.UserParameters();
384 if (!min.IsValid()) {
385 os <<
"\n FunctionMinimum is invalid:";
386 if (!min.State().IsValid())
387 os <<
"\n State is invalid";
388 if (min.IsAboveMaxEdm())
389 os <<
"\n Edm is above max";
390 if (min.HasReachedCallLimit())
391 os <<
"\n Reached call limit";
401 const int pr = os.precision(PRECISION);
402 os <<
"\n Minimum value : " << min.Fval() <<
"\n Edm : " << min.Edm()
403 <<
"\n Internal parameters:" << min.Vec() <<
"\n Internal gradient :" << min.Gradient().Vec();
404 if (min.HasCovariance())
405 os <<
"\n Internal covariance matrix:" << min.Error().Matrix();
413 int pr = os.precision(PRECISION);
414 os <<
"MnMachinePrecision " <<
prec.Eps() <<
'\n';
423 os <<
"Minos # of function calls: " << me.
NFcn() <<
'\n';
426 os <<
"Minos Error is not valid." <<
'\n';
428 os <<
"lower Minos Error is not valid." <<
'\n';
430 os <<
"upper Minos Error is not valid." <<
'\n';
432 os <<
"Minos Error is Lower limit of Parameter " << me.
Parameter() <<
"." <<
'\n';
434 os <<
"Minos Error is Upper limit of Parameter " << me.
Parameter() <<
"." <<
'\n';
436 os <<
"Minos number of function calls for Lower Error exhausted." <<
'\n';
438 os <<
"Minos number of function calls for Upper Error exhausted." <<
'\n';
440 os <<
"Minos found a new Minimum in negative direction." <<
'\n';
444 os <<
"Minos found a new Minimum in positive direction." <<
'\n';
448 int pr = os.precision();
454 <<
"| positive " <<
'\n';
455 os << std::setw(4) << me.
Parameter() << std::setw(5) <<
"||";
457 os << std::setprecision(PRECISION) << std::setw(
WIDTH) << me.
Min() <<
" ||" << std::setprecision(PRECISION)
469 os <<
"Contours # of function calls: " <<
ce.NFcn() <<
'\n';
470 os <<
"MinosError in x: " <<
'\n';
471 os <<
ce.XMinosError() <<
'\n';
472 os <<
"MinosError in y: " <<
'\n';
473 os <<
ce.YMinosError() <<
'\n';
476 for (
auto ipar =
ce().begin(); ipar !=
ce().end(); ++ipar) {
477 os << ipar -
ce().begin() <<
" " << (*ipar).first <<
" " << (*ipar).second <<
'\n';
484std::ostream &
operator<<(std::ostream &os,
const std::pair<double, double> &point)
486 os <<
"\t x = " << point.first <<
" y = " << point.second << std::endl;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
winID h TVirtualViewer3D TVirtualGLPainter char TVirtualGLPainter plot
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
Class describing a symmetric matrix of size n.
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
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
Sets the relative floating point (double) arithmetic precision.
MnPlot produces a text-screen graphical output of (x,y) points, e.g.
Oneline(double fcn, double edm, int ncalls, int iter=-1)
static int SetMaxNP(int value)
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...
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 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)
const_reference back() const
const T & const_reference
const_pointer end() const
static constexpr unsigned fMaxSize
const_pointer begin() const
std::vector< std::string > gPrefixFilter
std::ostream & operator<<(std::ostream &, const FunctionMinimum &)
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...