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
22class RooInvTransform;
23class RooIntegrator1D;
24
26public:
27
32 virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
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
46protected:
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
const Bool_t kFALSE
Definition: RtypesCore.h:90
bool Bool_t
Definition: RtypesCore.h:61
double Double_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:89
#define ClassDef(name, id)
Definition: Rtypes.h:322
float xmin
Definition: THbookFile.cxx:93
float xmax
Definition: THbookFile.cxx:93
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
virtual Bool_t setLimits(Double_t *, Double_t *)
Special numeric integrator that can handle integrals over open domains.
virtual Bool_t canIntegrate2D() const
LimitsCase limitsCase() const
Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove.
RooImproperIntegrator1D()
Default constructor.
virtual Bool_t checkLimits() const
Check if the limits are valid.
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Return clone of integrator with given function and configuration. Needed by RooNumIntFactory.
virtual Bool_t canIntegrate1D() const
virtual Bool_t canIntegrateND() const
void initialize(const RooAbsFunc *function=0)
Initialize the integrator, construct and initialize subintegrators.
virtual Double_t integral(const Double_t *yvec=0)
Calculate the integral at the given parameter values of the function binding.
virtual Bool_t setUseIntegrandLimits(Bool_t flag)
Interface function that allows to defer limit definition to integrand definition.
virtual ~RooImproperIntegrator1D()
Destructor.
static void registerIntegrator(RooNumIntFactory &fact)
Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory.
virtual Bool_t canIntegrateOpenEnded() const
Bool_t setLimits(Double_t *xmin, Double_t *xmax)
Change our integration limits.
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
Lightweight function binding that returns the inverse of an input function binding.
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 ...
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:151