23 : fFCN(fcn), fMinimum(min), fStrategy(
MnStrategy(stra))
29 if (fcn.
Up() != min.
Up()) {
30 print.
Warn(
"MnMinos: UP value has changed, need to update FunctionMinimum class");
35 : fFCN(fcn), fMinimum(min), fStrategy(stra)
41 if (fcn.
Up() != min.
Up()) {
42 print.
Warn(
"UP value has changed, need to update FunctionMinimum class");
46std::pair<double, double>
MnMinos::operator()(
unsigned int par,
unsigned int maxcalls,
double toler)
const
53double MnMinos::Lower(
unsigned int par,
unsigned int maxcalls,
double toler)
const
64double MnMinos::Upper(
unsigned int par,
unsigned int maxcalls,
double toler)
const
83 print.
Debug(
"Function calls to find upper error", up.
NFcn());
87 print.
Debug(
"Function calls to find lower error", lo.
NFcn());
101 assert(direction == 1 || direction == -1);
105 print.
Info(
"Determination of", direction == 1 ?
"upper" :
"lower",
"Minos error for parameter", par);
113 maxcalls = 2 * (nvar + 1) * (200 + 100 * nvar + 5 * nvar * nvar);
116 std::vector<unsigned int> para(1, par);
119 double err = direction * upar.
Error(par);
120 double val = upar.
Value(par) + err;
129 err = val - upar.
Value(par);
130 std::vector<double> xmid(1, val);
131 std::vector<double> xdir(1, err);
134 unsigned int ind = upar.
IntOfExt(par);
140 double xunit = std::sqrt(up /
m(ind, ind));
143 for (
unsigned int i = 0; i <
m.Nrow(); i++) {
146 double xdev = xunit *
m(ind, i);
147 double xnew = xt(i) + direction * xdev;
150 unsigned int ext = upar.
ExtOfInt(i);
152 double unew = upar.
Int2ext(i, xnew);
162 print.
Debug(
"Parameter", ext,
"is set from", upar.
Value(ext),
"to", unew);
173 MnCross aopt = cross(para, xmid, xdir, toler, maxcalls);
175 print.
Debug(
"aopt value found from MnFunctionCross =", aopt.
Value());
177 const char *par_name = upar.
Name(par);
179 print.
Warn(
"maximum number of function calls exceeded for Parameter", par_name);
181 print.
Warn(
"new Minimum found while looking for Parameter", par_name);
182 if (direction == 1) {
184 print.
Warn(
"parameter", par_name,
"is at Upper limit");
186 print.
Warn(
"could not find Upper Value for Parameter", par_name);
189 print.
Warn(
"parameter", par_name,
"is at Lower limit");
191 print.
Warn(
"could not find Lower Value for Parameter", par_name);
194 print.
Info(
"end of Minos scan for", direction == 1 ?
"up" :
"low",
"interval for parameter", upar.
Name(par));
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
virtual double Up() const =0
Error definition of the function.
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
const MinimumParameters & Parameters() const
const MinimumError & Error() const
const MnUserParameterState & UserState() const
Class describing a symmetric matrix of size n.
MnAlgebraicSymMatrix Matrix() const
const MnAlgebraicVector & Vec() const
Class holding the result of Minos (lower and upper values) for a specific parameter.
double LowerLimit() const
double UpperLimit() const
bool HasLowerLimit() const
bool HasUpperLimit() const
unsigned int NFcn() const
const FunctionMinimum & fMinimum
MinosError Minos(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
ask for MinosError (Lower + Upper) can be printed via std::cout
double Upper(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
std::pair< double, double > operator()(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
returns the negative (pair.first) and the positive (pair.second) Minos Error of the Parameter
MnCross Loval(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
MnCross FindCrossValue(int dir, unsigned int, unsigned int maxcalls, double toler) const
internal method to get crossing value via MnFunctionCross
MnMinos(const FCNBase &fcn, const FunctionMinimum &min, unsigned int stra=1)
construct from FCN + Minimum + strategy
double Lower(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
calculate one side (negative or positive Error) of the Parameter give as input (optionally) maxcalls ...
MnCross Upval(unsigned int, unsigned int maxcalls=0, double toler=0.1) const
void Debug(const Ts &... args)
void Info(const Ts &... args)
void Warn(const Ts &... args)
API class for defining four levels of strategies: low (0), medium (1), high (2), very high (>=3); act...
class which holds the external user and/or internal Minuit representation of the parameters and error...
double Value(unsigned int) const
double Error(unsigned int) const
double Int2ext(unsigned int, double) const
unsigned int VariableParameters() const
const MinuitParameter & Parameter(unsigned int i) const
void SetValue(unsigned int, double)
unsigned int ExtOfInt(unsigned int) const
const char * Name(unsigned int) const
unsigned int IntOfExt(unsigned int) const
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...