Logo ROOT  
Reference Guide
 
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 void initMinimizer(ROOT::Math::Minimizer &) override;
39
40 std::string getFunctionName() const override;
41 std::string getFunctionTitle() const override;
42
43 void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override;
44
45 void setOffsetting(bool flag) override;
46
47 double operator()(const double *x) const;
48 void evaluateGradient(const double *x, double *out) const;
49
51
52private:
53 RooAbsReal *_funct = nullptr;
54 std::unique_ptr<ROOT::Math::IBaseFunctionMultiDim> _multiGenFcn;
55 mutable std::vector<double> _gradientOutput;
56};
57
58#endif
59
60/// \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
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
Definition Minimizer.h:124
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:63
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
Double_t x[n]
Definition legend1.C:17