MinuitWrapper.h

Go to the documentation of this file.
00001 // @(#)root/tmva $Id: MinuitWrapper.h 29122 2009-06-22 06:51:30Z brun $ 
00002 // Author: Peter Speckmayer
00003 
00004 /**********************************************************************************
00005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
00006  * Package: TMVA                                                                  *
00007  * Class  : MinuitWrapper                                                         *
00008  * Web    : http://tmva.sourceforge.net                                           *
00009  *                                                                                *
00010  * Description:                                                                   *
00011  *       Wrapper around MINUIT                                                    *
00012  *                                                                                *
00013  * Authors (alphabetical):                                                        *
00014  *      Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland           *
00015  *                                                                                *
00016  * Copyright (c) 2005:                                                            *
00017  *      CERN, Switzerland                                                         * 
00018  *      MPI-K Heidelberg, Germany                                                 * 
00019  *                                                                                *
00020  * Redistribution and use in source and binary forms, with or without             *
00021  * modification, are permitted according to the terms listed in LICENSE           *
00022  * (http://tmva.sourceforge.net/LICENSE)                                          *
00023  **********************************************************************************/
00024 
00025 #ifndef ROOT_TMVA_MinuitWrapper
00026 #define ROOT_TMVA_MinuitWrapper
00027 
00028 //////////////////////////////////////////////////////////////////////////
00029 //                                                                      //
00030 // MinuitWrapper                                                        //
00031 //                                                                      //
00032 // Wrapper around MINUIT                                                //
00033 //                                                                      //
00034 //////////////////////////////////////////////////////////////////////////
00035 
00036 #ifndef ROOT_TMinuit
00037 #include "TMinuit.h"
00038 #endif
00039 #ifndef ROOT_TMVA_IFitterTarget
00040 #include "TMVA/IFitterTarget.h"
00041 #endif
00042 
00043 class TMinuit;
00044 
00045 namespace TMVA {
00046 
00047    class IFitterTarget;
00048 
00049    class MinuitWrapper : public TMinuit {
00050       
00051    public:
00052           
00053       MinuitWrapper( IFitterTarget& target, Int_t maxpar);
00054       virtual ~MinuitWrapper() {}
00055 
00056       Int_t Eval(Int_t, Double_t*, Double_t&, Double_t*, Int_t);
00057       void SetFitterTarget( IFitterTarget& target ) { fFitterTarget = target; }
00058 
00059       Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs);
00060       void  Clear(Option_t * = 0);
00061       Int_t GetStats    (Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx);
00062       Int_t GetErrors   (Int_t ipar, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc);
00063       Int_t SetParameter(Int_t ipar,const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh);
00064       TObject *Clone(char const*) const;
00065       
00066    private:
00067       
00068       IFitterTarget&        fFitterTarget; // fitter Target
00069       std::vector<Double_t> fParameters;   // vector holding the current parameters 
00070       Int_t                 fNumPar;       // number of parameters
00071       
00072       ClassDef(MinuitWrapper,0) // Wrapper around TMinuit
00073    };
00074 
00075 } // namespace TMVA
00076 
00077 #endif
00078 
00079 

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