Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooNumIntConfig.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooNumIntConfig.h,v 1.8 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_NUM_INT_CONFIG
17#define ROO_NUM_INT_CONFIG
18
19#include "TObject.h"
20#include "RooCategory.h"
21#include "RooLinkedList.h"
22class RooNumIntFactory ;
23class RooAbsIntegrator ;
24
25class RooNumIntConfig : public TObject, public RooPrintable {
26public:
27
29 RooNumIntConfig(const RooNumIntConfig& other) ;
31 ~RooNumIntConfig() override;
32
33 // Return selected integration techniques for 1,2,N dimensional integrals
37 const RooCategory& method1D() const { return _method1D ; }
38 const RooCategory& method2D() const { return _method2D ; }
39 const RooCategory& methodND() const { return _methodND ; }
40
41 // Return selected integration techniques for 1,2,N dimensional open-ended integrals
45 const RooCategory& method1DOpen() const { return _method1DOpen ; }
46 const RooCategory& method2DOpen() const { return _method2DOpen ; }
47 const RooCategory& methodNDOpen() const { return _methodNDOpen ; }
48
49 // Set/get absolute and relative precision convergence criteria
50 double epsAbs() const { return _epsAbs ; }
51 double epsRel() const { return _epsRel ; }
52 void setEpsAbs(double newEpsAbs) ;
53 void setEpsRel(double newEpsRel) ;
54
55 // Set/get switch that activates printing of number of required
56 // function evaluations for each numeric integration
57 bool printEvalCounter() const { return _printEvalCounter ; }
58 void setPrintEvalCounter(bool newVal) { _printEvalCounter = newVal ; }
59
61
62 bool addConfigSection(std::string const &name, const RooArgSet &inDefaultConfig, bool canIntegrate1D,
63 bool canIntegrate2D, bool canIntegrateND, bool canIntegrateOpenEnded);
64 const RooArgSet& getConfigSection(const char* name) const ;
65 RooArgSet& getConfigSection(const char* name) ;
66
67 void printMultiline(std::ostream &os, Int_t content, bool verbose, TString indent= "") const override;
68
69 StyleOption defaultPrintStyle(Option_t* opt) const override ;
70 inline void Print(Option_t *options= nullptr) const override {
72 }
73
74protected:
75 double _epsAbs ; ///< Absolute precision
76 double _epsRel ; ///< Relative precision
77 bool _printEvalCounter ; ///< Flag to control printing of function evaluation counter
78
79 RooCategory _method1D ; ///< Selects integration method for 1D integrals
80 RooCategory _method2D ; ///< Selects integration method for 2D integrals
81 RooCategory _methodND ; ///< Selects integration method for ND integrals
82 RooCategory _method1DOpen ; ///< Selects integration method for open ended 1D integrals
83 RooCategory _method2DOpen ; ///< Selects integration method for open ended 2D integrals
84 RooCategory _methodNDOpen ; ///< Selects integration method for open ended ND integrals
85 RooLinkedList _configSets ; ///< List of configuration sets for individual integration methods
86
87 ClassDefOverride(RooNumIntConfig,1) // Numeric Integrator configuration
88};
89
90#endif
91
92
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition TGX11.cxx:110
Abstract interface for integrators of real-valued functions that implement the RooAbsFunc interface.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Object to represent discrete states.
Definition RooCategory.h:28
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
RooCategory _method1D
Selects integration method for 1D integrals.
RooCategory _method1DOpen
Selects integration method for open ended 1D integrals.
RooCategory & method2DOpen()
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
RooCategory & method2D()
void printMultiline(std::ostream &os, Int_t content, bool verbose, TString indent="") const override
Detailed printing interface.
RooNumIntConfig()
Constructor.
const RooCategory & method2D() const
const RooCategory & method2DOpen() const
RooCategory & methodND()
const RooCategory & method1DOpen() const
RooLinkedList _configSets
List of configuration sets for individual integration methods.
void setEpsRel(double newEpsRel)
Set relative convergence criteria (convergence if std::abs(Err)/abs(Int)<newEpsRel)
RooCategory _methodND
Selects integration method for ND integrals.
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
double _epsAbs
Absolute precision.
RooCategory _methodNDOpen
Selects integration method for open ended ND integrals.
bool _printEvalCounter
Flag to control printing of function evaluation counter.
RooCategory & methodNDOpen()
double epsRel() const
const RooCategory & method1D() const
double _epsRel
Relative precision.
~RooNumIntConfig() override
Destructor.
StyleOption defaultPrintStyle(Option_t *opt) const override
bool addConfigSection(std::string const &name, const RooArgSet &inDefaultConfig, bool canIntegrate1D, bool canIntegrate2D, bool canIntegrateND, bool canIntegrateOpenEnded)
Add a configuration section for a particular integrator.
RooCategory _method2D
Selects integration method for 2D integrals.
void setPrintEvalCounter(bool newVal)
const RooCategory & methodNDOpen() const
RooCategory & method1D()
RooCategory & method1DOpen()
const RooCategory & methodND() const
double epsAbs() const
bool printEvalCounter() const
RooCategory _method2DOpen
Selects integration method for open ended 2D integrals.
RooNumIntConfig & operator=(const RooNumIntConfig &other)
Assignment operator from other RooNumIntConfig.
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
void setEpsAbs(double newEpsAbs)
Set absolute convergence criteria (convergence if std::abs(Err)<newEpsAbs)
Factory to instantiate numeric integrators from a given function binding and a given configuration.
A 'mix-in' base class that define the standard RooFit plotting and printing methods.
virtual Int_t defaultPrintContents(Option_t *opt) const
Default choice of contents to be printed (name and value)
static std::ostream & defaultPrintStream(std::ostream *os=nullptr)
Return a reference to the current default stream to use in Print().
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139