hep.aida
Interface ICloud2D
-
- All Superinterfaces:
- IBaseHistogram, ICloud
- All Known Implementing Classes:
- Cloud2D
public interface ICloud2D extends ICloud
User level interface to a 2D Cloud.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidconvert(double[] binEdgesX, double[] binEdgesY)Convert internally the ICloud2D to an IHistogram2D with given bin edges.voidconvert(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.voidfill(double x, double y)Fill the ICloud2D with a couple of values and a corresponding weight.voidfill(double x, double y, double weight)Fill the ICloud2D with a couple of values and a corresponding weight.voidfillHistogram(IHistogram2D hist)Project the ICloud2D on an IHistogram2D.IHistogram2Dhistogram()Get the internal IHistogram2D in which the ICloud2D converted to.doublelowerEdgeX()Get the lower edge of the ICloud2D along the x axis.doublelowerEdgeY()Get the lower edge of the ICloud2D along the y axis.doublemeanX()Get the mean of the ICloud2D along the x axis.doublemeanY()Get the mean of the ICloud2D along the y axis.doublermsX()Get the RMS of the ICloud2D along the x axis.doublermsY()Get the RMS of the ICloud2D along the y axis.voidsetConversionParameters(int binsX, double lowerEdgeX, double upperEdgeX, int binsY, double lowerEdgeY, double upperEdgeY)Set the parameters for the ICloud conversion to an IHistogram.doubleupperEdgeX()Get the upper edge of the ICloud2D along the x axis.doubleupperEdgeY()Get the upper edge of the ICloud2D along the y axis.doublevalueX(int index)Get the x value corresponding to a given entry.doublevalueY(int index)Get the y value corresponding to a given entry.doubleweight(int index)Get the weight corresponding to a given entry.-
Methods inherited from interface hep.aida.ICloud
convertToHistogram, isConverted, maxEntries, scale, sumOfWeights
-
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, entries, nanEntries, reset, setTitle, title
-
-
-
-
Method Detail
-
fill
void fill(double x, double y) throws java.lang.IllegalArgumentExceptionFill the ICloud2D with a couple of values and a corresponding weight. If either a coordinate or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Parameters:
x- The x value.y- The y value.- Throws:
java.lang.IllegalArgumentException- If the ICloud2D is full or if the weight's value is not between 0 and 1.
-
fill
void fill(double x, double y, double weight) throws java.lang.IllegalArgumentExceptionFill the ICloud2D with a couple of values and a corresponding weight. If either a coordinate or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Parameters:
x- The x value.y- The y value.weight- The corresponding weight. By default it is 1.- Throws:
java.lang.IllegalArgumentException- If the ICloud2D is full or if the weight's value is not between 0 and 1.
-
lowerEdgeX
double lowerEdgeX()
Get the lower edge of the ICloud2D along the x axis.- Returns:
- The lower edge along the x axis.
-
lowerEdgeY
double lowerEdgeY()
Get the lower edge of the ICloud2D along the y axis.- Returns:
- The lower edge along the y axis.
-
upperEdgeX
double upperEdgeX()
Get the upper edge of the ICloud2D along the x axis.- Returns:
- The upper edge along the x axis.
-
upperEdgeY
double upperEdgeY()
Get the upper edge of the ICloud2D along the y axis.- Returns:
- The upper edge along the y axis.
-
valueX
double valueX(int index) throws AlreadyConvertedExceptionGet 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
double valueY(int index) throws AlreadyConvertedExceptionGet 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
double weight(int index) throws AlreadyConvertedExceptionGet 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
double meanX()
Get the mean of the ICloud2D along the x axis.- Returns:
- The mean along the x axis.
-
meanY
double meanY()
Get the mean of the ICloud2D along the y axis.- Returns:
- The mean along the y axis.
-
rmsX
double rmsX()
Get the RMS of the ICloud2D along the x axis.- Returns:
- The RMS along the x axis.
-
rmsY
double rmsY()
Get the RMS of the ICloud2D along the y axis.- Returns:
- The RMS along the y axis.
-
convert
void convert(int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY) throws AlreadyConvertedExceptionConvert 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
void convert(double[] binEdgesX, double[] binEdgesY) throws AlreadyConvertedExceptionConvert 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
IHistogram2D histogram() throws java.lang.RuntimeException
Get the internal IHistogram2D in which the ICloud2D converted to.- Returns:
- The histogram.
- Throws:
java.lang.RuntimeException- If the ICloud2D did not convert either automatically or because of a convert() method invocation.
-
fillHistogram
void fillHistogram(IHistogram2D hist) throws java.lang.RuntimeException
Project the ICloud2D on an IHistogram2D.- Parameters:
hist- The IHistogram2D to be filled.- Throws:
java.lang.RuntimeException- If the ICloud2D is already converted.
-
setConversionParameters
void setConversionParameters(int binsX, double lowerEdgeX, double upperEdgeX, int binsY, double lowerEdgeY, double upperEdgeY) throws java.lang.IllegalArgumentExceptionSet the parameters for the ICloud conversion to an IHistogram.- Parameters:
binsX- The X axis number of bins of the conversion IHistogram.lowerEdgeX- The X axis lower edge of the conversion IHistogram.upperEdgeX- The X axis upper edge of the conversion IHistogram.binsY- The Y axis number of bins of the conversion IHistogram.lowerEdgeY- The Y axis lower edge of the conversion IHistogram.upperEdgeY- The Y axis upper edge of the conversion IHistogram.- Throws:
java.lang.IllegalArgumentException
-
-
DMelt 3.0 © DataMelt by jWork.ORG