TChi2ExtendedFCN.h

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: TChi2ExtendedFCN.h 20880 2007-11-19 11:23:41Z rdm $
00002 // Author: L. Moneta    10/2005  
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2005 ROOT Foundation,  CERN/PH-SFT                   *
00007  *                                                                    *
00008  **********************************************************************/
00009 
00010 #ifndef ROOT_TChi2ExtendedFCN_H_
00011 #define ROOT_TChi2ExtendedFCN_H_
00012 
00013 #include "Minuit2/FCNBase.h"
00014 
00015 // temporary - should use interface
00016 class TF1;
00017 class TVirtualFitter;
00018 
00019 class TChi2ExtendedFitData;
00020 
00021 /** 
00022 
00023    Extended Chi2 Fit method. 
00024    Use errors in X as well, if asymmetric make them symmetric taking the average
00025 */
00026 
00027 class TChi2ExtendedFCN : public ROOT::Minuit2::FCNBase {
00028 
00029 public: 
00030 
00031 //   // use a param function instead of TF1
00032   typedef TF1 ModelFunction;
00033 
00034 
00035 
00036   /**
00037      construct passing fitter which has ROOT data object and  model function. 
00038    */
00039   TChi2ExtendedFCN( const TVirtualFitter & fitter);  
00040 
00041   //Chi2FCN( const DataObject & data, const ModelFunction & func);  
00042 
00043 
00044   /**
00045      construct objective function passing input data and model function.  
00046    */
00047 
00048   //Chi2FCN( const DataObject & data, const ModelFunction & func);  
00049 
00050   /**
00051      this class manages the fit data class. Delete it at the end
00052    */
00053   ~TChi2ExtendedFCN();
00054 
00055  
00056   /**
00057      evaluate objective function 
00058   */
00059   double operator()(const std::vector<double>&) const; 
00060 
00061 
00062   /**
00063      return error definition for chi2 should be  1
00064   */
00065   double Up() const { return fUp; }
00066 
00067   void SetErrorDef( double up) { fUp = up; }
00068 
00069 
00070 private: 
00071 
00072   double fUp;
00073   ModelFunction * fFunc; 
00074   TChi2ExtendedFitData * fData; 
00075 
00076 };
00077 
00078 
00079 #endif

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