RooImproperIntegrator1D.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooImproperIntegrator1D.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_IMPROPER_INTEGRATOR_1D
00017 #define ROO_IMPROPER_INTEGRATOR_1D
00018 
00019 #include "RooAbsIntegrator.h"
00020 #include "RooNumIntConfig.h"
00021 
00022 class RooInvTransform;
00023 class RooIntegrator1D;
00024 
00025 class RooImproperIntegrator1D : public RooAbsIntegrator {
00026 public:
00027 
00028   RooImproperIntegrator1D() ;
00029   RooImproperIntegrator1D(const RooAbsFunc& function);
00030   RooImproperIntegrator1D(const RooAbsFunc& function, const RooNumIntConfig& config);
00031   RooImproperIntegrator1D(const RooAbsFunc& function, Double_t xmin, Double_t xmax, const RooNumIntConfig& config);
00032   virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
00033   virtual ~RooImproperIntegrator1D();
00034 
00035   virtual Bool_t checkLimits() const;
00036   using RooAbsIntegrator::setLimits ;
00037   Bool_t setLimits(Double_t* xmin, Double_t* xmax);
00038   virtual Bool_t setUseIntegrandLimits(Bool_t flag) {_useIntegrandLimits = flag ; return kTRUE ; }
00039   virtual Double_t integral(const Double_t* yvec=0) ;
00040 
00041   virtual Bool_t canIntegrate1D() const { return kTRUE ; }
00042   virtual Bool_t canIntegrate2D() const { return kFALSE ; }
00043   virtual Bool_t canIntegrateND() const { return kFALSE ; }
00044   virtual Bool_t canIntegrateOpenEnded() const { return kTRUE ; }
00045 
00046 protected:
00047 
00048   friend class RooNumIntFactory ;
00049   static void registerIntegrator(RooNumIntFactory& fact) ;      
00050 
00051   void initialize(const RooAbsFunc* function=0) ;
00052 
00053   enum LimitsCase { Invalid, ClosedBothEnds, OpenBothEnds, OpenBelowSpansZero, OpenBelow,
00054                     OpenAboveSpansZero, OpenAbove };
00055   LimitsCase limitsCase() const;
00056   LimitsCase _case; // Configuration of limits
00057   mutable Double_t _xmin, _xmax;  // Value of limits
00058   Bool_t _useIntegrandLimits;  // Use limits in function binding?
00059 
00060   RooAbsFunc*      _origFunc ;  // Original function binding
00061   RooInvTransform *_function;   // Binding with inverse of function
00062   RooNumIntConfig  _config ;  // Configuration object
00063   mutable RooIntegrator1D *_integrator1,*_integrator2,*_integrator3; // Piece integrators
00064   
00065   ClassDef(RooImproperIntegrator1D,0) // 1-dimensional improper integration engine
00066 };
00067 
00068 #endif

Generated on Tue Jul 5 14:26:12 2011 for ROOT_528-00b_version by  doxygen 1.5.1