A regular axis with equidistant bins in the interval \([fLow, fHigh)\).
For example, the following creates a regular axis with 10 normal bins between 5 and 15:
It is possible to disable underflow and overflow bins by passing enableFlowBins = false. In that case, arguments outside the axis will be silently discarded.
Definition at line 37 of file RRegularAxis.hxx.
Public Types | |
| using | ArgumentType = double | 
Public Member Functions | |
| RRegularAxis (std::size_t nNormalBins, std::pair< double, double > interval, bool enableFlowBins=true) | |
| Construct a regular axis object.   | |
| RLinearizedIndex | ComputeLinearizedIndex (double x) const | 
| Compute the linarized index for a single argument.   | |
| RBinIndexRange | GetFullRange () const | 
| Get the full range of all bins.   | |
| double | GetHigh () const | 
| RLinearizedIndex | GetLinearizedIndex (RBinIndex index) const | 
| Get the linearized index for an RBinIndex.   | |
| double | GetLow () const | 
| std::size_t | GetNNormalBins () const | 
| RBinIndexRange | GetNormalRange () const | 
| Get the range of all normal bins.   | |
| RBinIndexRange | GetNormalRange (RBinIndex begin, RBinIndex end) const | 
| Get a range of normal bins.   | |
| std::size_t | GetTotalNBins () const | 
| bool | HasFlowBins () const | 
| void | Streamer (TBuffer &) | 
| ROOT Streamer function to throw when trying to store an object of this class.   | |
Private Attributes | |
| bool | fEnableFlowBins | 
| Whether underflow and overflow bins are enabled.   | |
| double | fHigh | 
| The upper end of the axis interval.   | |
| double | fInvBinWidth | 
| The cached inverse of the bin width to speed up ComputeLinearizedIndex.   | |
| double | fLow | 
| The lower end of the axis interval.   | |
| std::size_t | fNNormalBins | 
| The number of normal bins.   | |
Friends | |
| bool | operator== (const RRegularAxis &lhs, const RRegularAxis &rhs) | 
#include <ROOT/RRegularAxis.hxx>
Definition at line 39 of file RRegularAxis.hxx.
      
  | 
  inline | 
Construct a regular axis object.
| [in] | nNormalBins | the number of normal bins, must be > 0 | 
| [in] | interval | the axis interval (lower end inclusive, upper end exclusive) | 
| [in] | enableFlowBins | whether to enable underflow and overflow bins | 
Definition at line 59 of file RRegularAxis.hxx.
      
  | 
  inline | 
Compute the linarized index for a single argument.
The normal bins have indices \(0\) to \(fNNormalBins - 1\), the underflow bin has index \(fNNormalBins\), and the overflow bin has index \(fNNormalBins + 1\). If the argument is outside the interval \([fLow, fHigh)\) and the flow bins are disabled, the return value is invalid.
| [in] | x | the argument | 
Definition at line 92 of file RRegularAxis.hxx.
      
  | 
  inline | 
Get the full range of all bins.
This includes underflow and overflow bins, if enabled.
Definition at line 166 of file RRegularAxis.hxx.
      
  | 
  inline | 
Definition at line 75 of file RRegularAxis.hxx.
      
  | 
  inline | 
Get the linearized index for an RBinIndex.
The normal bins have indices \(0\) to \(fNNormalBins - 1\), the underflow bin has index \(fNNormalBins\), and the overflow bin has index \(fNNormalBins + 1\).
| [in] | index | the RBinIndex | 
Definition at line 114 of file RRegularAxis.hxx.
      
  | 
  inline | 
Definition at line 74 of file RRegularAxis.hxx.
      
  | 
  inline | 
Definition at line 72 of file RRegularAxis.hxx.
      
  | 
  inline | 
Get the range of all normal bins.
Definition at line 131 of file RRegularAxis.hxx.
      
  | 
  inline | 
Get a range of normal bins.
| [in] | begin | the begin of the bin index range (inclusive), must be normal | 
| [in] | end | the end of the bin index range (exclusive), must be normal and >= begin | 
Definition at line 141 of file RRegularAxis.hxx.
      
  | 
  inline | 
Definition at line 73 of file RRegularAxis.hxx.
      
  | 
  inline | 
Definition at line 76 of file RRegularAxis.hxx.
      
  | 
  inline | 
ROOT Streamer function to throw when trying to store an object of this class.
Definition at line 173 of file RRegularAxis.hxx.
      
  | 
  friend | 
Definition at line 78 of file RRegularAxis.hxx.
      
  | 
  private | 
Whether underflow and overflow bins are enabled.
Definition at line 51 of file RRegularAxis.hxx.
      
  | 
  private | 
The upper end of the axis interval.
Definition at line 47 of file RRegularAxis.hxx.
      
  | 
  private | 
The cached inverse of the bin width to speed up ComputeLinearizedIndex.
Definition at line 49 of file RRegularAxis.hxx.
      
  | 
  private | 
The lower end of the axis interval.
Definition at line 45 of file RRegularAxis.hxx.
      
  | 
  private | 
The number of normal bins.
Definition at line 43 of file RRegularAxis.hxx.