FreeHEP API
Version 3.2.1

hep.aida
Interface IAxis


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.

Author:
The AIDA team (http://aida.freehep.org/)

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 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

public 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

public 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

public 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

public double lowerEdge()
Get the lower edge of the IAxis.

Returns:
The IAxis's lower edge.

upperEdge

public double upperEdge()
Get the upper edge of the IAxis.

Returns:
The IAxis's upper edge.

bins

public int bins()
The number of bins (excluding underflow and overflow) on the IAxis.

Returns:
The IAxis's number of bins.

binLowerEdge

public 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

public 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

public 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.

coordToIndex

public 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.

FreeHEP API
Version 3.2.1

Copyright © 2000-2003 AIDA Team, All Rights Reserved.