55 _xlo(0), _xhi(0), _ownBoundLo(
kTRUE), _ownBoundHi(
kTRUE),
66 _xlo(0), _xhi(0), _ownBoundLo(
kTRUE), _ownBoundHi(
kTRUE),
80 _xlo(0), _xhi(0), _ownBoundLo(
kTRUE), _ownBoundHi(
kTRUE),
85 setRange(boundaries[0], boundaries[nbins]);
94 _ownBoundLo(other._ownBoundLo), _ownBoundHi(other._ownBoundHi),
95 _nbins(other._nbins), _boundaries(other._boundaries), _array(0),
113 std::vector<Double_t>::iterator it =
142 std::vector<Double_t>::iterator it = std::lower_bound(
_boundaries.begin(),
176 for (
Int_t i = 0; i <= nbins; ++i)
177 addBoundary((
double(nbins - i) /
double(nbins)) * xlo +
178 (
double(i) /
double(nbins)) * xhi);
198 std::vector<Double_t>::const_iterator it = std::lower_bound(
213 return (std::abs(xl -
x) < std::abs(xh -
x)) ? xl : xh;
260 std::vector<Double_t>::const_iterator it = std::lower_bound(
273 if (0 > bin || bin >=
_nbins) {
287 if (
binEdges(bin, xlo, xhi))
return 0;
288 return 0.5 * (xlo + xhi);
297 if (
binEdges(bin, xlo, xhi))
return 0;
307 if (
binEdges(bin, xlo, xhi))
return 0;
317 if (
binEdges(bin, xlo, xhi))
return 0;
324void RooBinning::Streamer(
TBuffer &R__b)
341 RooAbsBinning::Streamer(R__b);
361 throw std::string(
"Unknown class version!");
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
Class RooBinning is an implements RooAbsBinning in terms of an array of boundary values,...
virtual void setRange(Double_t xlo, Double_t xhi)
Change the defined range associated with this binning.
virtual Int_t binNumber(Double_t x) const
Return sequential bin number that contains value x where bin zero is the first bin with an upper boun...
virtual Double_t binLow(Int_t bin) const
Return the lower bound of the requested bin.
Bool_t hasBoundary(Double_t boundary)
Check if boundary exists at given value.
virtual Double_t binCenter(Int_t bin) const
Return the position of the center of bin 'bin'.
void updateBinCount()
Update the internal bin counter.
virtual Int_t rawBinNumber(Double_t x) const
Return sequential bin number that contains value x where bin zero is the first bin that is defined,...
virtual Int_t numBoundaries() const
Int_t _blo
Array of boundaries.
Bool_t binEdges(Int_t bin, Double_t &xlo, Double_t &xhi) const
Return upper and lower bound of bin 'bin'.
void addUniform(Int_t nBins, Double_t xlo, Double_t xhi)
Add array of nbins uniformly sized bins in range [xlo,xhi].
Bool_t addBoundary(Double_t boundary)
Add bin boundary at given value.
void addBoundaryPair(Double_t boundary, Double_t mirrorPoint=0)
Add pair of boundaries: one at 'boundary' and one at 2*mirrorPoint-boundary.
Bool_t removeBoundary(Double_t boundary)
Remove boundary at given value.
RooBinning(Double_t xlo=-RooNumber::infinity(), Double_t xhi=RooNumber::infinity(), const char *name=0)
Constructor for an initially empty binning defining the range [xlo,xhi].
virtual Double_t binHigh(Int_t bin) const
Return the upper bound of the requested bin.
virtual Double_t binWidth(Int_t bin) const
Return the width of the requested bin.
virtual Double_t nearestBoundary(Double_t x) const
Return the value of the nearest boundary to x.
std::vector< Double_t > _boundaries
virtual Double_t * array() const
Return array of boundary values.
RooDouble is a minimal implementation of a TObject holding a Double_t value.
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Iterator abstract base class.
virtual TObject * Next()=0
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.