hep.aida.ref.histogram
Class Histogram

java.lang.Object
  extended by hep.aida.ref.event.AIDAObservable
      extended by hep.aida.ref.ManagedObject
          extended by hep.aida.ref.histogram.AbstractBaseHistogram
              extended by hep.aida.ref.histogram.Histogram
All Implemented Interfaces:
hep.aida.dev.IDevManagedObject, hep.aida.IBaseHistogram, hep.aida.IHistogram, hep.aida.IManagedObject, Connectable, IsObservable, Serializable
Direct Known Subclasses:
Histogram1D, Histogram2D, Histogram3D

public abstract class Histogram
extends AbstractBaseHistogram
implements hep.aida.IHistogram, IsObservable, Serializable

See Also:
Serialized Form

Constructor Summary
Histogram()
           
Histogram(String name, String title, int dimension, String options)
          Create a new Histogram.
 
Method Summary
 int allEntries()
          Get all the entries in the Histogram, i.e.
 int entries()
          Get the entries that are within the range of the Histogram; i.e.
 double equivalentBinEntries()
          Get the number of equivalent entries; i.e.
abstract  int extraEntries()
          Get the number of entries in the underflow and overflow bins.
 boolean isMeanAndRmsSet()
           
abstract  double maxBinHeight()
          Get the maximum height of in-range bins in the Histogram.
abstract  double minBinHeight()
          Get the minimum height of in-range bins in the Histogram.
 int nanEntries()
          Number of entries whose coordinate or weight is NaN.
 void reset()
          Reset the Histogram.
abstract  void scale(double scaleFactor)
          Scale the weights and the errors by a given factor.
 void setNEntries(int entries)
          Developer area.
 void setValidEntries(int entries)
           
abstract  double sumAllBinHeights()
          Get the sum of the bin heights for all the entries, in-range and out-range ones.
 double sumBinHeights()
          Get the sum of the bin heights for in-range entries.
abstract  double sumExtraBinHeights()
          Get the sum of the bin heights for all the entries outside the Histogram's range.
 
Methods inherited from class hep.aida.ref.histogram.AbstractBaseHistogram
annotation, dimension, mapBinNumber, setAnnotation, setTitle, title
 
Methods inherited from class hep.aida.ref.ManagedObject
isFillable, name, setFillable, setName, type, typeForClass
 
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, isConnected, removeAllListeners, removeListener, setConnected, setValid, setValidForAll
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, setTitle, title
 
Methods inherited from interface hep.aida.ref.event.IsObservable
addListener, removeAllListeners, removeListener, setValid
 
Methods inherited from interface hep.aida.ref.event.Connectable
isConnected, setConnected
 

Constructor Detail

Histogram

public Histogram(String name,
                 String title,
                 int dimension,
                 String options)
Create a new Histogram.

Parameters:
name - The name of the Histogram as a ManagedObject.
title - The title of the Histogram.
dimension - The dimension of the Histogram.

Histogram

public Histogram()
Method Detail

reset

public void reset()
Reset the Histogram. After calling this method the Histogram is as it was just created.

Specified by:
reset in interface hep.aida.IBaseHistogram
Overrides:
reset in class AbstractBaseHistogram

entries

public int entries()
Get the entries that are within the range of the Histogram; i.e. all the entries (the number of times the fill method was called) minus the entries in the overflow or underflow bins.

Specified by:
entries in interface hep.aida.IBaseHistogram
Specified by:
entries in class AbstractBaseHistogram
Returns:
The in-range entries.

allEntries

public int allEntries()
Get all the entries in the Histogram, i.e. the number of times the method fill was called.

Specified by:
allEntries in interface hep.aida.IHistogram
Returns:
All the entries in the Histogram.

extraEntries

public abstract int extraEntries()
Get the number of entries in the underflow and overflow bins.

Specified by:
extraEntries in interface hep.aida.IHistogram
Returns:
The number of entries outside the range of the Histogram.

equivalentBinEntries

public double equivalentBinEntries()
Get the number of equivalent entries; i.e. SUM[ weight ] ^ 2 / SUM[ weight^2 ].

Specified by:
equivalentBinEntries in interface hep.aida.IHistogram
Returns:
The equivalent bin entries.

sumBinHeights

public double sumBinHeights()
Get the sum of the bin heights for in-range entries.

Specified by:
sumBinHeights in interface hep.aida.IHistogram
Returns:
The sum of the bin heights.

sumAllBinHeights

public abstract double sumAllBinHeights()
Get the sum of the bin heights for all the entries, in-range and out-range ones.

Specified by:
sumAllBinHeights in interface hep.aida.IHistogram
Returns:
The sum of all the bin's heights.

sumExtraBinHeights

public abstract double sumExtraBinHeights()
Get the sum of the bin heights for all the entries outside the Histogram's range.

Specified by:
sumExtraBinHeights in interface hep.aida.IHistogram
Returns:
The sum of the out of range bin's heights.

minBinHeight

public abstract double minBinHeight()
Get the minimum height of in-range bins in the Histogram.

Specified by:
minBinHeight in interface hep.aida.IHistogram
Returns:
The minimum bin height for in range bins.

maxBinHeight

public abstract double maxBinHeight()
Get the maximum height of in-range bins in the Histogram.

Specified by:
maxBinHeight in interface hep.aida.IHistogram
Returns:
The maximum bin height for in range bins.

scale

public abstract void scale(double scaleFactor)
Scale the weights and the errors by a given factor.

Specified by:
scale in interface hep.aida.IHistogram
Parameters:
scaleFactor - The scale factor.

setNEntries

public void setNEntries(int entries)
Developer area. All the non-AIDA methods are down here.


setValidEntries

public void setValidEntries(int entries)

nanEntries

public int nanEntries()
Description copied from class: AbstractBaseHistogram
Number of entries whose coordinate or weight is NaN. Such entries are counted as allEntries but don't contribute to the statistics.

Specified by:
nanEntries in interface hep.aida.IBaseHistogram
Specified by:
nanEntries in class AbstractBaseHistogram
Returns:
The number of entries whose value or weight is NaN.

isMeanAndRmsSet

public boolean isMeanAndRmsSet()


jHepWork 3.0 ©