ROOT  6.06/09
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 
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
float xmin
Definition: THbookFile.cxx:93
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: ROOT.py:1
RooMultiGenFunction * _func
virtual Bool_t canIntegrate2D() const
virtual Bool_t canIntegrate1D() const
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual Bool_t setLimits(Double_t *, Double_t *)
virtual Double_t integral(const Double_t *yvec=0)
Evaluate integral at given function binding parameter values.
Bool_t setLimits(Double_t *xmin, Double_t *xmax)
Change our integration limits.
virtual Bool_t canIntegrateND() const
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Virtual constructor with given function and configuration. Needed by RooNumIntFactory.
float xmax
Definition: THbookFile.cxx:93
virtual ~RooAdaptiveIntegratorND()
Destructor.
double Double_t
Definition: RtypesCore.h:55
static void registerIntegrator(RooNumIntFactory &fact)
Register RooAdaptiveIntegratorND, its parameters, dependencies and capabilities with RooNumIntFactory...
virtual Bool_t canIntegrateOpenEnded() const
Namespace for new Math classes and functions.
virtual Bool_t checkLimits() const
Check that our integration range is finite and otherwise return kFALSE.
const Bool_t kTRUE
Definition: Rtypes.h:91
ROOT::Math::AdaptiveIntegratorMultiDim * _integrator
ROOT::Math multi-parameter function binding.
class for adaptive quadrature integration in multi-dimensions using rectangular regions.