An axis that can extend its range, keeping the number of its bins unchanged.
The axis is constructed with an initial range. Apart from its ability to grow, this axis behaves like a RAxisEquidistant.
Definition at line 504 of file RAxis.hxx.
|
| RAxisGrow (int nbins, double low, double high) noexcept |
| Initialize a RAxisGrow.
|
|
| RAxisGrow (std::string_view title, int nbins, double low, double high) noexcept |
| Initialize a RAxisGrow.
|
|
bool | CanGrow () const noexcept final override |
| This axis kind can increase its range.
|
|
int | Grow (int toBin) |
| Grow this axis to make the "virtual bin" toBin in-range.
|
|
| operator RAxisConfig () const |
| Convert to RAxisConfig.
|
|
| RAxisEquidistant ()=default |
|
| RAxisEquidistant (int nbinsNoOver, double low, double high) noexcept |
| Initialize a RAxisEquidistant.
|
|
| RAxisEquidistant (std::string_view title, int nbinsNoOver, double low, double high) noexcept |
| Initialize a RAxisEquidistant.
|
|
int | FindBin (double x) const noexcept final override |
| Find the adjusted bin index (returning kUnderflowBin for underflow and kOverflowBin for overflow) for the given coordinate.
|
|
double | GetBinCenter (int bin) const final override |
| Get the bin center for the given bin index.
|
|
double | GetBinFrom (int bin) const final override |
| Get the low bin border for the given bin index.
|
|
int | GetBinIndexForLowEdge (double x) const noexcept final override |
| If the coordinate x is within 10 ULPs of a bin low edge coordinate, return the bin for which this is a low edge.
|
|
double | GetBinWidth () const noexcept |
| Get the width of the bins.
|
|
double | GetInverseBinWidth () const noexcept |
| Get the inverse of the width of the bins.
|
|
int | GetNBinsNoOver () const noexcept final override |
| Get the number of bins, excluding under- and overflow.
|
|
| operator RAxisConfig () const |
| Convert to RAxisConfig.
|
|
double | GetBinTo (int bin) const |
| Get the high bin border ("right edge") for the given bin index.
|
|
int | GetFirstBin () const noexcept |
| Get the bin index for the first bin of the axis.
|
|
int | GetLastBin () const noexcept |
| Get the bin index for the last bin of the axis.
|
|
double | GetMaximum () const |
| Get the high end of the axis range.
|
|
double | GetMinimum () const |
| Get the low end of the axis range.
|
|
int | GetNBins () const noexcept |
| Get the number of bins, including under- and overflow.
|
|
int | GetNOverflowBins () const noexcept |
| Get the number of over- and underflow bins: 0 for growable axes, 2 otherwise.
|
|
int | GetOverflowBin () const noexcept |
| Get the bin index for the overflow bin (or kInvalidBin if CanGrow()).
|
|
const std::string & | GetTitle () const |
| Get the axis's title.
|
|
int | GetUnderflowBin () const noexcept |
| Get the bin index for the underflow bin (or kInvalidBin if CanGrow()).
|
|
bool | HasSameBinningAs (const RAxisBase &other) const |
| Check if two axes use the same binning convention, i.e.
|
|
const_iterator | begin () const noexcept |
| Get a const_iterator pointing to the first regular bin.
|
|
const_iterator | end () const noexcept |
| Get a const_iterator pointing beyond the last regular bin.
|
|
int ROOT::Experimental::RAxisGrow::Grow |
( |
int |
toBin | ) |
|
Grow this axis to make the "virtual bin" toBin in-range.
This keeps the non-affected axis limit unchanged, and extends the other axis limit such that a number of consecutive bins are merged.
Example, assuming an initial RAxisGrow with 10 bins from 0. to 1.:
Grow(0)
: that (virtual) bin spans from -0.1 to 0. To include it in the axis range, the lower limit must be shifted. The minimal number of bins that can be merged is 2, thus the new axis will span from -1. to 1.
Grow(-1)
: that (virtual) bin spans from -0.2 to 0.1. To include it in the axis range, the lower limit must be shifted. The minimal number of bins that can be merged is 2, thus the new axis will span from -1. to 1.
Grow(50)
: that (virtual) bin spans from 4.9 to 5.0. To include it in the axis range, the higher limit must be shifted. Five bins need to be merged, making the new axis range 0. to 5.0.
- Parameters
-
toBin | - the "virtual" bin number, as if the axis had an infinite number of bins with the current bin width. For instance, for an axis with ten bins in the range 0. to 1., the coordinate 2.05 has the virtual bin index 20. |
- Returns
- Returns the number of bins that were merged to reach the value. A value of 1 means that no bins were merged (toBin was in the original axis range).