00001 // @(#)root/tmva $Id: MCFitter.h 23334 2008-04-19 18:38:57Z brun $ 00002 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss 00003 00004 /********************************************************************************** 00005 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 00006 * Package: TMVA * 00007 * Class : MCFitter * 00008 * Web : http://tmva.sourceforge.net * 00009 * * 00010 * Description: * 00011 * Fitter using Monte Carlo sampling of parameters * 00012 * * 00013 * Authors (alphabetical): * 00014 * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * 00015 * Peter Speckmayer <speckmay@mail.cern.ch> - CERN, Switzerland * 00016 * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland * 00017 * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany * 00018 * * 00019 * Copyright (c) 2005: * 00020 * CERN, Switzerland * 00021 * MPI-K Heidelberg, Germany * 00022 * * 00023 * Redistribution and use in source and binary forms, with or without * 00024 * modification, are permitted according to the terms listed in LICENSE * 00025 * (http://tmva.sourceforge.net/LICENSE) * 00026 **********************************************************************************/ 00027 00028 #ifndef ROOT_TMVA_MCFitter 00029 #define ROOT_TMVA_MCFitter 00030 00031 ////////////////////////////////////////////////////////////////////////// 00032 // // 00033 // MCFitter // 00034 // // 00035 // Fitter using Monte Carlo sampling of parameters // 00036 // // 00037 ////////////////////////////////////////////////////////////////////////// 00038 00039 #ifndef ROOT_TMVA_FitterBase 00040 #include "TMVA/FitterBase.h" 00041 #endif 00042 00043 namespace TMVA { 00044 00045 class MCFitter : public FitterBase { 00046 00047 public: 00048 00049 MCFitter( IFitterTarget& target, const TString& name, 00050 const std::vector<TMVA::Interval*>& ranges, const TString& theOption ); 00051 00052 virtual ~MCFitter() {} 00053 00054 void SetParameters( Int_t cycles ); 00055 00056 Double_t Run( std::vector<Double_t>& pars ); 00057 00058 private: 00059 00060 void DeclareOptions(); 00061 00062 Int_t fSamples; // number of MC samples 00063 Double_t fSigma; // new samples are generated randomly with a gaussian probability with fSigma around the current best value 00064 UInt_t fSeed; // Seed for the random generator (0 takes random seeds) 00065 00066 ClassDef(MCFitter,0) // Fitter using Monte Carlo sampling of parameters 00067 }; 00068 00069 } // namespace TMVA 00070 00071 #endif 00072 00073