Logo ROOT   6.13/01
Reference Guide
MnFcn.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_MnFcn
11 #define ROOT_Minuit2_MnFcn
12 
13 #include "Minuit2/MnConfig.h"
14 #include "Minuit2/MnMatrix.h"
15 
16 #include <vector>
17 
18 namespace ROOT {
19 
20  namespace Minuit2 {
21 
22 
23 class FCNBase;
24 /**
25  Wrapper class to FCNBase interface used internally by Minuit.
26  Apply conversion from calling the function from a Minuit Vector (MnAlgebraicVector) to a std::vector for
27  the function coordinates.
28  The class counts also the number of function calls. By default counter strart from zero, but a different value
29  might be given if the class is instantiated later on, for example for a set of different minimizaitons
30  Normally the derived class MnUserFCN should be instantiated with performs in addition the transformatiopn
31  internal-> external parameters
32  */
33 class MnFcn {
34 
35 public:
36 
37  /// constructor of
38  explicit MnFcn(const FCNBase& fcn, int ncall = 0) : fFCN(fcn), fNumCall(ncall) {}
39 
40  virtual ~MnFcn();
41 
42  virtual double operator()(const MnAlgebraicVector&) const;
43  unsigned int NumOfCalls() const {return fNumCall;}
44 
45  //
46  //forward interface
47  //
48  double ErrorDef() const;
49  double Up() const;
50 
51  const FCNBase& Fcn() const {return fFCN;}
52 
53 private:
54 
55  const FCNBase& fFCN;
56 
57 protected:
58 
59  mutable int fNumCall;
60 };
61 
62  } // namespace Minuit2
63 
64 } // namespace ROOT
65 
66 #endif // ROOT_Minuit2_MnFcn
virtual double operator()(const MnAlgebraicVector &) const
Definition: MnFcn.cxx:23
virtual ~MnFcn()
Definition: MnFcn.cxx:19
Namespace for new ROOT classes and functions.
Definition: TFoamSampler.h:19
double Up() const
Definition: MnFcn.cxx:35
const FCNBase & Fcn() const
Definition: MnFcn.h:51
unsigned int NumOfCalls() const
Definition: MnFcn.h:43
MnFcn(const FCNBase &fcn, int ncall=0)
constructor of
Definition: MnFcn.h:38
Wrapper class to FCNBase interface used internally by Minuit.
Definition: MnFcn.h:33
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition: FCNBase.h:47
const FCNBase & fFCN
Definition: MnFcn.h:55
double ErrorDef() const
Definition: MnFcn.cxx:33