hep.aida
Interface IAxis
-
- All Known Implementing Classes:
- FixedAxis, VariableAxis
public interface IAxisAn 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.
-
-
Field Summary
Fields Modifier and Type Field and Description static intOVERFLOW_BINConstants specifying the underflow and the overflow bin.static intUNDERFLOW_BINConstants specifying the underflow and the overflow bin.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description doublebinCenter(int index)Get the center of the specified bin.doublebinLowerEdge(int index)Get the lower edge of the specified bin.intbins()The number of bins (excluding underflow and overflow) on the IAxis.doublebinUpperEdge(int index)Get the upper edge of the specified bin.doublebinWidth(int index)Get the width of the specified bin.intcoordToIndex(double coord)Convert a coordinate on the axis to a bin number.booleanisFixedBinning()Check if the IAxis has fixed binning, i.e.doublelowerEdge()Get the lower edge of the IAxis.doubleupperEdge()Get the upper edge of the IAxis.
-
-
-
Field Detail
-
UNDERFLOW_BIN
static final int UNDERFLOW_BIN
Constants specifying the underflow and the overflow bin. They can be passed to any method accepting a bin number.- See Also:
- Constant Field Values
-
OVERFLOW_BIN
static final int OVERFLOW_BIN
Constants specifying the underflow and the overflow bin. They can be passed to any method accepting a bin number.- See Also:
- Constant Field Values
-
-
Method Detail
-
isFixedBinning
boolean isFixedBinning()
Check if the IAxis has fixed binning, i.e. if all the bins have the same width.- Returns:
trueif the binning is fixed,falseotherwise.
-
lowerEdge
double lowerEdge()
Get the lower edge of the IAxis.- Returns:
- The IAxis's lower edge.
-
upperEdge
double upperEdge()
Get the upper edge of the IAxis.- Returns:
- The IAxis's upper edge.
-
bins
int bins()
The number of bins (excluding underflow and overflow) on the IAxis.- Returns:
- The IAxis's number of bins.
-
binLowerEdge
double binLowerEdge(int index)
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.
-
binUpperEdge
double binUpperEdge(int index)
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.
-
binWidth
double binWidth(int index)
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.
-
binCenter
double binCenter(int index)
Get the center of the specified bin.- Parameters:
index- The bin number: 0 to bins()-1) for the in-range bins or OVERFLOW or UNDERFLOW.- Returns:
- The center of the corresponding bin. For in-range bins the middle of the upper and lower edge of the bin is returned; for out-of-range bins +/- infinity is returned.
-
coordToIndex
int coordToIndex(double coord)
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG