28constexpr int PRECISION = 10;
29constexpr int WIDTH = PRECISION + 7;
137 const char *prev =
"";
141 if (std::strcmp(
cs, prev) != 0)
172 std::ostringstream os;
175 std::string prefix = os.str();
180 if (prefix.find(s) != std::string::npos)
187 : fFcn(
fcn), fEdm(edm), fNcalls(
ncalls), fIter(iter)
202 os << std::setw(4) <<
x.fIter <<
" - ";
203 const int pr = os.precision(PRECISION);
204 os <<
"FCN = " << std::setw(
WIDTH) <<
x.fFcn <<
" Edm = " << std::setw(
WIDTH) <<
x.fEdm
205 <<
" NCalls = " << std::setw(6) <<
x.fNcalls;
213 os <<
"\n Pos | Name | type | Value | Error +/-";
215 int pr = os.precision();
219 os <<
"\n" << std::setw(5) <<
p.Number() <<
" | " << std::setw(10) <<
p.Name() <<
" |";
222 else if (
p.IsFixed())
224 else if (
p.HasLimits())
228 os.precision(PRECISION);
230 os <<
p.Value() <<
" | " << std::setw(12);
234 if (std::fabs(
p.Value() -
p.LowerLimit()) <
eps2) {
235 os <<
" (at lower limit)";
236 }
else if (std::fabs(
p.Value() -
p.UpperLimit()) <
eps2) {
237 os <<
" (at upper limit)";
250 const int pr = os.precision(6);
252 unsigned int n =
matrix.Nrow();
253 for (
unsigned int i = 0; i <
n; i++) {
255 for (
unsigned int j = 0;
j <
n;
j++) {
261 for (
unsigned int j = 0;
j <
n;
j++) {
264 os <<
matrix(i,
j) / std::sqrt(std::fabs(
di *
dj));
274 const int pr = os.precision(6);
275 for (
auto &&
x :
coeff.GlobalCC()) {
287 const int pr = os.precision(PRECISION);
288 os <<
"\n Valid : " << (state.
IsValid() ?
"yes" :
"NO") <<
"\n Function calls: " << state.
NFcn()
289 <<
"\n Minimum value : " << state.
Fval() <<
"\n Edm : " << state.
Edm()
291 <<
"\n Covariance and correlation matrix: ";
295 os <<
"matrix is not present or not valid";
297 os <<
"\n Global correlation coefficients: " << state.
GlobalCC();
306 const int pr = os.precision(PRECISION);
307 os <<
"\n Valid : " << (min.IsValid() ?
"yes" :
"NO") <<
"\n Function calls: " << min.NFcn()
308 <<
"\n Minimum value : " << min.Fval() <<
"\n Edm : " << min.Edm()
309 <<
"\n Internal parameters: " << min.Parameters().Vec();
310 if (min.HasValidCovariance())
311 os <<
"\n Internal covariance matrix: " << min.Error().Matrix();
312 os <<
"\n External parameters: " << min.UserParameters();
316 if (!min.IsValid()) {
317 os <<
"\n FunctionMinimum is invalid:";
318 if (!min.State().IsValid())
319 os <<
"\n State is invalid";
320 if (min.IsAboveMaxEdm())
321 os <<
"\n Edm is above max";
322 if (min.HasReachedCallLimit())
323 os <<
"\n Reached call limit";
333 const int pr = os.precision(PRECISION);
334 os <<
"\n Minimum value : " << min.Fval() <<
"\n Edm : " << min.Edm()
335 <<
"\n Internal parameters:" << min.Vec() <<
"\n Internal gradient :" << min.Gradient().Vec();
336 if (min.HasCovariance())
337 os <<
"\n Internal covariance matrix:" << min.Error().Matrix();
345 int pr = os.precision(PRECISION);
346 os <<
"MnMachinePrecision " <<
prec.Eps() <<
'\n';
355 os <<
"Minos # of function calls: " << me.
NFcn() <<
'\n';
358 os <<
"Minos Error is not valid." <<
'\n';
360 os <<
"lower Minos Error is not valid." <<
'\n';
362 os <<
"upper Minos Error is not valid." <<
'\n';
364 os <<
"Minos Error is Lower limit of Parameter " << me.
Parameter() <<
"." <<
'\n';
366 os <<
"Minos Error is Upper limit of Parameter " << me.
Parameter() <<
"." <<
'\n';
368 os <<
"Minos number of function calls for Lower Error exhausted." <<
'\n';
370 os <<
"Minos number of function calls for Upper Error exhausted." <<
'\n';
372 os <<
"Minos found a new Minimum in negative direction." <<
'\n';
376 os <<
"Minos found a new Minimum in positive direction." <<
'\n';
380 int pr = os.precision();
386 <<
"| positive " <<
'\n';
387 os << std::setw(4) << me.
Parameter() << std::setw(5) <<
"||";
389 os << std::setprecision(PRECISION) << std::setw(
WIDTH) << me.
Min() <<
" ||" << std::setprecision(PRECISION)
401 os <<
"Contours # of function calls: " <<
ce.NFcn() <<
'\n';
402 os <<
"MinosError in x: " <<
'\n';
403 os <<
ce.XMinosError() <<
'\n';
404 os <<
"MinosError in y: " <<
'\n';
405 os <<
ce.YMinosError() <<
'\n';
408 for (
auto ipar =
ce().begin(); ipar !=
ce().end(); ++ipar) {
409 os << ipar -
ce().begin() <<
" " << (*ipar).first <<
" " << (*ipar).second <<
'\n';
416std::ostream &
operator<<(std::ostream &os,
const std::pair<double, double> &point)
418 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
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
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 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 LAVector &)
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...