Logo ROOT  
Reference Guide
RooIntegratorBinding.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooIntegratorBinding.h,v 1.4 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_INTEGRATOR_BINDING
17#define ROO_INTEGRATOR_BINDING
18
19#include "RooAbsFunc.h"
20#include "RooAbsIntegrator.h"
21
23public:
25 RooAbsFunc(integrator.integrand()->getDimension()-1), _integrator(&integrator) {} ;
26 ~RooIntegratorBinding() override {} ;
27
28 inline double operator()(const double xvector[]) const override { _ncall++ ; return _integrator->integral(xvector) ; }
29 inline double getMinLimit(UInt_t index) const override { return _integrator->integrand()->getMinLimit(index+1); }
30 inline double getMaxLimit(UInt_t index) const override { return _integrator->integrand()->getMaxLimit(index+1); }
31
32protected:
33 RooAbsIntegrator* _integrator ; ///< Numeric integrator
34
35
36 ClassDefOverride(RooIntegratorBinding,0) // Function binding representing output of numeric integrator
37};
38
39#endif
40
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:27
Int_t _ncall
Function call counter.
Definition: RooAbsFunc.h:78
UInt_t getDimension() const
Definition: RooAbsFunc.h:33
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
double integrand(const double x[]) const
Return value of integrand at given observable values.
virtual double integral(const double *yvec=0)=0
Function binding representing the output of a RooAbsIntegrator.
RooIntegratorBinding(RooAbsIntegrator &integrator)
RooAbsIntegrator * _integrator
Numeric integrator.
double operator()(const double xvector[]) const override
double getMinLimit(UInt_t index) const override
double getMaxLimit(UInt_t index) const override