Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
RooMinimizerFcn.h
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitCore *
6 * @(#)root/roofitcore:$Id$
7 * Authors: *
8 * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it *
9 * PB, Patrick Bos, Netherlands eScience Center, p.bos@esciencecenter.nl *
10 * *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16
17#ifndef ROO_MINIMIZER_FCN
18#define ROO_MINIMIZER_FCN
19
20#include "Math/IFunction.h"
21
22#include "RooAbsReal.h"
23#include "RooArgList.h"
24
25#include <fstream>
26#include <vector>
27
28#include "RooAbsMinimizerFcn.h"
29
30// forward declaration
31class RooMinimizer;
32
33class RooMinimizerFcn : public RooAbsMinimizerFcn {
34
35public:
36 RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context);
37
38 std::string getFunctionName() const override;
39 std::string getFunctionTitle() const override;
40
41 void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override;
42
43 void setOffsetting(bool flag) override;
44 ROOT::Math::IMultiGenFunction *getMultiGenFcn() override { return _multiGenFcn.get(); }
45
46 double operator()(const double *x) const;
47 void evaluateGradient(const double *x, double *out) const;
48
49private:
50 RooAbsReal *_funct = nullptr;
51 std::unique_ptr<ROOT::Math::IBaseFunctionMultiDim> _multiGenFcn;
52 mutable std::vector<double> _gradientOutput;
53};
54
55#endif
56
57/// \endcond
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
TRObject operator()(const T1 &t1) const
Documentation for the abstract class IBaseFunctionMultiDim.
Definition IFunction.h:63
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
Double_t x[n]
Definition legend1.C:17