library: libRooFit #include "RooMCIntegrator.h"

# RooMCIntegrator

class description - source file - inheritance tree (.pdf)

## class RooMCIntegrator : public RooAbsIntegrator

| Inheritance Chart:
`TObject`
| <- | `RooAbsIntegrator`
| <- | `RooMCIntegrator` |

        public:

                                         RooMCIntegrator()
                                         RooMCIntegrator(const RooAbsFunc& function, RooMCIntegrator::SamplingMode mode = Importance, RooMCIntegrator::GeneratorType genType = QuasiRandom, Bool_t verbose = kFALSE)
                                         RooMCIntegrator(const RooAbsFunc& function, const RooNumIntConfig& config)
                                         RooMCIntegrator(const RooMCIntegrator&)
                                 virtual ~RooMCIntegrator()
                          virtual Bool_t canIntegrate1D() const
                          virtual Bool_t canIntegrate2D() const
                          virtual Bool_t canIntegrateND() const
                          virtual Bool_t canIntegrateOpenEnded() const
                          virtual Bool_t checkLimits() const
                          static TClass* Class()
               virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const
                                Double_t getAlpha() const
          RooMCIntegrator::GeneratorType getGenType() const
                          const RooGrid& grid() const
                        virtual Double_t integral(const Double_t* yvec = 0)
                         virtual TClass* IsA() const
                                    void setAlpha(Double_t alpha)
                                    void setGenType(RooMCIntegrator::GeneratorType type)
                            virtual void ShowMembers(TMemberInspector& insp, char* parent)
                            virtual void Streamer(TBuffer& b)
                                    void StreamerNVirtual(TBuffer& b)
                                Double_t vegas(RooMCIntegrator::Stage stage, UInt_t calls, UInt_t iterations, Double_t* absError = 0)

### Data Members

        protected:

                                 RooGrid _grid
                                  Bool_t _verbose
                                Double_t _alpha
                                   Int_t _mode
          RooMCIntegrator::GeneratorType _genType
                                   Int_t _nRefineIter
                                   Int_t _nRefinePerDim
                                   Int_t _nIntegratePerDim
                              TStopwatch _timer
                                Double_t _jac
                                Double_t _wtd_int_sum
                                Double_t _sum_wgts
                                Double_t _chi_sum
                                Double_t _chisq
                                Double_t _result
                                Double_t _sigma
                                  UInt_t _it_start
                                  UInt_t _it_num
                                  UInt_t _samples
                                  UInt_t _calls_per_box

        public:

           static const RooMCIntegrator::SamplingMode Importance
           static const RooMCIntegrator::SamplingMode ImportanceOnly
           static const RooMCIntegrator::SamplingMode Stratified
          static const RooMCIntegrator::GeneratorType QuasiRandom
          static const RooMCIntegrator::GeneratorType PseudoRandom
                  static const RooMCIntegrator::Stage AllStages
                  static const RooMCIntegrator::Stage ReuseGrid
                  static const RooMCIntegrator::Stage RefineGrid

## Class Description

RooMCIntegrator()

     Dummy default ctor

RooMCIntegrator(const RooAbsFunc& function, SamplingMode mode, GeneratorType genType, Bool_t verbose) : RooAbsIntegrator(function), _grid(function), _verbose(verbose), _alpha(1.5), _mode(mode), _genType(genType), _nRefineIter(5),_nRefinePerDim(1000),_nIntegratePerDim(5000)

     check that our grid initialized without errors

RooMCIntegrator(const RooAbsFunc& function, const RooNumIntConfig& config) : RooAbsIntegrator(function), _grid(function)

RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const

~RooMCIntegrator()

Bool_t checkLimits() const

     Check if we can integrate over the current domain.

Double_t integral(const Double_t* /*yvec*/)

     Evaluate the integral using a fixed number of calls to evaluate the integrand
     equal to about 10k per dimension. Use the first 5k calls to refine the grid
     over 5 iterations of 1k calls each, and the remaining 5k calls for a single
     high statistics integration.

Double_t vegas(Stage stage, UInt_t calls, UInt_t iterations, Double_t *absError)

     Perform one step of Monte Carlo integration using the specified number of iterations
     with (approximately) the specified number of integrand evaluation calls per iteration.
     Use the VEGAS algorithm, starting from the specified stage. Returns the best estimate
     of the integral. Also sets *absError to the estimated absolute error of the integral
     estimate if absError is non-zero.

### Inline Functions

                                  Double_t getAlpha() const
                                      void setAlpha(Double_t alpha)
            RooMCIntegrator::GeneratorType getGenType() const
                                      void setGenType(RooMCIntegrator::GeneratorType type)
                            const RooGrid& grid() const
                                    Bool_t canIntegrate1D() const
                                    Bool_t canIntegrate2D() const
                                    Bool_t canIntegrateND() const
                                    Bool_t canIntegrateOpenEnded() const
                                   TClass* Class()
                                   TClass* IsA() const
                                      void ShowMembers(TMemberInspector& insp, char* parent)
                                      void Streamer(TBuffer& b)
                                      void StreamerNVirtual(TBuffer& b)
                           RooMCIntegrator RooMCIntegrator(const RooMCIntegrator&)

Last update: Tue Jun 28 18:13:30 2005
Copyright (c) 2000-2005, Regents of the University of California *