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 
24 public:
25 
26  // Constructors, assignment etc
28  RooSegmentedIntegrator1D(const RooAbsFunc& function, const RooNumIntConfig& config) ;
30 
31  virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
32  virtual ~RooSegmentedIntegrator1D();
33 
34  virtual Bool_t checkLimits() const;
35  virtual Double_t integral(const Double_t *yvec=0) ;
36 
39  virtual Bool_t setUseIntegrandLimits(Bool_t flag) { _useIntegrandLimits = flag ; return kTRUE ; }
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 kFALSE ; }
45 
46 protected:
47 
48  friend class RooNumIntFactory ;
49  static void registerIntegrator(RooNumIntFactory& fact) ;
50 
51  mutable Double_t _xmin ;
52  mutable Double_t _xmax ;
53  mutable Double_t _range ;
55  Int_t _nseg ; // Number of segments
57 
59  RooIntegrator1D** _array ; // Array of segment integrators
60 
62 
63  ClassDef(RooSegmentedIntegrator1D,0) // 1-dimensional piece-wise numerical integration engine
64 };
65 
66 #endif
RooSegmentedIntegrator1D::checkLimits
virtual Bool_t checkLimits() const
Check that our integration range is finite and otherwise return kFALSE.
Definition: RooSegmentedIntegrator1D.cxx:183
RooNumIntFactory
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Definition: RooNumIntFactory.h:30
RooSegmentedIntegrator1D::_valid
Bool_t _valid
Definition: RooSegmentedIntegrator1D.h:54
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooNumIntConfig.h
RooSegmentedIntegrator1D::~RooSegmentedIntegrator1D
virtual ~RooSegmentedIntegrator1D()
Destructor.
Definition: RooSegmentedIntegrator1D.cxx:149
RooSegmentedIntegrator1D::canIntegrateND
virtual Bool_t canIntegrateND() const
Definition: RooSegmentedIntegrator1D.h:43
RooSegmentedIntegrator1D::setLimits
virtual Bool_t setLimits(Double_t *, Double_t *)
Definition: RooAbsIntegrator.h:61
xmax
float xmax
Definition: THbookFile.cxx:95
bool
RooAbsFunc
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:27
RooSegmentedIntegrator1D::_xmax
Double_t _xmax
Definition: RooSegmentedIntegrator1D.h:52
RooSegmentedIntegrator1D::_config
RooNumIntConfig _config
Definition: RooSegmentedIntegrator1D.h:58
RooSegmentedIntegrator1D::canIntegrate2D
virtual Bool_t canIntegrate2D() const
Definition: RooSegmentedIntegrator1D.h:42
RooAbsIntegrator::setLimits
virtual Bool_t setLimits(Double_t *, Double_t *)
Definition: RooAbsIntegrator.h:61
RooSegmentedIntegrator1D
RooSegmentedIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
Definition: RooSegmentedIntegrator1D.h:23
xmin
float xmin
Definition: THbookFile.cxx:95
RooSegmentedIntegrator1D::initialize
Bool_t initialize()
One-time integrator initialization.
Definition: RooSegmentedIntegrator1D.cxx:119
RooIntegrator1D
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
Definition: RooIntegrator1D.h:22
RooSegmentedIntegrator1D::integral
virtual Double_t integral(const Double_t *yvec=0)
Evaluate integral at given function binding parameter values.
Definition: RooSegmentedIntegrator1D.cxx:215
RooSegmentedIntegrator1D::setUseIntegrandLimits
virtual Bool_t setUseIntegrandLimits(Bool_t flag)
Interface function that allows to defer limit definition to integrand definition.
Definition: RooSegmentedIntegrator1D.h:39
RooSegmentedIntegrator1D::_xmin
Double_t _xmin
Definition: RooSegmentedIntegrator1D.h:51
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsIntegrator.h
RooSegmentedIntegrator1D::clone
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Virtual constructor with given function and configuration. Needed by RooNumIntFactory.
Definition: RooSegmentedIntegrator1D.cxx:107
RooSegmentedIntegrator1D::_nseg
Int_t _nseg
Definition: RooSegmentedIntegrator1D.h:55
RooIntegrator1D.h
Double_t
double Double_t
Definition: RtypesCore.h:59
RooSegmentedIntegrator1D::_range
Double_t _range
Definition: RooSegmentedIntegrator1D.h:53
RooSegmentedIntegrator1D::canIntegrateOpenEnded
virtual Bool_t canIntegrateOpenEnded() const
Definition: RooSegmentedIntegrator1D.h:44
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
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
RooSegmentedIntegrator1D::canIntegrate1D
virtual Bool_t canIntegrate1D() const
Definition: RooSegmentedIntegrator1D.h:41
RooSegmentedIntegrator1D::_array
RooIntegrator1D ** _array
Definition: RooSegmentedIntegrator1D.h:59
RooSegmentedIntegrator1D::RooSegmentedIntegrator1D
RooSegmentedIntegrator1D()
Constructor.
Definition: RooSegmentedIntegrator1D.cxx:65
RooSegmentedIntegrator1D::registerIntegrator
static void registerIntegrator(RooNumIntFactory &fact)
Register RooSegmentedIntegrator1D, its parameters, dependencies and capabilities with RooNumIntFactor...
Definition: RooSegmentedIntegrator1D.cxx:52
int
RooSegmentedIntegrator1D::_useIntegrandLimits
Bool_t _useIntegrandLimits
Definition: RooSegmentedIntegrator1D.h:56