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