Logo ROOT   6.10/09
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 
23 public:
25  RooAbsFunc(integrator.integrand()->getDimension()-1), _integrator(&integrator) {} ;
26  virtual ~RooIntegratorBinding() {} ;
27 
28  inline virtual Double_t operator()(const Double_t xvector[]) const { _ncall++ ; return _integrator->integral(xvector) ; }
29  inline virtual Double_t getMinLimit(UInt_t index) const { return _integrator->integrand()->getMinLimit(index+1); }
30  inline virtual Double_t getMaxLimit(UInt_t index) const { return _integrator->integrand()->getMaxLimit(index+1); }
31 
32 protected:
33  RooAbsIntegrator* _integrator ; // Numeric integrator
34 
35 
36  ClassDef(RooIntegratorBinding,0) // Function binding representing output of numeric integrator
37 };
38 
39 #endif
40 
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
#define ClassDef(name, id)
Definition: Rtypes.h:297
virtual Double_t getMinLimit(UInt_t index) const
Function binding representing the output of a RooAbsIntegrator.
virtual Double_t integral(const Double_t *yvec=0)=0
Double_t integrand(const Double_t x[]) const
RooIntegratorBinding(RooAbsIntegrator &integrator)
Int_t _ncall
Definition: RooAbsFunc.h:73
UInt_t getDimension() const
Definition: RooAbsFunc.h:29
RooAbsIntegrator * _integrator
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual Double_t getMaxLimit(UInt_t index) const
virtual Double_t operator()(const Double_t xvector[]) const
double Double_t
Definition: RtypesCore.h:55
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23