Logo ROOT  
Reference Guide
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;
23class RooIntegrator1D;
24
26public:
27
31 RooImproperIntegrator1D(const RooAbsFunc& function, double xmin, double xmax, const RooNumIntConfig& config);
32 RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const override ;
33 ~RooImproperIntegrator1D() override;
34
35 bool checkLimits() const override;
37 bool setLimits(double* xmin, double* xmax) override;
38 bool setUseIntegrandLimits(bool flag) override {_useIntegrandLimits = flag ; return true ; }
39 double integral(const double* yvec=0) override ;
40
41 bool canIntegrate1D() const override { return true ; }
42 bool canIntegrate2D() const override { return false ; }
43 bool canIntegrateND() const override { return false ; }
44 bool canIntegrateOpenEnded() const override { return true ; }
45
46protected:
47
48 friend class RooNumIntFactory ;
49 static void registerIntegrator(RooNumIntFactory& fact) ;
50
51 void initialize(const RooAbsFunc* function=0) ;
52
55 LimitsCase limitsCase() const;
56 LimitsCase _case; ///< Configuration of limits
57 mutable double _xmin, _xmax; ///< Value of limits
58 bool _useIntegrandLimits; ///< Use limits in function binding?
59
60 RooAbsFunc* _origFunc ; ///< Original function binding
61 RooInvTransform *_function; ///< Binding with inverse of function
62 RooNumIntConfig _config ; ///< Configuration object
63 mutable RooIntegrator1D *_integrator1,*_integrator2,*_integrator3; ///< Piece integrators
64
65 ClassDefOverride(RooImproperIntegrator1D,0) // 1-dimensional improper integration engine
66};
67
68#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
float xmin
Definition: THbookFile.cxx:95
float xmax
Definition: THbookFile.cxx:95
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:27
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
virtual bool setLimits(double *, double *)
Special numeric integrator that can handle integrals over open domains.
bool canIntegrate1D() const override
LimitsCase limitsCase() const
Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove.
RooIntegrator1D * _integrator3
Piece integrators.
RooInvTransform * _function
Binding with inverse of function.
RooImproperIntegrator1D()
Default constructor.
LimitsCase _case
Configuration of limits.
double _xmax
Value of limits.
double integral(const double *yvec=0) override
Calculate the integral at the given parameter values of the function binding.
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.
void initialize(const RooAbsFunc *function=0)
Initialize the integrator, construct and initialize subintegrators.
bool setLimits(double *xmin, double *xmax) override
Change our integration limits.
RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const override
Return clone of integrator with given function and configuration. Needed by RooNumIntFactory.
bool canIntegrateOpenEnded() const override
bool canIntegrate2D() const override
bool canIntegrateND() const override
RooNumIntConfig _config
Configuration object.
static void registerIntegrator(RooNumIntFactory &fact)
Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory.
~RooImproperIntegrator1D() override
Destructor.
bool _useIntegrandLimits
Use limits in function binding?
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
Lightweight function binding that returns the inverse of an input function binding.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:167