Logo ROOT   6.08/07
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 
38  Bool_t setLimits(Double_t *xmin, Double_t *xmax);
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
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
float xmin
Definition: THbookFile.cxx:93
virtual Bool_t setUseIntegrandLimits(Bool_t flag)
Interface function that allows to defer limit definition to integrand definition. ...
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 ...
int Int_t
Definition: RtypesCore.h:41
virtual Bool_t canIntegrate2D() const
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual Bool_t setLimits(Double_t *, Double_t *)
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Virtual constructor with given function and configuration. Needed by RooNumIntFactory.
virtual Bool_t checkLimits() const
Check that our integration range is finite and otherwise return kFALSE.
Bool_t initialize()
One-time integrator initialization.
#define ClassDef(name, id)
Definition: Rtypes.h:254
static void registerIntegrator(RooNumIntFactory &fact)
Register RooSegmentedIntegrator1D, its parameters, dependencies and capabilities with RooNumIntFactor...
RooSegmentedIntegrator1D implements an adaptive one-dimensional numerical integration algorithm...
virtual Bool_t canIntegrate1D() const
virtual ~RooSegmentedIntegrator1D()
Destructor.
float xmax
Definition: THbookFile.cxx:93
virtual Bool_t canIntegrateND() const
RooIntegrator1D implements an adaptive one-dimensional numerical integration algorithm.
virtual Double_t integral(const Double_t *yvec=0)
Evaluate integral at given function binding parameter values.
double Double_t
Definition: RtypesCore.h:55
Bool_t setLimits(Double_t *xmin, Double_t *xmax)
Change our integration limits.
virtual Bool_t canIntegrateOpenEnded() const
const Bool_t kTRUE
Definition: Rtypes.h:91
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23