hep.aida.ref.histogram
Class Profile1D

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.Profile
                  extended by hep.aida.ref.histogram.Profile1D
All Implemented Interfaces:
hep.aida.dev.IDevManagedObject, IBaseHistogram, IManagedObject, IProfile, IProfile1D, Connectable, IsObservable, Serializable

public class Profile1D
extends Profile
implements IProfile1D, Serializable, IsObservable

See Also:
Serialized Form

Constructor Summary
Profile1D()
          Create a 1-dimensional Profile.
Profile1D(String name, String title, IAxis axis)
          Create a 1-dimensional Profile.
Profile1D(String name, String title, IAxis axis, String options)
           
 
Method Summary
 void add(IProfile1D profile)
          Modifies this IProfile1D by adding the contents of profile to it.
 int allEntries()
          Get the number or all the entries, both in range and underflow/overflow bins of the IProfile.
 IAxis axis()
          Returns the X axis.
 int binEntries(int index)
          Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
 double binError(int index)
          The error on this bin.
 double binHeight(int index)
          Total height of the corresponding bin (ie the sum of the weights in this bin).
 double binMean(int index)
          The weighted mean of the corresponding bin.
 double binRms(int index)
          The spread (RMS) of a bin.
 int coordToIndex(double coord)
          Convenience method, equivalent to axis().coordToIndex(coord).
 int entries()
          Number of in-range entries in the histogram.
 int extraEntries()
          Get the number of entries in the underflow and overflow bins.
 void fill(double x, double y)
          Fill the IProfile1D.
 void fill(double x, double y, double weight)
          Fill the IProfile1D.
 void initProfile1D(IAxis axis)
           
 void initProfile1D(IAxis axis, String options)
           
 double maxBinHeight()
          Get the maximum height of the in-range bins.
 double mean()
          Returns the mean of the in-range data of the profile as calculated on filling-time.
 double minBinHeight()
          Get the minimum height of the in-range bins.
 void reset()
          Reset the histogram; as if just created.
 double rms()
          Returns the rms of the in-range data of the profile as calculated on filling-time.
 void scale(double scaleFactor)
           
 void setContents(double[] heights, double[] errors, int[] entries, double[] rmss, double[] meanXs)
          Set the content of the whole Histogram at once.
 void setMean(double mean)
           
 void setNEntries(int entries)
           
 void setRms(double rms)
           
 void setValidEntries(int entries)
           
 double sumAllBinHeights()
          Get the sum of all the bins heights (including underflow and overflow bin).
 double sumBinHeights()
          Get the sum of in range bin heights in the IProfile.
 double sumExtraBinHeights()
          Get the sum of the underflow and overflow bin height.
 
Methods inherited from class hep.aida.ref.histogram.Profile
nanEntries
 
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, nanEntries, 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

Profile1D

public Profile1D()
Create a 1-dimensional Profile.


Profile1D

public Profile1D(String name,
                 String title,
                 IAxis axis)
Create a 1-dimensional Profile.

Parameters:
name - The name of the Profile as a ManagedObject.
title - The title of the Profile.
axis - The x-axis of the Profile.

Profile1D

public Profile1D(String name,
                 String title,
                 IAxis axis,
                 String options)
Method Detail

reset

public void reset()
Description copied from class: AbstractBaseHistogram
Reset the histogram; as if just created.

Specified by:
reset in interface IBaseHistogram
Overrides:
reset in class AbstractBaseHistogram

entries

public int entries()
Description copied from class: AbstractBaseHistogram
Number of in-range entries in the histogram.

Specified by:
entries in interface IBaseHistogram
Specified by:
entries in class AbstractBaseHistogram
Returns:
The number of in-range entries.

allEntries

public int allEntries()
Description copied from interface: IProfile
Get the number or all the entries, both in range and underflow/overflow bins of the IProfile.

Specified by:
allEntries in interface IProfile
Returns:
The sum of all the entries.

extraEntries

public int extraEntries()
Description copied from interface: IProfile
Get the number of entries in the underflow and overflow bins.

Specified by:
extraEntries in interface IProfile
Returns:
The numer of entries in the out-of-range bins.

sumAllBinHeights

public double sumAllBinHeights()
Description copied from interface: IProfile
Get the sum of all the bins heights (including underflow and overflow bin).

Specified by:
sumAllBinHeights in interface IProfile
Returns:
The sum of all the bins heights.

sumBinHeights

public double sumBinHeights()
Description copied from interface: IProfile
Get the sum of in range bin heights in the IProfile.

