FreeHEP API
Version current

hep.aida.ref.dataSet.binner
Class EfficiencyBinner

java.lang.Object
  extended byhep.aida.ref.dataSet.binner.DefaultBinner
      extended byhep.aida.ref.dataSet.binner.EfficiencyBinner
All Implemented Interfaces:
Binner

public class EfficiencyBinner
extends DefaultBinner

This binner is for efficiency-type of data. The bins are re-normalized to be between 0 and 1 by taking the ratio between the bin height and the bin entries.

Author:
The AIDA team at SLAC
Source Code:
EfficiencyBinner.java

Constructor Summary
EfficiencyBinner(int[] bins, String options)
          Creates a new instance of Binner.
 
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.
 double height(int[] bin)
          Get the height of a bin.
 void removeContentFromBin(int[] bin, int entries, double height, double[] mean, double[] rms)
          Remove a set of entries from a bin.
 void setBinContent(int[] bin, int entries, double height, double[] mean, double[] rms)
          Set at once the content of a bin.
 
Methods inherited from class hep.aida.ref.dataSet.binner.DefaultBinner
binStatistics, entries, fill, internalBin, mean, minusError, plusError, reset, resetBin, rms, scale, setBinError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EfficiencyBinner

public EfficiencyBinner(int[] bins,
                        String options)
Creates a new instance of Binner.

Parameters:
bins - The array containing the number of bins per coordinate.
options - The options.
Method Detail

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
Overrides:
setBinContent in class DefaultBinner
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
Overrides:
addContentToBin in class DefaultBinner

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
Overrides:
removeContentFromBin in class DefaultBinner

height

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

Specified by:
height in interface Binner
Overrides:
height in class DefaultBinner
Parameters:
bin - The array specifying the bin.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.