Logo ROOT   6.14/05
Reference Guide
MinimumBuilder.h
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 
10 #ifndef ROOT_Minuit2_MinimumBuilder
11 #define ROOT_Minuit2_MinimumBuilder
12 
13 #include "Minuit2/MnTraceObject.h"
14 
15 namespace ROOT {
16 
17  namespace Minuit2 {
18 
19 
20 class FunctionMinimum;
21 class MnFcn;
22 class GradientCalculator;
23 class MinimumSeed;
24 class MinimumState;
25 class MnStrategy;
26 
28 
29 public:
30 
32 
33  virtual ~MinimumBuilder() {}
34 
35  virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, const MinimumSeed&, const MnStrategy&, unsigned int, double) const = 0;
36 
37  int StorageLevel() const { return fStorageLevel; }
38  int PrintLevel() const { return fPrintLevel; }
39 
40  bool TraceIter() const { return (fTracer); }
41  MnTraceObject * TraceObject() const { return (fTracer); }
42 
43  virtual void SetPrintLevel(int level) { fPrintLevel = level;}
44  virtual void SetStorageLevel(int level) { fStorageLevel = level;}
45 
46  // set trace object (user manages it)
47  virtual void SetTraceObject(MnTraceObject & obj) {
48  fTracer = &obj;
49  }
50 
51  void TraceIteration(int iter, const MinimumState & state) const {
52  if (fTracer) (*fTracer)(iter, state);
53  }
54 
55 private:
56 
59 
60  MnTraceObject * fTracer; //! tracer object (it is managed by user)
61 
62 };
63 
64  } // namespace Minuit2
65 
66 } // namespace ROOT
67 
68 #endif // ROOT_Minuit2_MinimumBuilder
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
virtual void SetPrintLevel(int level)
virtual void SetTraceObject(MnTraceObject &obj)
MinimumSeed contains the starting values for the minimization produced by the SeedGenerator.
Definition: MinimumSeed.h:31
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
Wrapper class to FCNBase interface used internally by Minuit.
Definition: MnFcn.h:33
virtual void SetStorageLevel(int level)
void TraceIteration(int iter, const MinimumState &state) const
virtual FunctionMinimum Minimum(const MnFcn &, const GradientCalculator &, const MinimumSeed &, const MnStrategy &, unsigned int, double) const =0
MnTraceObject * TraceObject() const
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition: MnStrategy.h:27
interface class for gradient calculators