52 : fRootMin( rootMin ),
54 fMaxIter( maxIterations ),
55 fAbsTol ( absTolerance ),
78 Log() << kWARNING <<
"<Root> initial interval w/o root: " 79 <<
"(a=" << a <<
", b=" << b <<
")," 82 <<
"(fa=" << fa <<
", fb=" << fb <<
"), " 83 <<
"refValue = " << refValue <<
Endl;
91 if ((fb < 0 && fc < 0) || (fb > 0 && fc > 0)) {
102 fa = fb; fb =
fc; fc = fa;
116 if (ac_equal) { p = 2 * m *
s; q = 1 -
s; }
118 q = fa /
fc; r = fb /
fc;
119 p = s * (2 * m * q * (q -
r) - (b - a) * (r - 1));
120 q = (q - 1) * (r - 1) * (s - 1);
128 if (2 * p < (min1 < min2 ? min1 : min2)) {
132 else {
d =
m;
e =
m; }
138 else b += (m > 0 ? +tol : -tol);
145 Log() << kWARNING <<
"<Root> maximum iterations (" <<
fMaxIter 146 <<
") reached before convergence" <<
Endl;
MsgLogger & Endl(MsgLogger &ml)
virtual Double_t GetValueForRoot(Double_t)
returns efficiency as function of cut
Virtual base Class for all MVA method.
static struct mg_connection * fc(struct mg_context *ctx)
Double_t Root(Double_t refValue)
Root finding using Brents algorithm; taken from CERNLIB function RZERO.
MsgLogger & Log() const
message logger
RootFinder(MethodBase *method, Double_t rootMin, Double_t rootMax, Int_t maxIterations=100, Double_t absTolerance=0.0)
constructor
virtual ~RootFinder(void)
destructor
static constexpr double s
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
ostringstream derivative to redirect and format output
Root finding using Brents algorithm (translated from CERNLIB function RZERO)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b