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