hep.aida
Interface IHistogram1D
-
- All Superinterfaces:
- IBaseHistogram, IHistogram
- All Known Implementing Classes:
- Histogram1D
public interface IHistogram1D extends IHistogram
User level interface to 1D Histogram.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadd(IHistogram1D hist)Add to this IHistogram1D the contents of another IHistogram1D.IAxisaxis()Get the x axis of the IHistogram1D.intbinEntries(int index)Number of entries in the corresponding bin (ie the number of times fill was called for this bin).doublebinError(int index)The error of a given bin.doublebinHeight(int index)Total height of the corresponding bin (ie the sum of the weights in this bin).doublebinMean(int index)The weighted mean of a bin.intcoordToIndex(double coord)Get the bin number corresponding to a given coordinate along the x axis.voidfill(double x)Fill the IHistogram1D with a value and the corresponding weight.voidfill(double x, double weight)Fill the IHistogram1D with a value and the corresponding weight.doublemean()The mean of the in-range data of the IHistogram1D.doublerms()The RMS of the in-range data of the IHistogram1D.-
Methods inherited from interface hep.aida.IHistogram
allEntries, equivalentBinEntries, extraEntries, maxBinHeight, minBinHeight, scale, sumAllBinHeights, sumBinHeights, sumExtraBinHeights
-
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, entries, nanEntries, reset, setTitle, title
-
-
-
-
Method Detail
-
fill
void fill(double x) throws java.lang.IllegalArgumentException
Fill the IHistogram1D with a value and the corresponding weight. If either the value or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Parameters:
x- The value to be filled in.- Throws:
java.lang.IllegalArgumentException- If the weight is <0 or >1 (?).
-
fill
void fill(double x, double weight) throws java.lang.IllegalArgumentExceptionFill the IHistogram1D with a value and the corresponding weight. If either the value or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Parameters:
x- The value to be filled in.weight- The corresponding weight (by default 1).- Throws:
java.lang.IllegalArgumentException- If the weight is <0 or >1 (?).
-
binMean
double binMean(int index) throws java.lang.IllegalArgumentExceptionThe weighted mean of a bin.- Parameters:
index- The bin number (0...N-1) or OVERFLOW or UNDERFLOW.- Returns:
- The mean of the corresponding bin.
- Throws:
java.lang.IllegalArgumentException- If index is not a valid bin number.
-
binEntries
int binEntries(int index) throws java.lang.IllegalArgumentExceptionNumber of entries in the corresponding bin (ie the number of times fill was called for this bin).- Parameters:
index- The bin number (0...N-1) or OVERFLOW or UNDERFLOW.- Returns:
- The number of entries in the corresponding bin.
- Throws:
java.lang.IllegalArgumentException- If index is not a valid bin number.
-
binHeight
double binHeight(int index) throws java.lang.IllegalArgumentExceptionTotal height of the corresponding bin (ie the sum of the weights in this bin).- Parameters:
index- The bin number (0...N-1) or OVERFLOW or UNDERFLOW.- Returns:
- The height of the corresponding bin.
- Throws:
java.lang.IllegalArgumentException- If index is not a valid bin number.
-
binError
double binError(int index) throws java.lang.IllegalArgumentExceptionThe error of a given bin.- Parameters:
index- The bin number (0...N-1) or OVERFLOW or UNDERFLOW.- Returns:
- The error on the corresponding bin.
- Throws:
java.lang.IllegalArgumentException- If index is not a valid bin number.
-
mean
double mean()
The mean of the in-range data of the IHistogram1D.- Returns:
- The mean of the IHistogram1D.
-
rms
double rms()
The RMS of the in-range data of the IHistogram1D.- Returns:
- The RMS if the IHistogram1D.
-
axis
IAxis axis()
Get the x axis of the IHistogram1D.- Returns:
- The x coordinate IAxis.
-
coordToIndex
int coordToIndex(double coord)
Get the bin number corresponding to a given coordinate along the x axis. This is a convenience method, equivalent to axis().coordToIndex(coord).- Parameters:
coord- The coordinalte along the x axis.- Returns:
- The corresponding bin number.
- See Also:
IAxis.coordToIndex(double)
-
add
void add(IHistogram1D hist) throws java.lang.IllegalArgumentException
Add to this IHistogram1D the contents of another IHistogram1D.- Parameters:
hist- The IHistogram1D to be added to this IHistogram1D.- Throws:
java.lang.IllegalArgumentException- If the IHistogram1Ds binnings are incompatible.
-
-
DMelt 3.0 © DataMelt by jWork.ORG