Histogram1D
hep.aida.ref.histogram

Class Histogram1D

    • Constructor Detail

      • Histogram1D

        public Histogram1D()
        Create a 1-dimensional Histogram.
      • Histogram1D

        public Histogram1D(String name,           String title,           IAxis axis)
        Create a 1-dimensional Histogram.
        Parameters:
        name - The name of the Histogram as a ManagedObject.
        title - The title of the Histogram.
        axis - The x-axis of the Histogram.
    • Method Detail

      • fill

        public void fill(double x)
        Fill the Histogram with unit weight.
        Specified by:
        fill in interface IHistogram1D
        Parameters:
        x - The value to be filled.
      • fill

        public void fill(double x,        double weight)
        Fill the Histogram.
        Specified by:
        fill in interface IHistogram1D
        Parameters:
        x - The value to be filled.
        weight - The weight for this entry.
      • reset

        public void reset()
        Reset the Histogram. After calling this method the Histogram is as it was just created.
        Specified by:
        reset in interface IBaseHistogram
        Overrides:
        reset in class Histogram
      • extraEntries

        public int extraEntries()
        Get the number of entries in the underflow and overflow bins.
        Specified by:
        extraEntries in interface IHistogram
        Specified by:
        extraEntries in class Histogram
        Returns:
        The number of entries outside the range of the Histogram.
      • sumAllBinHeights

        public double sumAllBinHeights()
        Get the sum of the bin heights for all the entries, in-range and out-range ones.
        Specified by:
        sumAllBinHeights in interface IHistogram
        Specified by:
        sumAllBinHeights in class Histogram
        Returns:
        The sum of all the bin's heights.
      • sumExtraBinHeights

        public double sumExtraBinHeights()
        Get the sum of the bin heights for all the entries outside the Histogram's range.
        Specified by:
        sumExtraBinHeights in interface IHistogram
        Specified by:
        sumExtraBinHeights in class Histogram
        Returns:
        The sum of the out of range bin's heights.
      • minBinHeight

        public double minBinHeight()
        Get the minimum height of in-range bins in the Histogram.
        Specified by:
        minBinHeight in interface IHistogram
        Specified by:
        minBinHeight in class Histogram
        Returns:
        The minimum bin height for in range bins.
      • maxBinHeight

        public double maxBinHeight()
        Get the maximum height of in-range bins in the Histogram.
        Specified by:
        maxBinHeight in interface IHistogram
        Specified by:
        maxBinHeight in class Histogram
        Returns:
        The maximum bin height for in range bins.
      • binEntries

        public int binEntries(int index)
        Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
        Specified by:
        binEntries in interface IHistogram1D
        Parameters:
        index - the bin number in the external representation: (0...N-1) or OVERFLOW or UNDERFLOW.
        Returns:
        The number of entries for the corresponding bin.
      • binHeight

        public double binHeight(int index)
        Total height of the corresponding bin.
        Specified by:
        binHeight in interface IHistogram1D
        Parameters:
        index - The bin number in the external representation: (0...N-1) or OVERFLOW or UNDERFLOW.
        Returns:
        The bin height for the corresponding bin.
      • binError

        public double binError(int index)
        The error on this bin.
        Specified by:
        binError in interface IHistogram1D
        Parameters:
        index - the bin number in the external representation: (0...N-1) or OVERFLOW or UNDERFLOW.
        Returns:
        The error on the corresponding bin.
      • mean

        public double mean()
        Get the mean of the whole Histogram. It includes all the entries (in and out of range).
        Specified by:
        mean in interface IHistogram1D
        Returns:
        The mean of the Histogram.
      • rms

        public double rms()
        Get the RMS of the whole Histogram. It includes all the entries (in and out of range).
        Specified by:
        rms in interface IHistogram1D
        Returns:
        The RMS of the Histogram.
      • setMeanAndRms

        public void setMeanAndRms(double otherMean,                 double otherRms)
        Set the mean of the Histogram.
        Parameters:
        mean - The Histogram's x mean
      • coordToIndex

        public int coordToIndex(double coord)
        Convenience method, equivalent to axis().coordToIndex(coord).
        Specified by:
        coordToIndex in interface IHistogram1D
        Parameters:
        coord - The coordinalte along the x axis.
        Returns:
        The corresponding bin number.
        See Also:
        IAxis.coordToIndex(double)
      • binMean

        public double binMean(int index)
        Get the mean of a bin.
        Specified by:
        binMean in interface IHistogram1D
        Parameters:
        index - The bin number in the external representation: (0...N-1) or OVERFLOW or UNDERFLOW.
        Returns:
        The mean of the corresponding bin. If the bin has zero height, zero is returned.
      • binRms

        public double binRms(int index)
        Get the RMS of a bin.
        Parameters:
        index - the bin number in the external representation:(0...N-1) or OVERFLOW or UNDERFLOW.
        Returns:
        The RMS of the corresponding bin. If the bin has zero height, zero is returned.
      • setContents

        public void setContents(double[] heights,               double[] errors,               int[] entries,               double[] means,               double[] rmss)
        Set the content of the whole Histogram at once. This is a convenience method for saving/restoring Histograms. Of the arguments below the heights array cannot be null. The errors array should in general be non-null, but this depends on the specific binner. The entries array can be null, in which case the entry of a bin is taken to be the integer part of the height. If the means array is null, the mean is defaulted to the geometric center of the bin. If the rms array is null, the rms is taken to be the bin width over the root of 12.
        Parameters:
        heights - The bins heights
        errors - The bins errors
        entries - The bin entries.
        means - The means of the bins.
        rmss - The rmss of the bins
      • setContents

        public void setContents(double[] binCenters,               double[] heights,               double[] errors,               int[] entries,               double[] sumWW,               double[] sumXW,               double[] sumXXW)
        Parameters:
        binCenters - The bins centers, can be null
        heights - The bins heights, can NOT be null
        errors - The bins errors
        entries - The bin entries, can be null
        sumWW - The sumWW of the bins, can be null
        sumXW - The sumXW of the bins, can not be null
        sumXXW - The sumXXW of the bins, can not be null
      • initHistogram1D

        public void initHistogram1D(IAxis xAxis,                   String options)

SCaVis 1.8 © jWork.org