Specified by:
sumBinHeights in interface IProfile
Returns:
The sum of all the in-range bins heights.

sumExtraBinHeights

public double sumExtraBinHeights()
Description copied from interface: IProfile
Get the sum of the underflow and overflow bin height.

Specified by:
sumExtraBinHeights in interface IProfile
Returns:
The sum of the out-of-range bins heights.

minBinHeight

public double minBinHeight()
Description copied from interface: IProfile
Get the minimum height of the in-range bins.

Specified by:
minBinHeight in interface IProfile
Returns:
The minimum height among the in-range bins.

maxBinHeight

public double maxBinHeight()
Description copied from interface: IProfile
Get the maximum height of the in-range bins.

Specified by:
maxBinHeight in interface IProfile
Returns:
The maximum height among the in-range bins.

fill

public void fill(double x,
                 double y,
                 double weight)
Description copied from interface: IProfile1D
Fill the IProfile1D. If either a coordinate or the weight is NaN the entry will be recorded but it will not contribue to the statistics.

Specified by:
fill in interface IProfile1D

fill

public void fill(double x,
                 double y)
Description copied from interface: IProfile1D
Fill the IProfile1D. If either a coordinate or the weight is NaN the entry will be recorded but it will not contribue to the statistics.

Specified by:
fill in interface IProfile1D

binEntries

public int binEntries(int index)
Description copied from interface: IProfile1D
Number of entries in the corresponding bin (ie the number of times fill was called for this bin).

Specified by:
binEntries in interface IProfile1D
Parameters:
index - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.

binHeight

public double binHeight(int index)
Description copied from interface: IProfile1D
Total height of the corresponding bin (ie the sum of the weights in this bin).

Specified by:
binHeight in interface IProfile1D
Parameters:
index - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.

binError

public double binError(int index)
Description copied from interface: IProfile1D
The error on this bin.

Specified by:
binError in interface IProfile1D
Parameters:
index - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.

binMean

public double binMean(int index)
Description copied from interface: IProfile1D
The weighted mean of the corresponding bin.

Specified by:
binMean in interface IProfile1D
Parameters:
index - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns:
The mean of the corresponding bin along the x axis.

binRms

public double binRms(int index)
Description copied from interface: IProfile1D
The spread (RMS) of a bin.

Specified by:
binRms in interface IProfile1D
Parameters:
index - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.

mean

public double mean()
Description copied from interface: IProfile1D
Returns the mean of the in-range data of the profile as calculated on filling-time.

Specified by:
mean in interface IProfile1D

rms

public double rms()
Description copied from interface: IProfile1D
Returns the rms of the in-range data of the profile as calculated on filling-time.

Specified by:
rms in interface IProfile1D

axis

public IAxis axis()
Description copied from interface: IProfile1D
Returns the X axis.

Specified by:
axis in interface IProfile1D

coordToIndex

public int coordToIndex(double coord)
Description copied from interface: IProfile1D
Convenience method, equivalent to axis().coordToIndex(coord).

Specified by:
coordToIndex in interface IProfile1D
See Also:
IAxis.coordToIndex(double)

scale

public void scale(double scaleFactor)
           throws IllegalArgumentException
Throws:
IllegalArgumentException

add

public void add(IProfile1D profile)
         throws IllegalArgumentException
Description copied from interface: IProfile1D
Modifies this IProfile1D by adding the contents of profile to it.

Specified by:
add in interface IProfile1D
Parameters:
profile - The IProfile1D to be added to this IProfile1D
Throws:
IllegalArgumentException - if profile binnings are incompatible

initProfile1D

public void initProfile1D(IAxis axis)

initProfile1D

public void initProfile1D(IAxis axis,
                          String options)

setRms

public void setRms(double rms)

setMean

public void setMean(double mean)

setContents

public void setContents(double[] heights,
                        double[] errors,
                        int[] entries,
                        double[] rmss,
                        double[] meanXs)
Set the content of the whole Histogram at once. This is a convenience method for saving/restoring Histograms. Of the arguments below the heights, the errors and the entries array cannot be null. If the means array is null, the mean is defaulted to the geometric center of the bin. If the rms array is null, the rms is taken to be the bin width over the root of 12.

Parameters:
heights - The bins heights
errors - The bins errors
entries - The bin entries.
rmss - The rmss of the bins
meanXs - The mean of the bin.

setNEntries

public void setNEntries(int entries)

setValidEntries

public void setValidEntries(int entries)


jHepWork 3.2 © jWork.org