RooUniformBinning.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooUniformBinning.h,v 1.10 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_UNIFORM_BINNING
00017 #define ROO_UNIFORM_BINNING
00018 
00019 #include "Rtypes.h"
00020 #include "RooAbsBinning.h"
00021 class TIterator ;
00022 
00023 class RooUniformBinning : public RooAbsBinning {
00024 public:
00025 
00026   RooUniformBinning(const char* name=0) ;
00027   RooUniformBinning(Double_t xlo, Double_t xhi, Int_t nBins, const char* name=0) ;
00028   RooUniformBinning(const RooUniformBinning& other, const char* name=0) ;
00029   RooAbsBinning* clone(const char* name=0) const { return new RooUniformBinning(*this,name?name:GetName()) ; }
00030   virtual ~RooUniformBinning() ;
00031 
00032   virtual void setRange(Double_t xlo, Double_t xhi) ;
00033 
00034   virtual Int_t numBoundaries() const { return _nbins + 1 ; }
00035   virtual Int_t binNumber(Double_t x) const  ;
00036   virtual Bool_t isUniform() const { return kTRUE ; }
00037 
00038   virtual Double_t lowBound() const { return _xlo ; }
00039   virtual Double_t highBound() const { return _xhi ; }
00040 
00041   virtual Double_t binCenter(Int_t bin) const ;
00042   virtual Double_t binWidth(Int_t bin) const ;
00043   virtual Double_t binLow(Int_t bin) const ;
00044   virtual Double_t binHigh(Int_t bin) const ;
00045 
00046   virtual Double_t averageBinWidth() const { return _binw ; }
00047   virtual Double_t* array() const ;
00048 
00049 protected:
00050 
00051   mutable Double_t* _array ; //! do not persist
00052   Double_t _xlo ;
00053   Double_t _xhi ;
00054   Int_t    _nbins ;
00055   Double_t _binw ;
00056 
00057 
00058   ClassDef(RooUniformBinning,1) // Uniform binning specification
00059 };
00060 
00061 #endif

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