54 _xlo(0), _xhi(0), _ownBoundLo(
kTRUE), _ownBoundHi(
kTRUE),
65 _xlo(0), _xhi(0), _ownBoundLo(
kTRUE), _ownBoundHi(
kTRUE),
79 _xlo(0), _xhi(0), _ownBoundLo(
kTRUE), _ownBoundHi(
kTRUE),
84 setRange(boundaries[0], boundaries[nbins]);
93 _ownBoundLo(other._ownBoundLo), _ownBoundHi(other._ownBoundHi),
94 _nbins(other._nbins), _boundaries(other._boundaries), _array(0),
112 std::vector<Double_t>::iterator it =
117 if (boundary == _xlo) _ownBoundLo =
kFALSE;
118 if (boundary == _xhi) _ownBoundHi =
kFALSE;
141 std::vector<Double_t>::iterator it = std::lower_bound(
_boundaries.begin(),
176 addBoundary((
double(nbins - i) /
double(nbins)) * xlo +
197 std::vector<Double_t>::const_iterator it = std::lower_bound(
244 _xlo = xlo, _xhi = xhi;
259 std::vector<Double_t>::const_iterator it = std::lower_bound(
272 if (0 > bin || bin >= _nbins) {
273 coutE(
InputArguments) <<
"RooBinning::binEdges ERROR: bin number must be in range (0," << _nbins <<
")" << endl;
286 if (
binEdges(bin, xlo, xhi))
return 0;
287 return 0.5 * (xlo + xhi);
296 if (
binEdges(bin, xlo, xhi))
return 0;
306 if (
binEdges(bin, xlo, xhi))
return 0;
316 if (
binEdges(bin, xlo, xhi))
return 0;
323 void RooBinning::Streamer(
TBuffer &R__b)
340 RooAbsBinning::Streamer(R__b);
360 throw std::string(
"Unknown class version!");
virtual void setRange(Double_t xlo, Double_t xhi)
Change the defined range associated with this binning.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
virtual Int_t numBoundaries() const
Int_t _blo
Array of boundaries.
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].
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
void addUniform(Int_t nBins, Double_t xlo, Double_t xhi)
Add array of nbins uniformly sized bins in range [xlo,xhi].
virtual Double_t nearestBoundary(Double_t x) const
Return the value of the nearest boundary to x.
virtual Double_t binWidth(Int_t bin) const
Return the width of the requested bin.
RooDouble is a minimal implementation of a TObject holding a Double_t value.
Bool_t addBoundary(Double_t boundary)
Add bin boundary at given value.
Iterator abstract base class.
static Vc_ALWAYS_INLINE Vector< T > abs(const Vector< T > &x)
Class RooBinning is an implements RooAbsBinning in terms of an array of boundary values, posing no constraints on the choice of binning, thus allowing variable bin sizes.
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.
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...
std::vector< Double_t > _boundaries
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
virtual Int_t GetSize() const
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...
Bool_t binEdges(Int_t bin, Double_t &xlo, Double_t &xhi) const
Return upper and lower bound of bin 'bin'.
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
virtual Double_t * array() const
Return array of boundary values.
virtual Double_t binHigh(Int_t bin) const
Return the upper bound of the requested bin.
Bool_t removeBoundary(Double_t boundary)
Remove boundary at given value.
virtual TObject * Next()=0
void addBoundaryPair(Double_t boundary, Double_t mirrorPoint=0)
Add pair of boundaries: one at 'boundary' and one at 2*mirrorPoint-boundary.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual Double_t binCenter(Int_t bin) const
Return the position of the center of bin 'bin'.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0