hep.aida.ref.dataset.binner
Interface Binner

All Known Implementing Classes:
DefaultBinner, EfficiencyBinner

public interface Binner

A binner is responsible to keep track of the bins statistics for a binned data container in n-dimensions. Internally, the statistics of each bin should be calculating by using an nDimensional DataStatistics.


Method Summary
 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.
 

Method Detail

fill

void fill(int[] bin,
          double[] x,
          double weight)
Fill a bin with a new entry.

Parameters:
bin - The array specifying the bin.
x - The coordinate's array
weight - The weight for this entry.

setBinContent

void setBinContent(int[] bin,
                   int entries,
                   double height,
                   double[] mean,
                   double[] rms)
Set at once the content of a bin.

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

void addContentToBin(int[] bin,
                     int entries,
                     double height,
                     double[] mean,
                     double[] rms)
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.

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

void removeContentFromBin(int[] bin,
                          int entries,
                          double height,
                          double[] mean,
                          double[] rms)
Remove a set of entries from a bin.

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

void resetBin(int[] bin)
Reset the content of a bin.

Parameters:
bin - The array specifying the bin.

reset

void reset()
Reset the content of the Binner.


entries

int entries(int[] bin)
Get the number of entries in a bin.

Parameters:
bin - The array specifying the bin.

height

double height(int[] bin)
Get the height of a bin.

Parameters:
bin - The array specifying the bin.

plusError

double plusError(int[] bin)
Get the plus error on a bin.

Parameters:
bin - The array specifying the bin.

minusError

double minusError(int[] bin)
Get the minus error on a bin.

Parameters:
bin - The array specifying the bin.

mean

double mean(int[] bin,
            int coord)
Get the mean of a bin along a given coordinate.

Parameters:
bin - The array specifying the bin.
coord - The coordinate's index.

rms

double rms(int[] bin,
           int coord)
Get the rms of a bin along a given coordinate.

Parameters:
bin - The array specifying the bin.
coord - The coordinate's index.

scale

void scale(double scaleFactor)
Scale all the bins by a given scale factor.

Parameters:
scaleFactor - The scale factor.


jHepWork 1.1 (C) Chekanov