Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooImproperIntegrator1D.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooImproperIntegrator1D.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
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#ifndef ROO_IMPROPER_INTEGRATOR_1D
17#define ROO_IMPROPER_INTEGRATOR_1D
18
19#include "RooAbsIntegrator.h"
20#include "RooNumIntConfig.h"
21
22class RooInvTransform;
24
26public:
29 RooImproperIntegrator1D(const RooAbsFunc &function, double xmin, double xmax, const RooNumIntConfig &config);
30
31 bool checkLimits() const override;
33 bool setLimits(double *xmin, double *xmax) override;
34 bool setUseIntegrandLimits(bool flag) override
35 {
37 return true;
38 }
39 double integral(const double *yvec = nullptr) override;
40
41protected:
42 friend class RooNumIntFactory;
43 static void registerIntegrator(RooNumIntFactory &fact);
44
45 void initialize(const RooAbsFunc *function = nullptr);
46
55 };
56 LimitsCase limitsCase() const;
57 LimitsCase _case; ///< Configuration of limits
58 mutable double _xmin, _xmax; ///< Value of limits
59 bool _useIntegrandLimits; ///< Use limits in function binding?
60
61 RooAbsFunc *_origFunc = nullptr; ///< Original function binding
62 std::unique_ptr<RooInvTransform> _function; ///< Binding with inverse of function
63 RooNumIntConfig _config; ///< Configuration object
64 mutable std::unique_ptr<RooRombergIntegrator> _integrator1; ///< Piece integrator 1
65 mutable std::unique_ptr<RooRombergIntegrator> _integrator2; ///< Piece integrator 2
66 mutable std::unique_ptr<RooRombergIntegrator> _integrator3; ///< Piece integrator 3
67};
68
69#endif
RooAbsReal & function()
bool initialize()
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 *)
Special numeric integrator that can handle integrals over open domains.
std::unique_ptr< RooRombergIntegrator > _integrator1
Piece integrator 1.
std::unique_ptr< RooInvTransform > _function
Binding with inverse of function.
LimitsCase limitsCase() const
Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove.
double integral(const double *yvec=nullptr) override
Calculate the integral at the given parameter values of the function binding.
LimitsCase _case
Configuration of limits.
double _xmax
Value of limits.
bool checkLimits() const override
Check if the limits are valid.
RooAbsFunc * _origFunc
Original function binding.
bool setUseIntegrandLimits(bool flag) override
Interface function that allows to defer limit definition to integrand definition.
std::unique_ptr< RooRombergIntegrator > _integrator3
Piece integrator 3.
bool setLimits(double *xmin, double *xmax) override
Change our integration limits.
std::unique_ptr< RooRombergIntegrator > _integrator2
Piece integrator 2.
RooNumIntConfig _config
Configuration object.
static void registerIntegrator(RooNumIntFactory &fact)
Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory.
bool _useIntegrandLimits
Use limits in function binding?
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.
Adaptive numerical integration algorithm.