Logo ROOT  
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
RooAdaptiveIntegratorND::setUseIntegrandLimits
virtual Bool_t setUseIntegrandLimits(Bool_t flag)
Interface function that allows to defer limit definition to integrand definition.
Definition: RooAdaptiveIntegratorND.h:47
RooNumIntFactory
Definition: RooNumIntFactory.h:30
RooMultiGenFunction
Definition: RooMultiGenFunction.h:27
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooNumIntConfig.h
RooAdaptiveIntegratorND::canIntegrate1D
virtual Bool_t canIntegrate1D() const
Definition: RooAdaptiveIntegratorND.h:42
RooAdaptiveIntegratorND::setLimits
Bool_t setLimits(Double_t *xmin, Double_t *xmax)
Change our integration limits.
Definition: RooAdaptiveIntegratorND.cxx:178
xmax
float xmax
Definition: THbookFile.cxx:95
RooAdaptiveIntegratorND::_xmax
Double_t * _xmax
Definition: RooAdaptiveIntegratorND.h:56
RooAdaptiveIntegratorND::canIntegrateND
virtual Bool_t canIntegrateND() const
Definition: RooAdaptiveIntegratorND.h:44
RooAdaptiveIntegratorND::_useIntegrandLimits
Bool_t _useIntegrandLimits
Definition: RooAdaptiveIntegratorND.h:53
RooAdaptiveIntegratorND::checkLimits
virtual Bool_t checkLimits() const
Check that our integration range is finite and otherwise return kFALSE.
Definition: RooAdaptiveIntegratorND.cxx:155
RooAdaptiveIntegratorND::_intName
TString _intName
Definition: RooAdaptiveIntegratorND.h:64
TString
Definition: TString.h:136
TString.h
bool
RooAbsFunc
Definition: RooAbsFunc.h:23
RooAdaptiveIntegratorND::canIntegrate2D
virtual Bool_t canIntegrate2D() const
Definition: RooAdaptiveIntegratorND.h:43
RooAdaptiveIntegratorND::RooAdaptiveIntegratorND
RooAdaptiveIntegratorND()
Default ctor.
Definition: RooAdaptiveIntegratorND.cxx:69
RooAdaptiveIntegratorND::integral
virtual Double_t integral(const Double_t *yvec=0)
Evaluate integral at given function binding parameter values.
Definition: RooAdaptiveIntegratorND.cxx:198
RooAbsIntegrator::setLimits
virtual Bool_t setLimits(Double_t *, Double_t *)
Definition: RooAbsIntegrator.h:75
xmin
float xmin
Definition: THbookFile.cxx:95
RooAdaptiveIntegratorND::clone
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Virtual constructor with given function and configuration. Needed by RooNumIntFactory.
Definition: RooAdaptiveIntegratorND.cxx:123
RooAdaptiveIntegratorND::_epsAbs
Double_t _epsAbs
Definition: RooAdaptiveIntegratorND.h:58
RooAdaptiveIntegratorND::_epsRel
Double_t _epsRel
Definition: RooAdaptiveIntegratorND.h:57
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAdaptiveIntegratorND::_nmax
Int_t _nmax
Definition: RooAdaptiveIntegratorND.h:59
RooAbsIntegrator.h
RooAdaptiveIntegratorND::_xmin
Double_t * _xmin
Definition: RooAdaptiveIntegratorND.h:55
ROOT::Math::AdaptiveIntegratorMultiDim
Definition: AdaptiveIntegratorMultiDim.h:94
Double_t
double Double_t
Definition: RtypesCore.h:59
RooAdaptiveIntegratorND::registerIntegrator
static void registerIntegrator(RooNumIntFactory &fact)
Register RooAdaptiveIntegratorND, its parameters, dependencies and capabilities with RooNumIntFactory...
Definition: RooAdaptiveIntegratorND.cxx:54
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooAdaptiveIntegratorND::_integrator
ROOT::Math::AdaptiveIntegratorMultiDim * _integrator
ROOT::Math multi-parameter function binding.
Definition: RooAdaptiveIntegratorND.h:63
RooAdaptiveIntegratorND::~RooAdaptiveIntegratorND
virtual ~RooAdaptiveIntegratorND()
Destructor.
Definition: RooAdaptiveIntegratorND.cxx:136
RooAdaptiveIntegratorND::_nWarn
Int_t _nWarn
Definition: RooAdaptiveIntegratorND.h:61
RooNumIntConfig
Definition: RooNumIntConfig.h:25
RooAbsIntegrator
Definition: RooAbsIntegrator.h:22
RooAdaptiveIntegratorND
Definition: RooAdaptiveIntegratorND.h:26
RooAdaptiveIntegratorND::_nError
Int_t _nError
Definition: RooAdaptiveIntegratorND.h:60
ROOT
VSD Structures.
Definition: StringConv.hxx:21
RooAdaptiveIntegratorND::_func
RooMultiGenFunction * _func
Definition: RooAdaptiveIntegratorND.h:62
Math
int
RooAdaptiveIntegratorND::canIntegrateOpenEnded
virtual Bool_t canIntegrateOpenEnded() const
Definition: RooAdaptiveIntegratorND.h:45