Logo ROOT  
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 * PB, Patrick Bos, Netherlands eScience Center, p.bos@esciencecenter.nl *
8 * *
9 * *
10 * Redistribution and use in source and binary forms, *
11 * with or without modification, are permitted according to the terms *
12 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
13 *****************************************************************************/
14
15#ifndef ROO_MINIMIZER_FCN
16#define ROO_MINIMIZER_FCN
17
18#include "Math/IFunction.h"
20#include "Fit/FitResult.h"
21
22#include "RooAbsReal.h"
23#include "RooArgList.h"
24
25#include <fstream>
26#include <vector>
27
28#include "RooAbsMinimizerFcn.h"
29
30template <typename T>
31class TMatrixTSym;
33
34// forward declaration
35class RooMinimizer;
36
38
39public:
40 RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context);
41 RooMinimizerFcn(const RooMinimizerFcn &other);
42 ~RooMinimizerFcn() override;
43
45 unsigned int NDim() const override { return getNDim(); }
46
47 std::string getFunctionName() const override;
48 std::string getFunctionTitle() const override;
49
50 void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override;
51
52 void setOffsetting(bool flag) override;
53 bool fit(ROOT::Fit::Fitter &fitter) const override { return fitter.FitFCN(*this); };
54 ROOT::Math::IMultiGenFunction *getMultiGenFcn() override { return this; };
55
56private:
57 double DoEval(const double *x) const override;
58
60};
61
62#endif
Fitter class, entry point for performing all type of fits.
Definition: Fitter.h:77
bool FitFCN(unsigned int npar, Function &fcn, const double *params=0, unsigned int dataSize=0, bool chi2fit=false)
Fit using the a generic FCN function as a C++ callable object implementing double () (const double *)...
Definition: Fitter.h:653
unsigned int getNDim() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:62
RooMinimizerFcn is an interface to the ROOT::Math::IBaseFunctionMultiDim, a function that ROOT's mini...
std::string getFunctionName() const override
RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class.
~RooMinimizerFcn() override
unsigned int NDim() const override
Retrieve the dimension of the function.
void setOffsetting(bool flag) override
Enable or disable offsetting on the function to be minimized, which enhances numerical precision.
ROOT::Math::IBaseFunctionMultiDim * Clone() const override
Clone a function.
void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override
This function must be overridden in the derived class to pass on constant term optimization configura...
double DoEval(const double *x) const override
Evaluate function given the parameters in x.
RooAbsReal * _funct
RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context)
std::string getFunctionTitle() const override
RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class...
bool fit(ROOT::Fit::Fitter &fitter) const override
ROOT::Math::IMultiGenFunction * getMultiGenFcn() override
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
Definition: RooMinimizer.h:43
TMatrixTSym.
Definition: TMatrixTSym.h:34
Double_t x[n]
Definition: legend1.C:17