Logo ROOT   6.12/07
Reference Guide
RooAdaptiveIntegratorND.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id$
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_ADAPTIVE_INTEGRATOR_ND
17 #define ROO_ADAPTIVE_INTEGRATOR_ND
18 
19 #include "RooAbsIntegrator.h"
20 #include "RooNumIntConfig.h"
21 #include "TString.h"
22 
23 namespace ROOT { namespace Math { class AdaptiveIntegratorMultiDim ; } }
24 class RooMultiGenFunction ;
25 
27 public:
28 
29  // Constructors, assignment etc
31  RooAdaptiveIntegratorND(const RooAbsFunc& function, const RooNumIntConfig& config) ;
32 
33  virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
34  virtual ~RooAdaptiveIntegratorND();
35 
36  virtual Bool_t checkLimits() const;
37  virtual Double_t integral(const Double_t *yvec=0) ;
38 
40  Bool_t setLimits(Double_t* xmin, Double_t* xmax);
41 
42  virtual Bool_t canIntegrate1D() const { return kFALSE ; }
43  virtual Bool_t canIntegrate2D() const { return kTRUE ; }
44  virtual Bool_t canIntegrateND() const { return kTRUE ; }
45  virtual Bool_t canIntegrateOpenEnded() const { return kFALSE ; }
46 
47  virtual Bool_t setUseIntegrandLimits(Bool_t flag) {_useIntegrandLimits = flag ; return kTRUE ; }
48 
49 protected:
50 
52 
53  Bool_t _useIntegrandLimits; // If true limits of function binding are ued
54 
55  mutable Double_t* _xmin ; // Lower bound in each dimension
56  mutable Double_t* _xmax ; // Upper bound in each dimension
57  Double_t _epsRel ; // Relative precision
58  Double_t _epsAbs ; // Absolute precision
59  Int_t _nmax ; // Max number of divisions
60  Int_t _nError ; // Number of error occurrences
61  Int_t _nWarn ; // Max number of warnings to be issued ;
62  RooMultiGenFunction* _func ; //! ROOT::Math multi-parameter function binding
64  TString _intName ; // Integrand name
65 
66  friend class RooNumIntFactory ;
67  static void registerIntegrator(RooNumIntFactory& fact) ;
68 
69  ClassDef(RooAdaptiveIntegratorND,0) // N-dimensional adaptive integration (interface to MathCore integrator)
70 };
71 
72 #endif
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
float xmin
Definition: THbookFile.cxx:93
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
virtual Bool_t setUseIntegrandLimits(Bool_t flag)
Interface function that allows to defer limit definition to integrand definition. ...
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
RooMultiGenFunction * _func
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IMultiGenFunction.
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Basic string class.
Definition: TString.h:125
RooAdaptiveIntegratorND implements an adaptive one-dimensional numerical integration algorithm...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t setLimits(Double_t *, Double_t *)
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual Bool_t canIntegrateND() const
virtual Bool_t canIntegrate2D() const
float xmax
Definition: THbookFile.cxx:93
const Bool_t kFALSE
Definition: RtypesCore.h:88
double Double_t
Definition: RtypesCore.h:55
Namespace for new Math classes and functions.
const Bool_t kTRUE
Definition: RtypesCore.h:87
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23
virtual Bool_t canIntegrateOpenEnded() const
virtual Bool_t canIntegrate1D() const
ROOT::Math::AdaptiveIntegratorMultiDim * _integrator
ROOT::Math multi-parameter function binding.
Class for adaptive quadrature integration in multi-dimensions using rectangular regions.