TF1Helper.h

Go to the documentation of this file.
00001 // @(#)root/hist:$Id: TF1Helper.h 34809 2010-08-13 12:48:34Z moneta $
00002 // Author: Lorenzo Moneta 12/06/07
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2007  LCG ROOT Math Team, CERN/PH-SFT                *
00007  *                                                                    *
00008  *                                                                    *
00009  **********************************************************************/
00010 
00011 // helper functions used internally by TF1
00012 
00013 #ifndef ROOT_TF1Helper
00014 #define ROOT_TF1Helper 
00015 
00016 #include "TF1.h"
00017 
00018 namespace ROOT { 
00019 
00020    namespace TF1Helper { 
00021 
00022       double IntegralError(TF1 * func, int dim, const double * a, const double * b, const double * params, const double * covmat, double eps); 
00023 
00024   /**
00025      function class representing the derivative with respect a parameter of a given TF1  
00026   */
00027       class TGradientParFunction { 
00028 
00029       public: 
00030 
00031          TGradientParFunction(int ipar, TF1 * f)  : 
00032             fPar(ipar),
00033             fFunc(f)
00034          {}
00035          
00036          double operator() (double * x, double *) const 
00037          { 
00038             // evaluate gradient vector of functions at point x
00039             return fFunc->GradientPar(fPar,x);  
00040          }
00041          
00042       private: 
00043          
00044          unsigned int fPar; 
00045          mutable TF1 * fFunc;
00046       }; 
00047 
00048 
00049    } // end namespace TF1Helper
00050 
00051 } // end namespace TF1
00052 
00053 #endif

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