Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:59

0001 // @(#)root/tmva $Id$
0002 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss
0003 
0004 /**********************************************************************************
0005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
0006  * Package: TMVA                                                                  *
0007  * Class  : MCFitter                                                              *
0008  *                                             *
0009  *                                                                                *
0010  * Description:                                                                   *
0011  *      Fitter using Monte Carlo sampling of parameters                           *
0012  *                                                                                *
0013  * Authors (alphabetical):                                                        *
0014  *      Andreas Hoecker  <Andreas.Hocker@cern.ch> - CERN, Switzerland             *
0015  *      Peter Speckmayer <speckmay@mail.cern.ch>  - CERN, Switzerland             *
0016  *      Joerg Stelzer    <Joerg.Stelzer@cern.ch>  - CERN, Switzerland             *
0017  *      Helge Voss       <Helge.Voss@cern.ch>     - MPI-K Heidelberg, Germany     *
0018  *                                                                                *
0019  * Copyright (c) 2005:                                                            *
0020  *      CERN, Switzerland                                                         *
0021  *      MPI-K Heidelberg, Germany                                                 *
0022  *                                                                                *
0023  * Redistribution and use in source and binary forms, with or without             *
0024  * modification, are permitted according to the terms listed in LICENSE           *
0025  * (see tmva/doc/LICENSE)                                          *
0026  **********************************************************************************/
0027 
0028 #ifndef ROOT_TMVA_MCFitter
0029 #define ROOT_TMVA_MCFitter
0030 
0031 //////////////////////////////////////////////////////////////////////////
0032 //                                                                      //
0033 // MCFitter                                                             //
0034 //                                                                      //
0035 // Fitter using Monte Carlo sampling of parameters                      //
0036 //                                                                      //
0037 //////////////////////////////////////////////////////////////////////////
0038 
0039 #include "TMVA/FitterBase.h"
0040 #include <vector>
0041 
0042 namespace TMVA {
0043 
0044    class MCFitter : public FitterBase {
0045 
0046    public:
0047 
0048       MCFitter( IFitterTarget& target, const TString& name,
0049                 const std::vector<TMVA::Interval*>& ranges, const TString& theOption );
0050 
0051       virtual ~MCFitter() {}
0052 
0053       void SetParameters( Int_t cycles );
0054 
0055       Double_t Run( std::vector<Double_t>& pars );
0056 
0057    private:
0058 
0059       void DeclareOptions();
0060 
0061       Int_t    fSamples;     ///< number of MC samples
0062       Double_t fSigma;       ///< new samples are generated randomly with a gaussian probability with fSigma around the current best value
0063       UInt_t   fSeed;        ///< Seed for the random generator (0 takes random seeds)
0064 
0065       ClassDef(MCFitter,0); //  Fitter using Monte Carlo sampling of parameters
0066    };
0067 
0068 } // namespace TMVA
0069 
0070 #endif
0071 
0072