RooSegmentedIntegrator1D.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooSegmentedIntegrator1D.h,v 1.7 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_SEGMENTED_INTEGRATOR_1D
00017 #define ROO_SEGMENTED_INTEGRATOR_1D
00018 
00019 #include "RooAbsIntegrator.h"
00020 #include "RooIntegrator1D.h"
00021 #include "RooNumIntConfig.h"
00022 
00023 class RooSegmentedIntegrator1D : public RooAbsIntegrator {
00024 public:
00025 
00026   // Constructors, assignment etc
00027   RooSegmentedIntegrator1D() ;
00028   RooSegmentedIntegrator1D(const RooAbsFunc& function, const RooNumIntConfig& config) ;
00029   RooSegmentedIntegrator1D(const RooAbsFunc& function, Double_t xmin, Double_t xmax, const RooNumIntConfig& config) ;
00030 
00031   virtual RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const ;
00032   virtual ~RooSegmentedIntegrator1D();
00033 
00034   virtual Bool_t checkLimits() const;
00035   virtual Double_t integral(const Double_t *yvec=0) ;
00036 
00037   using RooAbsIntegrator::setLimits ;
00038   Bool_t setLimits(Double_t *xmin, Double_t *xmax);
00039   virtual Bool_t setUseIntegrandLimits(Bool_t flag) { _useIntegrandLimits = flag ; return kTRUE ; } 
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 kFALSE ; }
00045 
00046 protected:
00047 
00048   friend class RooNumIntFactory ;
00049   static void registerIntegrator(RooNumIntFactory& fact) ;      
00050 
00051   mutable Double_t _xmin ;
00052   mutable Double_t _xmax ;
00053   mutable Double_t _range ;
00054   Bool_t _valid ;
00055   Int_t _nseg ; // Number of segments 
00056   Bool_t _useIntegrandLimits ;
00057 
00058   RooNumIntConfig _config ;  
00059   RooIntegrator1D** _array ; // Array of segment integrators
00060 
00061   Bool_t initialize();
00062 
00063   ClassDef(RooSegmentedIntegrator1D,0) // 1-dimensional piece-wise numerical integration engine
00064 };
00065 
00066 #endif

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