FreeHEP API
Version 3.0

hep.aida
Interface ICloud2D

All Superinterfaces:
IBaseHistogram, ICloud

public interface ICloud2D
extends ICloud

User level interface to a 2D Cloud.

Author:
The AIDA team (http://aida.freehep.org/)

Method Summary
 void convert(double[] binEdgesX, double[] binEdgesY)
          Convert internally the ICloud2D to an IHistogram2D with given bin edges.
 void convert(int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY)
          Convert internally the ICloud2D to an IHistogram2D with given number of bins, upper edge and lower edge.
 void fill(double x, double y)
          Fill the ICloud2D with a couple of values and a corresponding weight.
 void fill(double x, double y, double weight)
          Fill the ICloud2D with a couple of values and a corresponding weight.
 void fillHistogram(IHistogram2D hist)
          Project the ICloud2D on an IHistogram2D.
 IHistogram2D histogram()
          Get the internal IHistogram2D in which the ICloud2D converted to.
 double lowerEdgeX()
          Get the lower edge of the ICloud2D along the x axis.
 double lowerEdgeY()
          Get the lower edge of the ICloud2D along the y axis.
 double meanX()
          Get the mean of the ICloud2D along the x axis.
 double meanY()
          Get the mean of the ICloud2D along the y axis.
 double rmsX()
          Get the RMS of the ICloud2D along the x axis.
 double rmsY()
          Get the RMS of the ICloud2D along the y axis.
 double upperEdgeX()
          Get the upper edge of the ICloud2D along the x axis.
 double upperEdgeY()
          Get the upper edge of the ICloud2D along the y axis.
 double valueX(int index)
          Get the x value corresponding to a given entry.
 double valueY(int index)
          Get the y value corresponding to a given entry.
 double weight(int index)
          Get the weight corresponding to a given entry.
 
Methods inherited from interface hep.aida.ICloud
convertToHistogram, isConverted, scale, sumOfWeights
 
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, entries, reset, setTitle, title
 

Method Detail

fill

public void fill(double x,
                 double y)
          throws IllegalArgumentException
Fill the ICloud2D with a couple of values and a corresponding weight.

Parameters:
x - The x value.
y - The y value.
Throws:
IllegalArgumentException - If the ICloud2D is full, if the weight's value is is not between 0 and 1.

fill

public void fill(double x,
                 double y,
                 double weight)
          throws IllegalArgumentException
Fill the ICloud2D with a couple of values and a corresponding weight.

Parameters:
x - The x value.
y - The y value.
weight - The corresponding weight. By default it is 1.
Throws:
IllegalArgumentException - If the ICloud2D is full, if the weight's value is is not between 0 and 1.

lowerEdgeX

public double lowerEdgeX()
Get the lower edge of the ICloud2D along the x axis.

Returns:
The lower edge along the x axis.

lowerEdgeY

public double lowerEdgeY()
Get the lower edge of the ICloud2D along the y axis.

Returns:
The lower edge along the y axis.

upperEdgeX

public double upperEdgeX()
Get the upper edge of the ICloud2D along the x axis.

Returns:
The upper edge along the x axis.

upperEdgeY

public double upperEdgeY()
Get the upper edge of the ICloud2D along the y axis.

Returns:
The upper edge along the y axis.

valueX

public double valueX(int index)
              throws AlreadyConvertedException
Get the x value corresponding to a given entry.

Parameters:
index - The entry's index.
Returns:
The x value of the index-th entry.
Throws:
AlreadyConvertedException - If the ICloud2D has already been converted.

valueY

public double valueY(int index)
              throws AlreadyConvertedException
Get the y value corresponding to a given entry.

Parameters:
index - The entry's index.
Returns:
The y value of the index-th entry.
Throws:
AlreadyConvertedException - If the ICloud2D has already been converted.

weight

public double weight(int index)
              throws AlreadyConvertedException
Get the weight corresponding to a given entry.

Parameters:
index - The entry's index.
Returns:
The weight of the index-th entry.
Throws:
AlreadyConvertedException - If the ICloud has already been converted.

meanX

public double meanX()
Get the mean of the ICloud2D along the x axis.

Returns:
The mean along the x axis.

meanY

public double meanY()
Get the mean of the ICloud2D along the y axis.

Returns:
The mean along the y axis.

rmsX

public double rmsX()
Get the RMS of the ICloud2D along the x axis.

Returns:
The RMS along the x axis.

rmsY

public double rmsY()
Get the RMS of the ICloud2D along the y axis.

Returns:
The RMS along the y axis.

convert

public void convert(int nBinsX,
                    double lowerEdgeX,
                    double upperEdgeX,
                    int nBinsY,
                    double lowerEdgeY,
                    double upperEdgeY)
             throws AlreadyConvertedException
Convert internally the ICloud2D to an IHistogram2D with given number of bins, upper edge and lower edge.

Parameters:
nBinsX - The number of bins of the x axis.
lowerEdgeX - The lower edge of bins of the x axis.
upperEdgeX - The upper edge of bins of the x axis.
nBinsY - The number of bins of the y axis.
lowerEdgeY - The lower edge of bins of the y axis.
upperEdgeY - The upper edge of bins of the y axis.
Throws:
AlreadyConvertedException - If the ICloud2D has already been converted.

convert

public void convert(double[] binEdgesX,
                    double[] binEdgesY)
             throws AlreadyConvertedException
Convert internally the ICloud2D to an IHistogram2D with given bin edges.

Parameters:
binEdgesX - The bins edges of the x axis.
binEdgesY - The bins edges of the y axis.
Throws:
AlreadyConvertedException - If the ICloud2D has already been converted.

histogram

public IHistogram2D histogram()
                       throws RuntimeException
Get the internal IHistogram2D in which the ICloud2D converted to.

Returns:
The histogram.
Throws:
RuntimeException - If the ICloud2D did not convert either automatically or because of a convert() method invocation.

fillHistogram

public void fillHistogram(IHistogram2D hist)
                   throws RuntimeException
Project the ICloud2D on an IHistogram2D.

Parameters:
hist - The IHistogram2D to be filled.
Throws:
RuntimeException - If the ICloud2D is already converted.

FreeHEP API
Version 3.0

Copyright © 2000-2002 AIDA Team, All Rights Reserved.