Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:25

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id: RooNumIntConfig.h,v 1.8 2007/05/11 09:11:30 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_NUM_INT_CONFIG
0017 #define ROO_NUM_INT_CONFIG
0018 
0019 #include "TObject.h"
0020 #include "RooCategory.h"
0021 #include "RooLinkedList.h"
0022 class RooNumIntFactory ;
0023 class RooAbsIntegrator ;
0024 
0025 class RooNumIntConfig : public TObject, public RooPrintable {
0026 public:
0027 
0028   RooNumIntConfig();
0029   RooNumIntConfig(const RooNumIntConfig& other) ;
0030   RooNumIntConfig& operator=(const RooNumIntConfig& other) ;
0031   ~RooNumIntConfig() override;
0032 
0033   // Return selected integration techniques for 1,2,N dimensional integrals
0034   RooCategory& method1D() { return _method1D ; }
0035   RooCategory& method2D() { return _method2D ; }
0036   RooCategory& methodND() { return _methodND ; }
0037   const RooCategory& method1D() const { return _method1D ; }
0038   const RooCategory& method2D() const { return _method2D ; }
0039   const RooCategory& methodND() const { return _methodND ; }
0040 
0041   // Return selected integration techniques for 1,2,N dimensional open-ended integrals
0042   RooCategory& method1DOpen() { return _method1DOpen ; }
0043   RooCategory& method2DOpen() { return _method2DOpen ; }
0044   RooCategory& methodNDOpen() { return _methodNDOpen ; }
0045   const RooCategory& method1DOpen() const { return _method1DOpen ; }
0046   const RooCategory& method2DOpen() const { return _method2DOpen ; }
0047   const RooCategory& methodNDOpen() const { return _methodNDOpen ; }
0048 
0049   // Set/get absolute and relative precision convergence criteria
0050   double epsAbs() const { return _epsAbs ; }
0051   double epsRel() const { return _epsRel ; }
0052   void setEpsAbs(double newEpsAbs) ;
0053   void setEpsRel(double newEpsRel) ;
0054 
0055   // Set/get switch that activates printing of number of required
0056   // function evaluations for each numeric integration
0057   bool printEvalCounter() const { return _printEvalCounter ; }
0058   void setPrintEvalCounter(bool newVal) { _printEvalCounter = newVal ; }
0059 
0060   static RooNumIntConfig& defaultConfig() ;
0061 
0062   bool addConfigSection(std::string const &name, const RooArgSet &inDefaultConfig, bool canIntegrate1D,
0063                         bool canIntegrate2D, bool canIntegrateND, bool canIntegrateOpenEnded);
0064   const RooArgSet& getConfigSection(const char* name) const ;
0065   RooArgSet& getConfigSection(const char* name) ;
0066 
0067   void printMultiline(std::ostream &os, Int_t content, bool verbose, TString indent= "") const override;
0068 
0069   StyleOption defaultPrintStyle(Option_t* opt) const override ;
0070   inline void Print(Option_t *options= nullptr) const override {
0071     printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
0072   }
0073 
0074 protected:
0075   double _epsAbs          ; ///< Absolute precision
0076   double _epsRel          ; ///< Relative precision
0077   bool   _printEvalCounter ; ///< Flag to control printing of function evaluation counter
0078 
0079   RooCategory _method1D     ; ///< Selects integration method for 1D integrals
0080   RooCategory _method2D     ; ///< Selects integration method for 2D integrals
0081   RooCategory _methodND     ; ///< Selects integration method for ND integrals
0082   RooCategory _method1DOpen ; ///< Selects integration method for open ended 1D integrals
0083   RooCategory _method2DOpen ; ///< Selects integration method for open ended 2D integrals
0084   RooCategory _methodNDOpen ; ///< Selects integration method for open ended ND integrals
0085   RooLinkedList _configSets ; ///< List of configuration sets for individual integration methods
0086 
0087   ClassDefOverride(RooNumIntConfig,1) // Numeric Integrator configuration
0088 };
0089 
0090 #endif
0091 
0092