hep.aida
Interface IAxis

All Known Implementing Classes:
FixedAxis, VariableAxis

public interface IAxis

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.


Field Summary
static int OVERFLOW_BIN
          Constants specifying the underflow and the overflow bin.
static int UNDERFLOW_BIN
          Constants specifying the underflow and the overflow bin.
 
Method Summary
 double binCenter(int index)
          Get the center of the specified bin.
 double binLowerEdge(int index)
          Get the lower edge of the specified bin.
 int bins()
          The number of bins (excluding underflow and overflow) on the IAxis.
 double binUpperEdge(int index)
          Get the upper edge of the specified bin.
 double binWidth(int index)
          Get the width of the specified bin.
 int coordToIndex(double coord)
          Convert a coordinate on the axis to a bin number.
 boolean isFixedBinning()
          Check if the IAxis has fixed binning, i.e.
 double lowerEdge()
          Get the lower edge of the IAxis.
 double upperEdge()
          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:
true if the binning is fixed, false otherwise.

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.


jHepWork 3.2 © jWork.org