Logo ROOT   6.10/09
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;
37  Bool_t setLimits(Double_t* xmin, Double_t* xmax);
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
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
float xmin
Definition: THbookFile.cxx:93
LimitsCase limitsCase() const
Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
virtual Bool_t canIntegrateOpenEnded() const
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t setLimits(Double_t *, Double_t *)
static void registerIntegrator(RooNumIntFactory &fact)
Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory.
void initialize(const RooAbsFunc *function=0)
Initialize the integrator, construct and initialize subintegrators.
#define ClassDef(name, id)
Definition: Rtypes.h:297
Bool_t setLimits(Double_t *xmin, Double_t *xmax)
Change our integration limits.
virtual Bool_t canIntegrate2D() const
Lightweight function binding that returns the inverse of an input function binding Apply the change o...
RooImproperIntegrator1D()
Default constructor.
virtual Bool_t checkLimits() const
Check if the limits are valid.
Special numeric integrator that can handle integrals over open domains.
float xmax
Definition: THbookFile.cxx:93
virtual Bool_t canIntegrateND() const
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
double Double_t
Definition: RtypesCore.h:55
virtual Bool_t setUseIntegrandLimits(Bool_t flag)
Interface function that allows to defer limit definition to integrand definition. ...
virtual Bool_t canIntegrate1D() const
virtual Double_t integral(const Double_t *yvec=0)
Calculate the integral at the given parameter values of the function binding.
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Return clone of integrator with given function and configuration. Needed by RooNumIntFactory.
virtual ~RooImproperIntegrator1D()
Destructor.
const Bool_t kTRUE
Definition: RtypesCore.h:91
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23