Logo ROOT   6.18/05
Reference Guide
RooUniformBinning.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooUniformBinning.h,v 1.10 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_UNIFORM_BINNING
17#define ROO_UNIFORM_BINNING
18
19#include "Rtypes.h"
20#include "RooAbsBinning.h"
21class TIterator ;
22
24public:
25
26 RooUniformBinning(const char* name=0) ;
27 RooUniformBinning(Double_t xlo, Double_t xhi, Int_t nBins, const char* name=0) ;
28 RooUniformBinning(const RooUniformBinning& other, const char* name=0) ;
29 RooAbsBinning* clone(const char* name=0) const { return new RooUniformBinning(*this,name?name:GetName()) ; }
30 virtual ~RooUniformBinning() ;
31
32 virtual void setRange(Double_t xlo, Double_t xhi) ;
33
34 virtual Int_t numBoundaries() const { return _nbins + 1 ; }
35 virtual Int_t binNumber(Double_t x) const ;
36 virtual Bool_t isUniform() const { return kTRUE ; }
37
38 virtual Double_t lowBound() const { return _xlo ; }
39 virtual Double_t highBound() const { return _xhi ; }
40
41 virtual Double_t binCenter(Int_t bin) const ;
42 virtual Double_t binWidth(Int_t bin) const ;
43 virtual Double_t binLow(Int_t bin) const ;
44 virtual Double_t binHigh(Int_t bin) const ;
45
46 virtual Double_t averageBinWidth() const { return _binw ; }
47 virtual Double_t* array() const ;
48
49protected:
50
51 mutable Double_t* _array ; //! do not persist
56
57
58 ClassDef(RooUniformBinning,1) // Uniform binning specification
59};
60
61#endif
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassDef(name, id)
Definition: Rtypes.h:326
char name[80]
Definition: TGX11.cxx:109
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
Definition: RooAbsBinning.h:26
RooUniformBinning is an implementation of RooAbsBinning that provides a uniform binning in 'n' bins b...
virtual ~RooUniformBinning()
Destructor.
virtual Double_t binWidth(Int_t bin) const
Return the bin width (same for all bins)
RooAbsBinning * clone(const char *name=0) const
virtual Int_t binNumber(Double_t x) const
Return the index of the bin that encloses 'x'.
virtual Double_t * array() const
Return an array of doubles with the bin boundaries.
virtual Double_t binHigh(Int_t bin) const
Return the high edge of the 'i'-th fit bin.
virtual void setRange(Double_t xlo, Double_t xhi)
Change range to [xlo,xhi].
virtual Double_t binCenter(Int_t bin) const
Return the central value of the 'i'-th fit bin.
virtual Double_t highBound() const
virtual Double_t lowBound() const
virtual Double_t averageBinWidth() const
virtual Int_t numBoundaries() const
RooUniformBinning(const char *name=0)
Default Constructor coverity[UNINIT_CTOR].
Double_t _xlo
do not persist
virtual Double_t binLow(Int_t bin) const
Return the low edge of the 'i'-th fit bin.
virtual Bool_t isUniform() const
Iterator abstract base class.
Definition: TIterator.h:30
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
Double_t x[n]
Definition: legend1.C:17