hep.aida.ref.histogram
Class Profile2D

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.Profile2D
All Implemented Interfaces:
hep.aida.dev.IDevManagedObject, IBaseHistogram, IManagedObject, IProfile, IProfile2D, Connectable, IsObservable, Serializable

public class Profile2D
extends Profile
implements IProfile2D, IsObservable, Serializable

See Also:
Serialized Form

Constructor Summary
Profile2D()
          Create a 1-dimensional Profile.
Profile2D(String name, String title, IAxis xAxis, IAxis yAxis)
          Create a 1-dimensional Profile.
Profile2D(String name, String title, IAxis xAxis, IAxis yAxis, String options)
           
 
Method Summary
 void add(IProfile2D profile)
          Modifies this profile 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.
 int binEntries(int indexX, int indexY)
          The number of entries (ie the number of times fill was called for this bin).
 int binEntriesX(int indexX)
          Equivalent to projectionX().binEntries(indexX).
 int binEntriesY(int indexY)
          Equivalent to projectionY().binEntries(indexY).
 double binError(int indexX, int indexY)
          The error on this bin.
 double binHeight(int indexX, int indexY)
          Total height of the corresponding bin (ie the sum of the weights in this bin).
 double binHeightX(int indexX)
          Equivalent to projectionX().binHeight(indexX).
 double binHeightY(int indexY)
          Equivalent to projectionY().binHeight(indexY).
 double binMeanX(int indexX, int indexY)
          The weighted mean along x of a given bin.
 double binMeanY(int indexX, int indexY)
          The weighted mean along y of a given bin.
 double binRms(int indexX, int indexY)
          The spread (RMS) of this bin.
 int coordToIndexX(double coord)
          Convenience method, equivalent to xAxis().coordToIndex(coord).
 int coordToIndexY(double coord)
          Convenience method, equivalent to yAxis().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, double z)
          Fill the IProfile2D.
 void fill(double x, double y, double z, double weight)
          Fill the IProfile2D.
 void initProfile2D(IAxis xAxis, IAxis yAxis)
           
 void initProfile2D(IAxis xAxis, IAxis yAxis, String options)
           
 double maxBinHeight()
          Get the maximum height of the in-range bins.
 double meanX()
          Returns the mean of the in-range data of the profile, as calculated on filling-time projected on the X axis.
 double meanY()
          Returns the mean of the in-range data of the profile, as calculated on filling-time projected on the Y axis.
 double minBinHeight()
          Get the minimum height of the in-range bins.
 void reset()
          Reset the histogram; as if just created.
 double rmsX()
          Returns the rms of the in-range data of the profile as calculated on filling-time projected on the X axis.
 double rmsY()
          Returns the rms of the in-range data of the profile as calculated on filling-time projected on the Y axis.
 void scale(double scaleFactor)
           
 void setContents(double[][] heights, double[][] errors, int[][] entries, double[][] rmss, double[][] meanXs, double[][] meanYs)
           
 void setMeanX(double meanX)
           
 void setMeanY(double meanY)
           
 void setNEntries(int entries)
           
 void setRmsX(double rmsX)
           
 void setRmsY(double rmsY)
           
 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.
 IAxis xAxis()
          Return the X axis.
 IAxis yAxis()
          Return the Y axis.
 
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

Profile2D

public Profile2D()
Create a 1-dimensional Profile.


Profile2D

public Profile2D(String name,
                 String title,
                 IAxis xAxis,
                 IAxis yAxis)
Create a 1-dimensional Profile.

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

Profile2D

