FreeHEP API
Version current

hep.aida.ref.dataSet.binner
Interface Binner

All Known Implementing Classes:
DefaultBinner

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.

Author:
The FreeHEP team at SLAC
Source Code:
Binner.java

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

public 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

public 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

public 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

public 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

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

Parameters:
bin - The array specifying the bin.

reset

public void reset()
Reset the content of the Binner.


entries

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

Parameters:
bin - The array specifying the bin.

height

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

Parameters:
bin - The array specifying the bin.

plusError

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

Parameters:
bin - The array specifying the bin.

minusError

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

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.

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.

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.

Parameters:
scaleFactor - The scale factor.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.