54 if (endline) os << std::endl;
63void MnPrint::PrintState(std::ostream & os,
double fval,
double edm,
int ncalls,
const char * msg,
int iter) {
66 if (iter>=0) os << std::setw(3) << iter;
69 os <<
" - FCN = " << std::setw(
width) << fval;
71 os <<
" Edm = " << std::setw(12) << edm <<
" NCalls = " << std::setw(6) << ncalls;
78 os <<
"LAVector parameters:" << std::endl;
81 int nrow =
vec.size();
82 for (
int i = 0; i < nrow; i++) {
84 os <<
vec(i) << std::endl;
93 os <<
"LASymMatrix parameters:" << std::endl;
94 int pr = os.precision(8);
97 int n = matrix.
Nrow();
98 for (
int i = 0; i <
n; i++) {
99 for (
int j = 0; j <
n; j++) {
100 os.width(15); os << matrix(i,j);
113 os <<
"# ext. |" <<
"| Name |" <<
"| type |" <<
"| Value |" <<
"| Error +/- " << std::endl;
116 int pr = os.precision();
118 bool atLoLim =
false;
119 bool atHiLim =
false;
120 for(std::vector<MinuitParameter>::const_iterator ipar = par.
Parameters().begin(); ipar != par.
Parameters().end(); ++ipar) {
121 os << std::setw(4) << (*ipar).Number() << std::setw(5) <<
"||";
122 os << std::setw(10) << (*ipar).Name() << std::setw(3) <<
"||";
123 if((*ipar).IsConst()) {
124 os <<
" const ||" << std::setprecision(
PRECISION) << std::setw(
WIDTH) << (*ipar).Value() <<
" ||" << std::endl;
125 }
else if((*ipar).IsFixed()) {
126 os <<
" fixed ||" << std::setprecision(
PRECISION) << std::setw(
WIDTH) << (*ipar).Value() <<
" ||" << std::endl;
127 }
else if((*ipar).HasLimits()) {
128 if((*ipar).Error() > 0.) {
129 os <<
" limited ||" << std::setprecision(
PRECISION) << std::setw(
WIDTH) << (*ipar).Value();
138 os <<
" ||" << std::setw(12) << (*ipar).Error() << std::endl;
140 os <<
" free ||" << std::setprecision(
PRECISION) << std::setw(
WIDTH) << (*ipar).Value() <<
" ||" << std::setw(12) <<
"no" << std::endl;
142 if((*ipar).Error() > 0.)
143 os <<
" free ||" << std::setprecision(
PRECISION) << std::setw(
WIDTH) << (*ipar).Value() <<
" ||" << std::setw(12) << (*ipar).Error() << std::endl;
145 os <<
" free ||" << std::setprecision(
PRECISION) << std::setw(
WIDTH) << (*ipar).Value() <<
" ||" << std::setw(12) <<
"no" << std::endl;
150 if(atLoLim) os <<
"* Parameter is at Lower limit" << std::endl;
151 if(atHiLim) os <<
"** Parameter is at Upper limit" << std::endl;
162 os <<
"MnUserCovariance: " << std::endl;
163 int pr = os.precision(6);
166 unsigned int n = matrix.
Nrow();
167 for (
unsigned int i = 0; i <
n; i++) {
168 for (
unsigned int j = 0; j <
n; j++) {
169 os.width(13); os << matrix(i,j);
176 os <<
"MnUserCovariance Parameter correlations: " << std::endl;
180 unsigned int n = matrix.
Nrow();
181 for (
unsigned int i = 0; i <
n; i++) {
182 double di = matrix(i,i);
183 for (
unsigned int j = 0; j <
n; j++) {
184 double dj = matrix(j,j);
185 os.width(13); os << matrix(i,j)/
sqrt(
fabs(di*dj));
199 os <<
"MnGlobalCorrelationCoeff: " << std::endl;
200 int pr = os.precision(6);
203 for (
unsigned int i = 0; i < coeff.
GlobalCC().size(); i++) {
204 os.width(13); os << coeff.
GlobalCC()[i];
219 os <<
"WARNING: MnUserParameterState is not valid."<<std::endl;
224 os <<
"# of function calls: "<<state.
NFcn()<<std::endl;
225 os <<
"function Value: " << state.
Fval()<<std::endl;
226 os <<
"expected distance to the Minimum (edm): " << state.
Edm()<<std::endl;
227 os <<
"external parameters: "<<state.
Parameters()<<std::endl;
230 os <<
"covariance matrix: "<<state.
Covariance()<<std::endl;
232 os <<
"covariance matrix is not present or not valid "<<std::endl;
234 os <<
"global correlation coefficients : "<<state.
GlobalCC()<<std::endl;
237 os <<
"WARNING: MnUserParameterState is not valid."<<std::endl;
249 os <<
"WARNING: Minuit did not converge."<<std::endl;
252 os <<
"Minuit did successfully converge."<<std::endl;
256 os <<
"# of function calls: "<<min.
NFcn()<<std::endl;
257 os <<
"minimum function Value: " << min.
Fval()<<std::endl;
258 os <<
"minimum edm: " << min.
Edm()<<std::endl;
259 os <<
"minimum internal state vector: "<<min.
Parameters().
Vec()<<std::endl;
261 os <<
"minimum internal covariance matrix: "<<min.
Error().
Matrix()<<std::endl;
268 os <<
"WARNING: FunctionMinimum is invalid: " << std::endl;
270 os <<
"\t State is invalid" << std::endl;
272 os <<
"\t Edm is above max" << std::endl;
274 os <<
"\t Reached call limit" << std::endl;
289 os <<
"minimum function Value: " << min.
Fval()<<std::endl;
290 os <<
"minimum edm: " << min.
Edm()<<std::endl;
291 os <<
"minimum internal state vector: "<<min.
Vec()<<std::endl;
292 os <<
"minimum internal Gradient vector: "<<min.
Gradient().
Vec()<<std::endl;
294 os <<
"minimum internal covariance matrix: "<<min.
Error().
Matrix()<<std::endl;
307 os <<
"current machine precision is set to "<<prec.
Eps()<<std::endl;
319 os <<
"Minos # of function calls: "<<me.
NFcn()<<std::endl;
322 os <<
"Minos Error is not valid." <<std::endl;
324 os <<
"lower Minos Error is not valid." <<std::endl;
326 os <<
"upper Minos Error is not valid." <<std::endl;
328 os <<
"Minos Error is Lower limit of Parameter "<<me.
Parameter()<<
"." <<std::endl;
330 os <<
"Minos Error is Upper limit of Parameter "<<me.
Parameter()<<
"." <<std::endl;
332 os <<
"Minos number of function calls for Lower Error exhausted."<<std::endl;
334 os <<
"Minos number of function calls for Upper Error exhausted."<<std::endl;
336 os <<
"Minos found a new Minimum in negative direction."<<std::endl;
340 os <<
"Minos found a new Minimum in positive direction."<<std::endl;
344 int pr = os.precision();
346 os <<
"# ext. |" <<
"| Name |" <<
"| Value@min |" <<
"| negative |" <<
"| positive " << std::endl;
347 os << std::setw(4) << me.
Parameter() << std::setw(5) <<
"||";
360 os <<
"Contours # of function calls: "<<ce.
NFcn()<<std::endl;
361 os <<
"MinosError in x: "<<std::endl;
363 os <<
"MinosError in y: "<<std::endl;
367 for(std::vector<std::pair<double,double> >::const_iterator ipar = ce().begin(); ipar != ce().end(); ++ipar) {
368 os << ipar - ce().begin() <<
" "<< (*ipar).first <<
" "<< (*ipar).second <<std::endl;
include TDocParser_001 C image html pict1_TDocParser_001 png width
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.
static void PrintState(std::ostream &os, const MinimumState &state, const char *msg, int iter=-1)
static void PrintFcn(std::ostream &os, double value, bool endline=true)
static int SetLevel(int level)
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)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
std::ostream & operator<<(std::ostream &, const FunctionMinimum &)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...