Logo ROOT  
Reference Guide
MinuitWrapper.h
Go to the documentation of this file.
1// @(#)root/tmva $Id$
2// Author: Peter Speckmayer
3
4/**********************************************************************************
5 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6 * Package: TMVA *
7 * Class : MinuitWrapper *
8 * Web : http://tmva.sourceforge.net *
9 * *
10 * Description: *
11 * Wrapper around MINUIT *
12 * *
13 * Authors (alphabetical): *
14 * Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland *
15 * *
16 * Copyright (c) 2005: *
17 * CERN, Switzerland *
18 * MPI-K Heidelberg, Germany *
19 * *
20 * Redistribution and use in source and binary forms, with or without *
21 * modification, are permitted according to the terms listed in LICENSE *
22 * (http://tmva.sourceforge.net/LICENSE) *
23 **********************************************************************************/
24
25#ifndef ROOT_TMVA_MinuitWrapper
26#define ROOT_TMVA_MinuitWrapper
27
28//////////////////////////////////////////////////////////////////////////
29// //
30// MinuitWrapper //
31// //
32// Wrapper around MINUIT //
33// //
34//////////////////////////////////////////////////////////////////////////
35
36#include "TMinuit.h"
37#include "TMVA/IFitterTarget.h"
38#include <vector>
39
40class TMinuit;
41
42namespace TMVA {
43
44 class IFitterTarget;
45
46 class MinuitWrapper : public TMinuit {
47
48 public:
49
51 virtual ~MinuitWrapper() {}
52
55
56 Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs);
57 void Clear(Option_t * = 0);
58 Int_t GetStats (Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx);
59 Int_t GetErrors (Int_t ipar, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc);
60 Int_t SetParameter(Int_t ipar,const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh);
61 TObject *Clone(char const*) const;
62
63 private:
64
65 IFitterTarget& fFitterTarget; ///< fitter Target
66 std::vector<Double_t> fParameters; ///< vector holding the current parameters
67 Int_t fNumPar; ///< number of parameters
68
69 ClassDef(MinuitWrapper,0); // Wrapper around TMinuit
70 };
71
72} // namespace TMVA
73
74#endif
75
76
double Double_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:335
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Interface for a fitter 'target'.
Definition: IFitterTarget.h:44
Wrapper around MINUIT.
Definition: MinuitWrapper.h:46
Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)
Execute a fitter command; command : command string args : list of nargs command arguments.
IFitterTarget & fFitterTarget
fitter Target
Definition: MinuitWrapper.h:65
Int_t SetParameter(Int_t ipar, const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh)
set initial values for a parameter
MinuitWrapper(IFitterTarget &target, Int_t maxpar)
constructor
void Clear(Option_t *=0)
reset the fitter environment
Int_t fNumPar
number of parameters
Definition: MinuitWrapper.h:67
Int_t Eval(Int_t, Double_t *, Double_t &, Double_t *, Int_t)
std::vector<Double_t> parameters( npar );
std::vector< Double_t > fParameters
vector holding the current parameters
Definition: MinuitWrapper.h:66
void SetFitterTarget(IFitterTarget &target)
Definition: MinuitWrapper.h:54
TObject * Clone(char const *) const
produces a clone of this MinuitWrapper
Int_t GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx)
return global fit parameters
Int_t GetErrors(Int_t ipar, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc)
return current errors for a parameter
virtual ~MinuitWrapper()
Definition: MinuitWrapper.h:51
Implementation in C++ of the Minuit package written by Fred James.
Definition: TMinuit.h:27
Mother of all ROOT objects.
Definition: TObject.h:37
static constexpr double eplus
create variable transformations