Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
CombinedMinimumBuilder.cxx
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
12#include "Minuit2/MnStrategy.h"
13#include "Minuit2/MnPrint.h"
14
15namespace ROOT {
16
17namespace Minuit2 {
18
20 const MnStrategy &strategy, unsigned int maxfcn, double edmval) const
21{
22 // find minimum using combined method
23 // (Migrad then if fails try Simplex and then Migrad again)
24
25 MnPrint print("CombinedMinimumBuilder");
26
28
29 if (!min.IsValid()) {
30 print.Warn("Migrad method fails, will try with simplex method first");
31
32 MnStrategy str(2);
34 if (!min1.IsValid()) {
35 print.Warn("Both Migrad and Simplex methods failed");
36
37 return min1;
38 }
39 MinimumSeed seed1 = fVMMinimizer.SeedGenerator()(fcn, gc, min1.UserState(), str);
40
42 if (!min2.IsValid()) {
43
44 print.Warn("Both migrad and method failed also at 2nd attempt; return simplex Minimum");
45 return min1;
46 }
47
48 return min2;
49 }
50
51 return min;
52}
53
54} // namespace Minuit2
55
56} // namespace ROOT
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
FunctionMinimum Minimum(const MnFcn &, const GradientCalculator &, const MinimumSeed &, const MnStrategy &, unsigned int, double) const override
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
interface class for gradient calculators
Wrapper class to FCNBase interface used internally by Minuit.
Definition MnFcn.h:34
void Warn(const Ts &... args)
Definition MnPrint.h:123
API class for defining four levels of strategies: low (0), medium (1), high (2), very high (>=3); act...
Definition MnStrategy.h:27
const MinimumBuilder & Builder() const override
const MinimumBuilder & Builder() const override
const MinimumSeedGenerator & SeedGenerator() const override
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...