Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooImproperIntegrator1D.h
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitCore *
6 * File: $Id: RooImproperIntegrator1D.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
7 * Authors: *
8 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
9 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
10 * *
11 * Copyright (c) 2000-2005, Regents of the University of California *
12 * and Stanford University. All rights reserved. *
13 * *
14 * Redistribution and use in source and binary forms, *
15 * with or without modification, are permitted according to the terms *
16 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
17 *****************************************************************************/
18#ifndef ROO_IMPROPER_INTEGRATOR_1D
19#define ROO_IMPROPER_INTEGRATOR_1D
20
21#include "RooAbsIntegrator.h"
22#include "RooNumIntConfig.h"
23
24class RooInvTransform;
26
28public:
29 RooImproperIntegrator1D(const RooAbsFunc &function);
30 RooImproperIntegrator1D(const RooAbsFunc &function, const RooNumIntConfig &config);
31 RooImproperIntegrator1D(const RooAbsFunc &function, double xmin, double xmax, const RooNumIntConfig &config);
32
33 bool checkLimits() const override;
35 bool setLimits(double *xmin, double *xmax) override;
36 bool setUseIntegrandLimits(bool flag) override
37 {
38 _useIntegrandLimits = flag;
39 return true;
40 }
41 double integral(const double *yvec = nullptr) override;
42
43protected:
44 friend class RooNumIntFactory;
45 static void registerIntegrator(RooNumIntFactory &fact);
46
47 void initialize(const RooAbsFunc *function = nullptr);
48
49 enum LimitsCase {
50 Invalid,
57 };
58 LimitsCase limitsCase() const;
59 LimitsCase _case; ///< Configuration of limits
60 mutable double _xmin, _xmax; ///< Value of limits
61 bool _useIntegrandLimits; ///< Use limits in function binding?
62
63 RooAbsFunc *_origFunc = nullptr; ///< Original function binding
64 std::unique_ptr<RooInvTransform> _function; ///< Binding with inverse of function
65 RooNumIntConfig _config; ///< Configuration object
66 mutable std::unique_ptr<RooRombergIntegrator> _integrator1; ///< Piece integrator 1
67 mutable std::unique_ptr<RooRombergIntegrator> _integrator2; ///< Piece integrator 2
68 mutable std::unique_ptr<RooRombergIntegrator> _integrator3; ///< Piece integrator 3
69};
70
71#endif
72
73/// \endcond
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
float xmin
float xmax
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition RooAbsFunc.h:27
Abstract interface for integrators of real-valued functions that implement the RooAbsFunc interface.
virtual bool setLimits(double *, double *)
Lightweight function binding that returns the inverse of an input function binding.
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
Factory to instantiate numeric integrators from a given function binding and a given configuration.
void initialize(typename Architecture_t::Matrix_t &A, EInitialization m)
Definition Functions.h:282