RooAdaptiveIntegratorND.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooAdaptiveIntegratorND.h 34972 2010-08-24 19:06:57Z pcanal $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_ADAPTIVE_INTEGRATOR_ND
00017 #define ROO_ADAPTIVE_INTEGRATOR_ND
00018 
00019 #include "RooAbsIntegrator.h"
00020 #include "RooNumIntConfig.h"
00021 #include "TString.h"
00022 
00023 namespace ROOT { namespace Math { class AdaptiveIntegratorMultiDim ; } } 
00024 class RooMultiGenFunction ;
00025 
00026 class RooAdaptiveIntegratorND : public RooAbsIntegrator {
00027 public:
00028 
00029   // Constructors, assignment etc
00030   RooAdaptiveIntegratorND() ;
00031   RooAdaptiveIntegratorND(const RooAbsFunc& function, const RooNumIntConfig& config) ;
00032 
00033   virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
00034   virtual ~RooAdaptiveIntegratorND();
00035 
00036   virtual Bool_t checkLimits() const;
00037   virtual Double_t integral(const Double_t *yvec=0) ;
00038 
00039   using RooAbsIntegrator::setLimits ;
00040   Bool_t setLimits(Double_t* xmin, Double_t* xmax);
00041 
00042   virtual Bool_t canIntegrate1D() const { return kFALSE ; }
00043   virtual Bool_t canIntegrate2D() const { return kTRUE ; }
00044   virtual Bool_t canIntegrateND() const { return kTRUE ; }
00045   virtual Bool_t canIntegrateOpenEnded() const { return kFALSE ; }
00046 
00047   virtual Bool_t setUseIntegrandLimits(Bool_t flag) {_useIntegrandLimits = flag ; return kTRUE ; }
00048 
00049 protected:
00050   
00051   RooAdaptiveIntegratorND(const RooAdaptiveIntegratorND&) ;
00052 
00053   Bool_t _useIntegrandLimits;  // If true limits of function binding are ued
00054 
00055   mutable Double_t* _xmin ;  // Lower bound in each dimension
00056   mutable Double_t* _xmax ;  // Upper bound in each dimension
00057   Double_t _epsRel ; // Relative precision
00058   Double_t _epsAbs ; // Absolute precision
00059   Int_t    _nmax ;   // Max number of divisions
00060   Int_t    _nError ; // Number of error occurrences
00061   Int_t    _nWarn ; // Max number of warnings to be issued ;
00062   RooMultiGenFunction* _func ; //! ROOT::Math multi-parameter function binding 
00063   ROOT::Math::AdaptiveIntegratorMultiDim* _integrator ;
00064   TString _intName ; // Integrand name
00065 
00066   friend class RooNumIntFactory ;
00067   static void registerIntegrator(RooNumIntFactory& fact) ;      
00068 
00069   ClassDef(RooAdaptiveIntegratorND,0) // N-dimensional adaptive integration (interface to MathCore integrator)
00070 };
00071 
00072 #endif

Generated on Tue Jul 5 14:26:04 2011 for ROOT_528-00b_version by  doxygen 1.5.1