Logo ROOT   6.16/01
Reference Guide
RooMinimizerFcn.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$Id$
5 * Authors: *
6 * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it *
7 * *
8 * *
9 * Redistribution and use in source and binary forms, *
10 * with or without modification, are permitted according to the terms *
11 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
12 *****************************************************************************/
13
14#ifndef __ROOFIT_NOROOMINIMIZER
15
16#ifndef ROO_MINIMIZER_FCN
17#define ROO_MINIMIZER_FCN
18
19#include "Math/IFunction.h"
21#include "Fit/FitResult.h"
22
23#include "TMatrixDSym.h"
24
25#include "RooAbsReal.h"
26#include "RooArgList.h"
27
28#include <iostream>
29#include <fstream>
30
31class RooMinimizer;
32
34
35 public:
36
37 RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context,
38 bool verbose = false);
39 RooMinimizerFcn(const RooMinimizerFcn& other);
40 virtual ~RooMinimizerFcn();
41
43 virtual unsigned int NDim() const { return _nDim; }
44
49
51 void SetPrintEvalErrors(Int_t numEvalErrors) { _printEvalErrors = numEvalErrors ; }
52 Bool_t SetLogFile(const char* inLogfile);
53 std::ofstream* GetLogFile() { return _logfile; }
54 void SetVerbose(Bool_t flag=kTRUE) { _verbose = flag ; }
55
56 Double_t& GetMaxFCN() { return _maxFCN; }
58
59 Bool_t Synchronize(std::vector<ROOT::Fit::ParameterSettings>& parameters,
60 Bool_t optConst, Bool_t verbose);
61 void BackProp(const ROOT::Fit::FitResult &results);
63
64 Int_t evalCounter() const { return _evalCounter ; }
65 void zeroEvalCount() { _evalCounter = 0 ; }
66
67
68 private:
69
72 void SetPdfParamErr(Int_t index, Double_t value);
73 void ClearPdfParamAsymErr(Int_t index);
74 void SetPdfParamErr(Int_t index, Double_t loVal, Double_t hiVal);
75
76 inline Bool_t SetPdfParamVal(const Int_t &index, const Double_t &value) const;
77
78
79 virtual double DoEval(const double * x) const;
80 void updateFloatVec() ;
81
82private:
83
85
88
89 mutable double _maxFCN;
90 mutable int _numBadNLL;
91 mutable int _printEvalErrors;
93
94 int _nDim;
95 std::ofstream *_logfile;
97
99 std::vector<RooAbsArg*> _floatParamVec ;
103
104};
105
106#endif
107#endif
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
class containg the result of the fit and all the related information (fitted parameter values,...
Definition: FitResult.h:48
Documentation for the abstract class IBaseFunctionMultiDim.
Definition: IFunction.h:62
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
RooArgList * _floatParamList
std::ofstream * _logfile
void SetPdfParamErr(Int_t index, Double_t value)
Int_t GetNumInvalidNLL()
RooArgList * _initFloatParamList
virtual double DoEval(const double *x) const
RooArgList * GetInitFloatParamList()
virtual ROOT::Math::IBaseFunctionMultiDim * Clone() const
Clone a function.
Bool_t SetLogFile(const char *inLogfile)
void ApplyCovarianceMatrix(TMatrixDSym &V)
Double_t GetPdfParamErr(Int_t index)
virtual unsigned int NDim() const
Retrieve the dimension of the function.
Double_t GetPdfParamVal(Int_t index)
std::ofstream * GetLogFile()
Int_t evalCounter() const
void SetEvalErrorWall(Bool_t flag)
Bool_t SetPdfParamVal(const Int_t &index, const Double_t &value) const
std::vector< RooAbsArg * > _floatParamVec
virtual ~RooMinimizerFcn()
RooArgList * GetInitConstParamList()
RooArgList * _constParamList
Double_t & GetMaxFCN()
Bool_t Synchronize(std::vector< ROOT::Fit::ParameterSettings > &parameters, Bool_t optConst, Bool_t verbose)
void BackProp(const ROOT::Fit::FitResult &results)
void SetPrintEvalErrors(Int_t numEvalErrors)
RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context, bool verbose=false)
RooAbsReal * _funct
RooMinimizer * _context
void ClearPdfParamAsymErr(Int_t index)
RooArgList * GetFloatParamList()
void SetVerbose(Bool_t flag=kTRUE)
RooArgList * _initConstParamList
RooArgList * GetConstParamList()
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
Definition: RooMinimizer.h:38
Double_t x[n]
Definition: legend1.C:17