Documentation of 'hep.aida.ref.dataset.binner.DefaultBinner' Java class
DefaultBinner
hep.aida.ref.dataset.binner

Class DefaultBinner

  • All Implemented Interfaces:
    Binner
    Direct Known Subclasses:
    EfficiencyBinner


    public class DefaultBinner
    extends java.lang.Object
    implements Binner
    The default implementation of a Binner.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DefaultBinner(int[] bins, java.lang.String options)
      Creates a new instance of Binner.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addContentToBin(int[] bin, int entries, double height, double[] mean, double[] rms)
      Add a set of entries to the existing content of the bin.
      int entries(int[] bin)
      Get the number of entries in a bin.
      void fill(int[] bin, double[] x, double weight)
      Fill a bin with a new entry.
      double height(int[] bin)
      Get the height of a bin.
      double mean(int[] bin, int coord)
      Get the mean of a bin along a given coordinate.
      double minusError(int[] bin)
      Get the minus error on a bin.
      double plusError(int[] bin)
      Get the plus error on a bin.
      void removeContentFromBin(int[] bin, int entries, double height, double[] mean, double[] rms)
      Remove a set of entries from a bin.
      void reset()
      Reset the content of the Binner.
      void resetBin(int[] bin)
      Reset the content of a bin.
      double rms(int[] bin, int coord)
      Get the rms of a bin along a given coordinate.
      void scale(double scaleFactor)
      Scale all the bins by a given scale factor.
      void setBinContent(int[] bin, int entries, double height, double[] mean, double[] rms)
      Set at once the content of a bin.
      void setBinError(BinError binError)
      Set the BinError with which the plus and minus error on the bin are calculated.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultBinner

        public DefaultBinner(int[] bins,
                             java.lang.String options)
        Creates a new instance of Binner.
        Parameters:
        bins - The array containing the number of bins per coordinate.
        options - The options.
    • Method Detail

      • fill

        public void fill(int[] bin,
                         double[] x,
                         double weight)
        Fill a bin with a new entry.
        Specified by:
        fill in interface Binner
        Parameters:
        bin - The array specifying the bin.
        x - The coordinate's array
        weight - The weight for this entry.
      • setBinContent

        public void setBinContent(int[] bin,
                                  int entries,
                                  double height,
                                  double[] mean,
                                  double[] rms)
        Set at once the content of a bin.
        Specified by:
        setBinContent in interface Binner
        Parameters:
        bin - The array specifying the bin.
        entries - The entries in the bin.
        height - The height of the bin.
        mean - The array with the coordinate means
        rms - The array with the coordinate rmss
      • addContentToBin

        public void addContentToBin(int[] bin,
                                    int entries,
                                    double height,
                                    double[] mean,
                                    double[] rms)
        Description copied from interface: Binner
        Add a set of entries to the existing content of the bin. Notice that this is meant to be used instead of fill ONLY when the number of entries in the set is greater than one.
        Specified by:
        addContentToBin in interface Binner
        Parameters:
        bin - The array specifying the bin.
        entries - The entries in the bin.
        height - The height of the bin.
        mean - The array with the coordinate means
        rms - The array with the coordinate rmss
      • removeContentFromBin

        public void removeContentFromBin(int[] bin,
                                         int entries,
                                         double height,
                                         double[] mean,
                                         double[] rms)
        Description copied from interface: Binner
        Remove a set of entries from a bin.
        Specified by:
        removeContentFromBin in interface Binner
        Parameters:
        bin - The array specifying the bin.
        entries - The entries in the bin.
        height - The height of the bin.
        mean - The array with the coordinate means
        rms - The array with the coordinate rmss
      • resetBin

        public void resetBin(int[] bin)
        Reset the content of a bin.
        Specified by:
        resetBin in interface Binner
        Parameters:
        bin - The array specifying the bin.
      • reset

        public void reset()
        Reset the content of the Binner.
        Specified by:
        reset in interface Binner
      • entries

        public int entries(int[] bin)
        Get the number of entries in a bin.
        Specified by:
        entries in interface Binner
        Parameters:
        bin - The array specifying the bin.
      • height

        public double height(int[] bin)
        Get the height of a bin.
        Specified by:
        height in interface Binner
        Parameters:
        bin - The array specifying the bin.
      • plusError

        public double plusError(int[] bin)
        Get the plus error on a bin.
        Specified by:
        plusError in interface Binner
        Parameters:
        bin - The array specifying the bin.
      • minusError

        public double minusError(int[] bin)
        Get the minus error on a bin.
        Specified by:
        minusError in interface Binner
        Parameters:
        bin - The array specifying the bin.
      • mean

        public double mean(int[] bin,
                           int coord)
        Get the mean of a bin along a given coordinate.
        Specified by:
        mean in interface Binner
        Parameters:
        bin - The array specifying the bin.
        coord - The coordinate's index.
      • rms

        public double rms(int[] bin,
                          int coord)
        Get the rms of a bin along a given coordinate.
        Specified by:
        rms in interface Binner
        Parameters:
        bin - The array specifying the bin.
        coord - The coordinate's index.
      • scale

        public void scale(double scaleFactor)
        Scale all the bins by a given scale factor.
        Specified by:
        scale in interface Binner
        Parameters:
        scaleFactor - The scale factor.
      • setBinError

        public void setBinError(BinError binError)
        Set the BinError with which the plus and minus error on the bin are calculated.
        Parameters:
        binError - The BinError.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.