/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooIntegrator2D.h,v 1.8 2007/05/11 09:11:30 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_INTEGRATOR_2D
#define ROO_INTEGRATOR_2D

#include "RooIntegrator1D.h"
#include "RooNumIntConfig.h"

class RooIntegrator2D : public RooIntegrator1D {
public:

  // Constructors, assignment etc
  RooIntegrator2D() ;
  RooIntegrator2D(const RooAbsFunc& function, RooIntegrator1D::SummationRule rule=RooIntegrator1D::Trapezoid,
		  Int_t maxSteps= 0, Double_t eps= 0) ; 
  RooIntegrator2D(const RooAbsFunc& function, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax,
		  SummationRule rule= Trapezoid, Int_t maxSteps= 0, Double_t eps= 0) ; 

  RooIntegrator2D(const RooAbsFunc& function, const RooNumIntConfig& config) ;
  RooIntegrator2D(const RooAbsFunc& function, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax,
		  const RooNumIntConfig& config) ;

  virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
  virtual ~RooIntegrator2D() ;

  virtual Bool_t checkLimits() const;

  virtual Bool_t canIntegrate1D() const { return kFALSE ; }
  virtual Bool_t canIntegrate2D() const { return kTRUE ; }
  virtual Bool_t canIntegrateND() const { return kFALSE ; }
  virtual Bool_t canIntegrateOpenEnded() const { return kFALSE ; }

protected:

  friend class RooNumIntFactory ;
  static void registerIntegrator(RooNumIntFactory& fact) ;	

  RooIntegrator1D* _xIntegrator ; // Integrator in first dimension
  RooAbsFunc* _xint ; // Function binding representing integral over first dimension

  ClassDef(RooIntegrator2D,0) // 2-dimensional numerical integration engine
};

#endif
 RooIntegrator2D.h:1
 RooIntegrator2D.h:2
 RooIntegrator2D.h:3
 RooIntegrator2D.h:4
 RooIntegrator2D.h:5
 RooIntegrator2D.h:6
 RooIntegrator2D.h:7
 RooIntegrator2D.h:8
 RooIntegrator2D.h:9
 RooIntegrator2D.h:10
 RooIntegrator2D.h:11
 RooIntegrator2D.h:12
 RooIntegrator2D.h:13
 RooIntegrator2D.h:14
 RooIntegrator2D.h:15
 RooIntegrator2D.h:16
 RooIntegrator2D.h:17
 RooIntegrator2D.h:18
 RooIntegrator2D.h:19
 RooIntegrator2D.h:20
 RooIntegrator2D.h:21
 RooIntegrator2D.h:22
 RooIntegrator2D.h:23
 RooIntegrator2D.h:24
 RooIntegrator2D.h:25
 RooIntegrator2D.h:26
 RooIntegrator2D.h:27
 RooIntegrator2D.h:28
 RooIntegrator2D.h:29
 RooIntegrator2D.h:30
 RooIntegrator2D.h:31
 RooIntegrator2D.h:32
 RooIntegrator2D.h:33
 RooIntegrator2D.h:34
 RooIntegrator2D.h:35
 RooIntegrator2D.h:36
 RooIntegrator2D.h:37
 RooIntegrator2D.h:38
 RooIntegrator2D.h:39
 RooIntegrator2D.h:40
 RooIntegrator2D.h:41
 RooIntegrator2D.h:42
 RooIntegrator2D.h:43
 RooIntegrator2D.h:44
 RooIntegrator2D.h:45
 RooIntegrator2D.h:46
 RooIntegrator2D.h:47
 RooIntegrator2D.h:48
 RooIntegrator2D.h:49
 RooIntegrator2D.h:50
 RooIntegrator2D.h:51
 RooIntegrator2D.h:52
 RooIntegrator2D.h:53
 RooIntegrator2D.h:54
 RooIntegrator2D.h:55
 RooIntegrator2D.h:56
 RooIntegrator2D.h:57