Logo ROOT  
Reference Guide
RooSegmentedIntegrator1D.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooSegmentedIntegrator1D.h,v 1.7 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_SEGMENTED_INTEGRATOR_1D
17#define ROO_SEGMENTED_INTEGRATOR_1D
18
19#include "RooAbsIntegrator.h"
20#include "RooIntegrator1D.h"
21#include "RooNumIntConfig.h"
22
24public:
25
26 // Constructors, assignment etc
29 RooSegmentedIntegrator1D(const RooAbsFunc& function, double xmin, double xmax, const RooNumIntConfig& config) ;
30
31 RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const override ;
33
34 bool checkLimits() const override;
35 double integral(const double *yvec=0) override ;
36
38 bool setLimits(double *xmin, double *xmax) override;
39 bool setUseIntegrandLimits(bool flag) override { _useIntegrandLimits = flag ; return true ; }
40
41 bool canIntegrate1D() const override { return true ; }
42 bool canIntegrate2D() const override { return false ; }
43 bool canIntegrateND() const override { return false ; }
44 bool canIntegrateOpenEnded() const override { return false ; }
45
46protected:
47
48 friend class RooNumIntFactory ;
49 static void registerIntegrator(RooNumIntFactory& fact) ;
50
51 mutable double _xmin ;
52 mutable double _xmax ;
53 mutable double _range ;
54 bool _valid ;
55 Int_t _nseg ; // Number of segments
57
59 RooIntegrator1D** _array ; ///< Array of segment integrators
60
61 bool initialize();
62
63 ClassDefOverride(RooSegmentedIntegrator1D,0) // 1-dimensional piece-wise numerical integration engine
64};
65
66#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
float xmin
Definition: THbookFile.cxx:95
float xmax
Definition: THbookFile.cxx:95
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:27
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
virtual bool setLimits(double *, double *)
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
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 ...
RooSegmentedIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
double integral(const double *yvec=0) override
Evaluate integral at given function binding parameter values.
static void registerIntegrator(RooNumIntFactory &fact)
Register RooSegmentedIntegrator1D, its parameters, dependencies and capabilities with RooNumIntFactor...
bool canIntegrate2D() const override
bool canIntegrateOpenEnded() const override
bool canIntegrateND() const override
bool setUseIntegrandLimits(bool flag) override
Interface function that allows to defer limit definition to integrand definition.
bool checkLimits() const override
Check that our integration range is finite and otherwise return false.
bool canIntegrate1D() const override
~RooSegmentedIntegrator1D() override
Destructor.
RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const override
Virtual constructor with given function and configuration. Needed by RooNumIntFactory.
bool setLimits(double *xmin, double *xmax) override
Change our integration limits.
RooIntegrator1D ** _array
Array of segment integrators.
bool initialize()
One-time integrator initialization.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:167