Logo ROOT  
Reference Guide
RooImproperIntegrator1D.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooImproperIntegrator1D.h,v 1.12 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_IMPROPER_INTEGRATOR_1D
17 #define ROO_IMPROPER_INTEGRATOR_1D
18 
19 #include "RooAbsIntegrator.h"
20 #include "RooNumIntConfig.h"
21 
22 class RooInvTransform;
23 class RooIntegrator1D;
24 
26 public:
27 
29  RooImproperIntegrator1D(const RooAbsFunc& function);
30  RooImproperIntegrator1D(const RooAbsFunc& function, const RooNumIntConfig& config);
32  virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
33  virtual ~RooImproperIntegrator1D();
34 
35  virtual Bool_t checkLimits() const;
38  virtual Bool_t setUseIntegrandLimits(Bool_t flag) {_useIntegrandLimits = flag ; return kTRUE ; }
39  virtual Double_t integral(const Double_t* yvec=0) ;
40 
41  virtual Bool_t canIntegrate1D() const { return kTRUE ; }
42  virtual Bool_t canIntegrate2D() const { return kFALSE ; }
43  virtual Bool_t canIntegrateND() const { return kFALSE ; }
44  virtual Bool_t canIntegrateOpenEnded() const { return kTRUE ; }
45 
46 protected:
47 
48  friend class RooNumIntFactory ;
49  static void registerIntegrator(RooNumIntFactory& fact) ;
50 
51  void initialize(const RooAbsFunc* function=0) ;
52 
55  LimitsCase limitsCase() const;
56  LimitsCase _case; // Configuration of limits
57  mutable Double_t _xmin, _xmax; // Value of limits
58  Bool_t _useIntegrandLimits; // Use limits in function binding?
59 
60  RooAbsFunc* _origFunc ; // Original function binding
61  RooInvTransform *_function; // Binding with inverse of function
62  RooNumIntConfig _config ; // Configuration object
63  mutable RooIntegrator1D *_integrator1,*_integrator2,*_integrator3; // Piece integrators
64 
65  ClassDef(RooImproperIntegrator1D,0) // 1-dimensional improper integration engine
66 };
67 
68 #endif
RooNumIntFactory
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Definition: RooNumIntFactory.h:30
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooImproperIntegrator1D::clone
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Return clone of integrator with given function and configuration. Needed by RooNumIntFactory.
Definition: RooImproperIntegrator1D.cxx:132
RooNumIntConfig.h
RooImproperIntegrator1D::ClosedBothEnds
@ ClosedBothEnds
Definition: RooImproperIntegrator1D.h:53
RooImproperIntegrator1D::_config
RooNumIntConfig _config
Definition: RooImproperIntegrator1D.h:62
RooImproperIntegrator1D::OpenBothEnds
@ OpenBothEnds
Definition: RooImproperIntegrator1D.h:53
xmax
float xmax
Definition: THbookFile.cxx:95
RooImproperIntegrator1D::_integrator2
RooIntegrator1D * _integrator2
Definition: RooImproperIntegrator1D.h:63
RooImproperIntegrator1D::setLimits
virtual Bool_t setLimits(Double_t *, Double_t *)
Definition: RooAbsIntegrator.h:61
RooImproperIntegrator1D::OpenAboveSpansZero
@ OpenAboveSpansZero
Definition: RooImproperIntegrator1D.h:54
RooImproperIntegrator1D::canIntegrate2D
virtual Bool_t canIntegrate2D() const
Definition: RooImproperIntegrator1D.h:42
RooImproperIntegrator1D::checkLimits
virtual Bool_t checkLimits() const
Check if the limits are valid.
Definition: RooImproperIntegrator1D.cxx:243
RooImproperIntegrator1D::_function
RooInvTransform * _function
Definition: RooImproperIntegrator1D.h:61
bool
RooAbsFunc
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:27
RooImproperIntegrator1D::_integrator3
RooIntegrator1D * _integrator3
Definition: RooImproperIntegrator1D.h:63
RooImproperIntegrator1D::canIntegrateOpenEnded
virtual Bool_t canIntegrateOpenEnded() const
Definition: RooImproperIntegrator1D.h:44
RooImproperIntegrator1D::RooImproperIntegrator1D
RooImproperIntegrator1D()
Default constructor.
Definition: RooImproperIntegrator1D.cxx:65
RooImproperIntegrator1D::_origFunc
RooAbsFunc * _origFunc
Definition: RooImproperIntegrator1D.h:60
RooImproperIntegrator1D::OpenBelowSpansZero
@ OpenBelowSpansZero
Definition: RooImproperIntegrator1D.h:53
RooImproperIntegrator1D::initialize
void initialize(const RooAbsFunc *function=0)
Initialize the integrator, construct and initialize subintegrators.
Definition: RooImproperIntegrator1D.cxx:142
RooInvTransform
Lightweight function binding that returns the inverse of an input function binding.
Definition: RooInvTransform.h:21
RooImproperIntegrator1D::canIntegrateND
virtual Bool_t canIntegrateND() const
Definition: RooImproperIntegrator1D.h:43
RooAbsIntegrator::setLimits
virtual Bool_t setLimits(Double_t *, Double_t *)
Definition: RooAbsIntegrator.h:61
RooImproperIntegrator1D::registerIntegrator
static void registerIntegrator(RooNumIntFactory &fact)
Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory.
Definition: RooImproperIntegrator1D.cxx:54
RooImproperIntegrator1D::_xmin
Double_t _xmin
Definition: RooImproperIntegrator1D.h:57
RooImproperIntegrator1D::Invalid
@ Invalid
Definition: RooImproperIntegrator1D.h:53
RooImproperIntegrator1D::_integrator1
RooIntegrator1D * _integrator1
Definition: RooImproperIntegrator1D.h:63
xmin
float xmin
Definition: THbookFile.cxx:95
RooIntegrator1D
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
Definition: RooIntegrator1D.h:22
RooImproperIntegrator1D
Special numeric integrator that can handle integrals over open domains.
Definition: RooImproperIntegrator1D.h:25
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooImproperIntegrator1D::integral
virtual Double_t integral(const Double_t *yvec=0)
Calculate the integral at the given parameter values of the function binding.
Definition: RooImproperIntegrator1D.cxx:332
RooAbsIntegrator.h
RooImproperIntegrator1D::canIntegrate1D
virtual Bool_t canIntegrate1D() const
Definition: RooImproperIntegrator1D.h:41
RooImproperIntegrator1D::OpenBelow
@ OpenBelow
Definition: RooImproperIntegrator1D.h:53
RooImproperIntegrator1D::_useIntegrandLimits
Bool_t _useIntegrandLimits
Definition: RooImproperIntegrator1D.h:58
Double_t
double Double_t
Definition: RtypesCore.h:59
RooImproperIntegrator1D::_xmax
Double_t _xmax
Definition: RooImproperIntegrator1D.h:57
RooImproperIntegrator1D::~RooImproperIntegrator1D
virtual ~RooImproperIntegrator1D()
Destructor.
Definition: RooImproperIntegrator1D.cxx:210
RooImproperIntegrator1D::OpenAbove
@ OpenAbove
Definition: RooImproperIntegrator1D.h:54
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooImproperIntegrator1D::limitsCase
LimitsCase limitsCase() const
Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove.
Definition: RooImproperIntegrator1D.cxx:289
RooImproperIntegrator1D::_case
LimitsCase _case
Definition: RooImproperIntegrator1D.h:56
RooNumIntConfig
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
Definition: RooNumIntConfig.h:25
RooAbsIntegrator
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
Definition: RooAbsIntegrator.h:22
RooImproperIntegrator1D::setUseIntegrandLimits
virtual Bool_t setUseIntegrandLimits(Bool_t flag)
Interface function that allows to defer limit definition to integrand definition.
Definition: RooImproperIntegrator1D.h:38
RooImproperIntegrator1D::LimitsCase
LimitsCase
Definition: RooImproperIntegrator1D.h:53