An IAxis represents a binned histogram axis.
More...
#include </builds/gaudi/Gaudi/GaudiCommonSvc/include/GaudiCommonSvc/Axis.h>
|
int | rIndex (int index) const |
| Convert a AIDA bin number on the axis to the ROOT bin number.
|
|
int | aIndex (int index) const |
| Convert a ROOT bin number on the axis to the AIDA bin number.
|
|
| Axis ()=default |
|
| Axis (TAxis *itaxi) |
|
void | initialize (TAxis *itaxi, bool) |
|
bool | isFixedBinning () const override |
| Check if the IAxis has fixed binning, i.e.
|
|
double | lowerEdge () const override |
| Get the lower edge of the IAxis.
|
|
double | upperEdge () const override |
| Get the upper edge of the IAxis.
|
|
int | bins () const override |
| The number of bins (excluding underflow and overflow) on the IAxis.
|
|
double | binLowerEdge (int index) const override |
| Get the lower edge of the specified bin.
|
|
double | binUpperEdge (int index) const override |
| Get the upper edge of the specified bin.
|
|
double | binWidth (int index) const override |
| Get the width of the specified bin.
|
|
int | coordToIndex (double coord) const override |
| Convert a coordinate on the axis to a bin number.
|
|
TAxis & | taxis () const |
|
An IAxis represents a binned histogram axis.
A 1D Histogram would have one Axis representing the X axis, while a 2D Histogram would have two axes representing the X and Y Axis.
- Author
- The AIDA team (http://aida.freehep.org/)
Definition at line 28 of file Axis.h.
◆ Axis() [1/2]
◆ Axis() [2/2]
Gaudi::Axis::Axis |
( |
TAxis * | itaxi | ) |
|
|
inlineexplicit |
◆ aIndex()
int Gaudi::Axis::aIndex |
( |
int | index | ) |
const |
|
inline |
Convert a ROOT bin number on the axis to the AIDA bin number.
- Parameters
-
index | The ROOT bin number: 1 to bins() for the in-range bins or bins()+1 for OVERFLOW or 0 for UNDERFLOW. |
- Returns
- The corresponding AIDA bin number.
Definition at line 56 of file Axis.h.
int bins() const override
The number of bins (excluding underflow and overflow) on the IAxis.
static int toAidaIndex(int index, int bins)
◆ binLowerEdge()
double Gaudi::Axis::binLowerEdge |
( |
int | index | ) |
const |
|
inlineoverride |
Get the lower edge of the specified bin.
- Parameters
-
index | The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW. |
- Returns
- The lower edge of the corresponding bin; for the underflow bin this is
Double.NEGATIVE_INFINITY
.
Definition at line 99 of file Axis.h.
int rIndex(int index) const
Convert a AIDA bin number on the axis to the ROOT bin number.
◆ bins()
int Gaudi::Axis::bins |
( |
| ) |
const |
|
inlineoverride |
The number of bins (excluding underflow and overflow) on the IAxis.
- Returns
- The IAxis's number of bins.
Definition at line 90 of file Axis.h.
90{
return taxis().GetNbins(); }
◆ binUpperEdge()
double Gaudi::Axis::binUpperEdge |
( |
int | index | ) |
const |
|
inlineoverride |
Get the upper edge of the specified bin.
- Parameters
-
index | The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW. |
- Returns
- The upper edge of the corresponding bin; for the overflow bin this is
Double.POSITIVE_INFINITY
.
Definition at line 107 of file Axis.h.
◆ binWidth()
double Gaudi::Axis::binWidth |
( |
int | index | ) |
const |
|
inlineoverride |
Get the width of the specified bin.
- Parameters
-
index | The bin number: 0 to bins()-1) for the in-range bins or OVERFLOW or UNDERFLOW. |
- Returns
- The width of the corresponding bin.
Definition at line 115 of file Axis.h.
◆ coordToIndex()
int Gaudi::Axis::coordToIndex |
( |
double | coord | ) |
const |
|
inlineoverride |
Convert a coordinate on the axis to a bin number.
If the coordinate is less than the lowerEdge UNDERFLOW is returned; if the coordinate is greater or equal to the upperEdge OVERFLOW is returned.
- Parameters
-
coord | The coordinate to be converted. |
- Returns
- The corresponding bin number.
Definition at line 126 of file Axis.h.
int aIndex(int index) const
Convert a ROOT bin number on the axis to the AIDA bin number.
◆ initialize()
void Gaudi::Axis::initialize |
( |
TAxis * | itaxi, |
|
|
bool | ) |
|
inline |
◆ isFixedBinning()
bool Gaudi::Axis::isFixedBinning |
( |
| ) |
const |
|
inlineoverride |
Check if the IAxis has fixed binning, i.e.
if all the bins have the same width.
- Returns
true
if the binning is fixed, false
otherwise.
Definition at line 69 of file Axis.h.
69{
return 0 ==
taxis_ ? true : !
taxis_->IsVariableBinSize(); }
◆ lowerEdge()
double Gaudi::Axis::lowerEdge |
( |
| ) |
const |
|
inlineoverride |
Get the lower edge of the IAxis.
- Returns
- The IAxis's lower edge.
Definition at line 76 of file Axis.h.
76{
return taxis().GetXmin(); }
◆ me()
Axis & Gaudi::Axis::me |
( |
| ) |
const |
|
inlineprivate |
Definition at line 134 of file Axis.h.
134{
return const_cast<Axis&
>( *this ); }
◆ rIndex()
int Gaudi::Axis::rIndex |
( |
int | index | ) |
const |
|
inline |
Convert a AIDA bin number on the axis to the ROOT bin number.
- Parameters
-
- Returns
- The corresponding ROOT bin number.
Definition at line 48 of file Axis.h.
static int toRootIndex(int index, int nbins)
◆ taxis()
TAxis & Gaudi::Axis::taxis |
( |
| ) |
const |
|
inline |
◆ toAidaIndex()
static int Gaudi::Axis::toAidaIndex |
( |
int | index, |
|
|
int | bins ) |
|
inlinestatic |
Definition at line 36 of file Axis.h.
36 {
37 if ( index ==
bins + 1 )
return AIDA::IAxis::OVERFLOW_BIN;
38 if ( index == 0 ) return AIDA::IAxis::UNDERFLOW_BIN;
40 }
size_t index(const Gaudi::ParticleProperty *property, const Gaudi::Interfaces::IParticlePropertySvc *service)
helper utility for mapping of Gaudi::ParticleProperty object into non-negative integral sequential id...
◆ toRootIndex()
static int Gaudi::Axis::toRootIndex |
( |
int | index, |
|
|
int | nbins ) |
|
inlinestatic |
Definition at line 30 of file Axis.h.
30 {
31 if ( index == AIDA::IAxis::OVERFLOW_BIN ) return nbins + 1;
32 if ( index == AIDA::IAxis::UNDERFLOW_BIN ) return 0;
34 }
◆ upperEdge()
double Gaudi::Axis::upperEdge |
( |
| ) |
const |
|
inlineoverride |
Get the upper edge of the IAxis.
- Returns
- The IAxis's upper edge.
Definition at line 83 of file Axis.h.
83{
return taxis().GetXmax(); }
◆ taxis_
TAxis* Gaudi::Axis::taxis_ = nullptr |
|
private |
The documentation for this class was generated from the following file:
- GaudiCommonSvc/include/GaudiCommonSvc/Axis.h