public Profile2D(String name,
                 String title,
                 IAxis xAxis,
                 IAxis yAxis,
                 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

binMeanX

public double binMeanX(int indexX,
                       int indexY)
Description copied from interface: IProfile2D
The weighted mean along x of a given bin.

Specified by:
binMeanX in interface IProfile2D
Parameters:
indexX - The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
indexY - The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns:
The mean of the corresponding bin along the x axis.

binMeanY

public double binMeanY(int indexX,
                       int indexY)
Description copied from interface: IProfile2D
The weighted mean along y of a given bin.

Specified by:
binMeanY in interface IProfile2D
Parameters:
indexX - The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
indexY - The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns:
The mean of the corresponding bin along the x axis.

binEntries

public int binEntries(int indexX,
                      int indexY)
Description copied from interface: IProfile2D
The number of entries (ie the number of times fill was called for this bin).

Specified by:
binEntries in interface IProfile2D
Parameters:
indexX - the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
indexY - the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.

binEntriesX

public int binEntriesX(int indexX)
Description copied from interface: IProfile2D
Equivalent to projectionX().binEntries(indexX).

Specified by:
binEntriesX in interface IProfile2D

binEntriesY

public int binEntriesY(int indexY)
Description copied from interface: IProfile2D
Equivalent to projectionY().binEntries(indexY).

Specified by:
binEntriesY in interface IProfile2D

binError

public double binError(int indexX,
                       int indexY)
Description copied from interface: IProfile2D
The error on this bin.

Specified by:
binError in interface IProfile2D
Parameters:
indexX - the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
indexY - the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.

binHeight

public double binHeight(int indexX,
                        int indexY)
Description copied from interface: IProfile2D
Total height of the corresponding bin (ie the sum of the weights in this bin).

Specified by:
binHeight in interface IProfile2D
Parameters:
indexX - the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
indexY - the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.

binHeightX

public double binHeightX(int indexX)
Description copied from interface: IProfile2D
Equivalent to projectionX().binHeight(indexX).

Specified by:
binHeightX in interface IProfile2D

binHeightY

public double binHeightY(int indexY)
Description copied from interface: IProfile2D
Equivalent to projectionY().binHeight(indexY).

Specified by:
binHeightY in interface IProfile2D

binRms

public double binRms(int indexX,
                     int indexY)
Description copied from interface: IProfile2D
The spread (RMS) of this bin.

Specified by:
binRms in interface IProfile2D
Parameters:
indexX - the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
indexY - the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.

coordToIndexX

public int coordToIndexX(double coord)
Description copied from interface: IProfile2D
Convenience method, equivalent to xAxis().coordToIndex(coord).

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

coordToIndexY

public int coordToIndexY(double coord)
Description copied from interface: IProfile2D
Convenience method, equivalent to yAxis().coordToIndex(coord).

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

fill

public void fill(double x,
                 double y,
                 double z)
          throws IllegalArgumentException
Description copied from interface: IProfile2D
Fill the IProfile2D. 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 IProfile2D
Throws:
IllegalArgumentException

fill

public void fill(double x,
                 double y,
                 double z,
                 double weight)
          throws IllegalArgumentException
Description copied from interface: IProfile2D
Fill the IProfile2D. 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 IProfile2D
Throws:
IllegalArgumentException

meanX

public double meanX()
Description copied from interface: IProfile2D
Returns the mean of the in-range data of the profile, as calculated on filling-time projected on the X axis.

Specified by:
meanX in interface IProfile2D

meanY

public double meanY()
Description copied from interface: IProfile2D
Returns the mean of the in-range data of the profile, as calculated on filling-time projected on the Y axis.

Specified by:
meanY in interface IProfile2D

rmsX

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

Specified by:
rmsX in interface IProfile2D

rmsY

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

Specified by:
rmsY in interface IProfile2D

xAxis

public IAxis xAxis()
Description copied from interface: IProfile2D
Return the X axis.

Specified by:
xAxis in interface IProfile2D

yAxis

public IAxis yAxis()
Description copied from interface: IProfile2D
Return the Y axis.

Specified by:
yAxis in interface IProfile2D

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.

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.

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.

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.

scale

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

add

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

Specified by:
add in interface IProfile2D
Throws:
IllegalArgumentException - if the profile binnings are incompatible

initProfile2D

public void initProfile2D(IAxis xAxis,
                          IAxis yAxis)

initProfile2D

public void initProfile2D(IAxis xAxis,
                          IAxis yAxis,
                          String options)

setRmsX

public void setRmsX(double rmsX)

setRmsY

public void setRmsY(double rmsY)

setMeanX

public void setMeanX(double meanX)

setMeanY

public void setMeanY(double meanY)

setNEntries

public void setNEntries(int entries)

setValidEntries

public void setValidEntries(int entries)

setContents

public void setContents(double[][] heights,
                        double[][] errors,
                        int[][] entries,
                        double[][] rmss,
                        double[][] meanXs,
                        double[][] meanYs)


jHepWork 3.2 © jWork.org