MnFcn.h

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: MnFcn.h 23654 2008-05-06 07:30:34Z moneta $
00002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005  
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
00007  *                                                                    *
00008  **********************************************************************/
00009 
00010 #ifndef ROOT_Minuit2_MnFcn
00011 #define ROOT_Minuit2_MnFcn
00012 
00013 #include "Minuit2/MnConfig.h"
00014 #include "Minuit2/MnMatrix.h"
00015 
00016 #include <vector>
00017 
00018 namespace ROOT {
00019 
00020    namespace Minuit2 {
00021 
00022 
00023 class FCNBase;
00024 /**
00025    Wrapper class to FCNBase interface used internally by Minuit.
00026    Apply conversion from calling the function from a Minuit Vector (MnAlgebraicVector) to a std::vector  for 
00027    the function coordinates. 
00028    The class counts also the number of function calls. By default counter strart from zero, but a different value
00029    might be given if the class is  instantiated later on, for example for a set of different minimizaitons
00030    Normally the derived class MnUserFCN should be instantiated with performs in addition the transformatiopn 
00031    internal-> external parameters 
00032  */
00033 class MnFcn {
00034 
00035 public:
00036 
00037    /// constructor of 
00038    explicit MnFcn(const FCNBase& fcn, int ncall = 0) : fFCN(fcn), fNumCall(ncall) {}
00039 
00040   virtual ~MnFcn();
00041 
00042   virtual double operator()(const MnAlgebraicVector&) const;
00043   unsigned int NumOfCalls() const {return fNumCall;}
00044 
00045   //
00046   //forward interface
00047   //
00048   double ErrorDef() const;
00049   double Up() const;
00050 
00051   const FCNBase& Fcn() const {return fFCN;}
00052 
00053 private:
00054 
00055   const FCNBase& fFCN;
00056 
00057 protected:
00058 
00059   mutable int fNumCall;
00060 };
00061 
00062   }  // namespace Minuit2
00063 
00064 }  // namespace ROOT
00065 
00066 #endif  // ROOT_Minuit2_MnFcn

Generated on Tue Jul 5 14:25:44 2011 for ROOT_528-00b_version by  doxygen 1.5.1