Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
MCFitter.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : MCFitter *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Fitter using Monte Carlo sampling of parameters *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Peter Speckmayer <speckmay@mail.cern.ch> - CERN, Switzerland *
16  * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
17  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
18  * *
19  * Copyright (c) 2005: *
20  * CERN, Switzerland *
21  * MPI-K Heidelberg, Germany *
22  * *
23  * Redistribution and use in source and binary forms, with or without *
24  * modification, are permitted according to the terms listed in LICENSE *
25  * (http://tmva.sourceforge.net/LICENSE) *
26  **********************************************************************************/
27 
28 #ifndef ROOT_TMVA_MCFitter
29 #define ROOT_TMVA_MCFitter
30 
31 //////////////////////////////////////////////////////////////////////////
32 // //
33 // MCFitter //
34 // //
35 // Fitter using Monte Carlo sampling of parameters //
36 // //
37 //////////////////////////////////////////////////////////////////////////
38 
39 #include "TMVA/FitterBase.h"
40 
41 namespace TMVA {
42 
43  class MCFitter : public FitterBase {
44 
45  public:
46 
47  MCFitter( IFitterTarget& target, const TString& name,
48  const std::vector<TMVA::Interval*>& ranges, const TString& theOption );
49 
50  virtual ~MCFitter() {}
51 
52  void SetParameters( Int_t cycles );
53 
54  Double_t Run( std::vector<Double_t>& pars );
55 
56  private:
57 
58  void DeclareOptions();
59 
60  Int_t fSamples; // number of MC samples
61  Double_t fSigma; // new samples are generated randomly with a gaussian probability with fSigma around the current best value
62  UInt_t fSeed; // Seed for the random generator (0 takes random seeds)
63 
64  ClassDef(MCFitter,0); // Fitter using Monte Carlo sampling of parameters
65  };
66 
67 } // namespace TMVA
68 
69 #endif
70 
71