FreeHEP API
Version v1.2.2

hep.aida.ref.histogram
Class Cloud3D

java.lang.Object
  |
  +--hep.aida.ref.event.AIDAObservable
        |
        +--hep.aida.ref.ManagedObject
              |
              +--hep.aida.ref.histogram.AbstractBaseHistogram
                    |
                    +--hep.aida.ref.histogram.Cloud
                          |
                          +--hep.aida.ref.histogram.Cloud3D
All Implemented Interfaces:
hep.aida.IBaseHistogram, hep.aida.ICloud, hep.aida.ICloud3D, hep.aida.dev.IDevManagedObject, hep.aida.IManagedObject, IsObservable

public class Cloud3D
extends Cloud
implements hep.aida.ICloud3D

Author:
The AIDA team @ SLAC.

Field Summary
protected  double sumOfWeights
           
 
Fields inherited from class hep.aida.ref.histogram.Cloud
arraySize, CLOUD_ARRAY_ENTRIES, convBins, maxEntries
 
Fields inherited from class hep.aida.ref.ManagedObject
fillable
 
Fields inherited from class hep.aida.ref.event.AIDAObservable
isValid
 
Constructor Summary
  Cloud3D()
          Create a new Cloud3D
protected Cloud3D(String name, String title, int nMax, String options)
           
 
Method Summary
 void convert(double[] binEdgesX, double[] binEdgesY, double[] binEdgesZ)
           
 void convert(int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, int nBinsZ, double lowerEdgeZ, double upperEdgeZ)
          Convert the Cloud to a Histogram.
 void convertToHistogram()
          Convert the ICloud to an IHistogram using the default number of bins.
 int entries()
          Get the Cloud's entries.
 void fill(double xValue, double yValue, double zValue)
          Fill the Cloud with new values with unit weight
 void fill(double xValue, double yValue, double zValue, double weight)
          Fill the Cloud with new values with given weight
 void fillHistogram(hep.aida.IHistogram3D hist3d)
           
 hep.aida.IHistogram3D histogram()
          Get the Histogram representing the Cloud
 boolean isConverted()
          Has the Cloud been converted to a Histogram?
 double lowerEdgeX()
          Get the Cloud's x lower edge.
 double lowerEdgeY()
          Get the Cloud's y lower edge.
 double lowerEdgeZ()
          Get the Cloud's z lower edge.
 double meanX()
          Get the Cloud's x mean.
 double meanY()
          Get the Cloud's y mean.
 double meanZ()
          Get the Cloud's z mean.
 void reset()
          Reset the histogram; as if just created.
 double rmsX()
          Get the Cloud's x rms.
 double rmsY()
          Get the Cloud's y rms.
 double rmsZ()
          Get the Cloud's z rms.
 void scale(double scaleFactor)
          Scale the weights by a given factor.
 void setHistogram(hep.aida.IHistogram3D hist)
          Set the Histogram representation of the Cloud.
 void setLowerEdgeX(double lowerEdgeX)
          Set the Cloud's x lower edge
 void setLowerEdgeY(double lowerEdgeY)
          Set the Cloud's y lower edge
 void setLowerEdgeZ(double lowerEdgeZ)
          Set the Cloud's z lower edge
 void setUpperEdgeX(double upperEdgeX)
          Set the Cloud's x upper edge
 void setUpperEdgeY(double upperEdgeY)
          Set the Cloud's y upper edge
 void setUpperEdgeZ(double upperEdgeZ)
          Set the Cloud's z upper edge
 double sumOfWeights()
          Get the sum of weights of of all the entries
 hep.aida.IHistogram3D toShowableHistogram(int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, int nBinsZ, double lowerEdgeZ, double upperEdgeZ, boolean useMargin)
          Represent the Cloud as a Histogram.
 double upperEdgeX()
          Get the Cloud's x upper edge.
 double upperEdgeY()
          Get the Cloud's y upper edge.
 double upperEdgeZ()
          Get the Cloud's z upper edge.
 double valueX(int index)
          Get a given x value from the Cloud.
 double valueY(int index)
          Get a given y value from the Cloud.
 double valueZ(int index)
          Get a given z value from the Cloud.
 double weight(int index)
          Get a given weight from the Cloud.
 
Methods inherited from class hep.aida.ref.histogram.Cloud
autoConvert, createEvent, getOptions, initCloud, margin, maxEntries
 
Methods inherited from class hep.aida.ref.histogram.AbstractBaseHistogram
annotation, dimension, setAnnotation, setTitle, title
 
Methods inherited from class hep.aida.ref.ManagedObject
getAIDAType, isFillable, name, setFillable, setName
 
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, fireStateChanged, fireStateChanged, removeListener, setIsValidAfterNotify, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.ICloud
maxEntries
 
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, setTitle, title
 
Methods inherited from interface hep.aida.ref.event.IsObservable
addListener, removeListener, setValid
 

Field Detail

sumOfWeights

protected double sumOfWeights
Constructor Detail

Cloud3D

public Cloud3D()
Create a new Cloud3D


Cloud3D

protected Cloud3D(String name,
                  String title,
                  int nMax,
                  String options)
Method Detail

fill

public void fill(double xValue,
                 double yValue,
                 double zValue)
Fill the Cloud with new values with unit weight

Specified by:
fill in interface hep.aida.ICloud3D
Parameters:
xValue - The x value to add to the Cloud.
yValue - The y value to add to the Cloud.
zValue - The z value to add to the Cloud.
Returns:
true if the fill was successful.

fill

public void fill(double xValue,
                 double yValue,
                 double zValue,
                 double weight)
Fill the Cloud with new values with given weight

Specified by:
fill in interface hep.aida.ICloud3D
Parameters:
xValue - The x value to add to the Cloud.
yValue - The y value to add to the Cloud.
zValue - The z value to add to the Cloud.
weight - The values weight.
Returns:
true if the fill was successful.

lowerEdgeX

public double lowerEdgeX()
Get the Cloud's x lower edge.

Specified by:
lowerEdgeX in interface hep.aida.ICloud3D
Returns:
The Cloud's x lower edge.

lowerEdgeY

public double lowerEdgeY()
Get the Cloud's y lower edge.

Specified by:
lowerEdgeY in interface hep.aida.ICloud3D
Returns:
The Cloud's y lower edge.

lowerEdgeZ

public double lowerEdgeZ()
Get the Cloud's z lower edge.

Specified by:
lowerEdgeZ in interface hep.aida.ICloud3D
Returns:
The Cloud's z lower edge.

upperEdgeX

public double upperEdgeX()
Get the Cloud's x upper edge.

Specified by:
upperEdgeX in interface hep.aida.ICloud3D
Returns:
The Cloud's x upper edge.

upperEdgeY

public double upperEdgeY()
Get the Cloud's y upper edge.

Specified by:
upperEdgeY in interface hep.aida.ICloud3D
Returns:
The Cloud's y upper edge.

upperEdgeZ

public double upperEdgeZ()
Get the Cloud's z upper edge.

Specified by:
upperEdgeZ in interface hep.aida.ICloud3D
Returns:
The Cloud's z upper edge.

setLowerEdgeX

public void setLowerEdgeX(double lowerEdgeX)
Set the Cloud's x lower edge

Parameters:
lowerEdgeX - The Cloud's x lower edge.

setLowerEdgeY

public void setLowerEdgeY(double lowerEdgeY)
Set the Cloud's y lower edge

Parameters:
lowerEdgeY - The Cloud's y lower edge.

setLowerEdgeZ

public void setLowerEdgeZ(double lowerEdgeZ)
Set the Cloud's z lower edge

Parameters:
lowerEdgeZ - The Cloud's z lower edge.

setUpperEdgeX

public void setUpperEdgeX(double upperEdgeX)
Set the Cloud's x upper edge

Parameters:
upperEdgeX - The Cloud's x upper edge.

setUpperEdgeY

public void setUpperEdgeY(double upperEdgeY)
Set the Cloud's y upper edge

Parameters:
upperEdgeY - The Cloud's y upper edge.

setUpperEdgeZ

public void setUpperEdgeZ(double upperEdgeZ)
Set the Cloud's z upper edge

Parameters:
upperEdgeZ - The Cloud's z upper edge.

valueX

public double valueX(int index)
Get a given x value from the Cloud.

Specified by:
valueX in interface hep.aida.ICloud3D
Parameters:
index - The x value's index.
Returns:
The Cloud's corresponding x value.
Throws:
RuntimeException - if the Cloud has been converted

valueY

public double valueY(int index)
Get a given y value from the Cloud.

Specified by:
valueY in interface hep.aida.ICloud3D
Parameters:
index - The y value's index.
Returns:
The Cloud's corresponding y value.
Throws:
RuntimeException - if the Cloud has been converted

valueZ

public double valueZ(int index)
Get a given z value from the Cloud.

Specified by:
valueZ in interface hep.aida.ICloud3D
Parameters:
index - The z value's index.
Returns:
The Cloud's corresponding z value.
Throws:
RuntimeException - if the Cloud has been converted

weight

public double weight(int index)
Get a given weight from the Cloud.

Specified by:
weight in interface hep.aida.ICloud3D
Parameters:
index - The weight's index.
Returns:
The Cloud's corresponding weight.
Throws:
RuntimeException - if the Cloud has been converted

meanX

public double meanX()
Get the Cloud's x mean.

Specified by:
meanX in interface hep.aida.ICloud3D
Returns:
The Cloud's x mean.

meanY

public double meanY()
Get the Cloud's y mean.

Specified by:
meanY in interface hep.aida.ICloud3D
Returns:
The Cloud's y mean.

meanZ

public double meanZ()
Get the Cloud's z mean.

Specified by:
meanZ in interface hep.aida.ICloud3D
Returns:
The Cloud's z mean.

rmsX

public double rmsX()
Get the Cloud's x rms.

Specified by:
rmsX in interface hep.aida.ICloud3D
Returns:
The Cloud's x rms.

rmsY

public double rmsY()
Get the Cloud's y rms.

Specified by:
rmsY in interface hep.aida.ICloud3D
Returns:
The Cloud's y rms.

rmsZ

public double rmsZ()
Get the Cloud's z rms.

Specified by:
rmsZ in interface hep.aida.ICloud3D
Returns:
The Cloud's z rms.

entries

public int entries()
Get the Cloud's entries.

Specified by:
entries in interface hep.aida.IBaseHistogram
Specified by:
entries in class AbstractBaseHistogram
Returns:
The Cloud's entries.

convert

public void convert(int nBinsX,
                    double lowerEdgeX,
                    double upperEdgeX,
                    int nBinsY,
                    double lowerEdgeY,
                    double upperEdgeY,
                    int nBinsZ,
                    double lowerEdgeZ,
                    double upperEdgeZ)
Convert the Cloud to a Histogram.

Specified by:
convert in interface hep.aida.ICloud3D
Parameters:
nBinsX - The Histogram's x number of bins.
lowerEdgeX - The Histogram's x lower edge.
upperEdgeX - The Histogram's x upper edge.
nBinsY - The Histogram's y number of bins.
lowerEdgeY - The Histogram's y lower edge.
upperEdgeY - The Histogram's y upper edge.
nBinsZ - The Histogram's z number of bins.
lowerEdgeZ - The Histogram's z lower edge.
upperEdgeZ - The Histogram's z upper edge.

toShowableHistogram

public hep.aida.IHistogram3D toShowableHistogram(int nBinsX,
                                                 double lowerEdgeX,
                                                 double upperEdgeX,
                                                 int nBinsY,
                                                 double lowerEdgeY,
                                                 double upperEdgeY,
                                                 int nBinsZ,
                                                 double lowerEdgeZ,
                                                 double upperEdgeZ,
                                                 boolean useMargin)
Represent the Cloud as a Histogram.

Parameters:
nBinsX - The Histogram's x number of bins.
lowerEdgeX - The Histogram's x lower edge.
upperEdgeX - The Histogram's x upper edge.
nBinsY - The Histogram's y number of bins.
lowerEdgeY - The Histogram's y lower edge.
upperEdgeY - The Histogram's y upper edge.
nBinsZ - The Histogram's z number of bins.
lowerEdgeZ - The Histogram's z lower edge.
upperEdgeZ - The Histogram's z upper edge.
Returns:
The Histogram representing the Cloud.

convert

public void convert(double[] binEdgesX,
                    double[] binEdgesY,
                    double[] binEdgesZ)
Specified by:
convert in interface hep.aida.ICloud3D

isConverted

public boolean isConverted()
Has the Cloud been converted to a Histogram?

Specified by:
isConverted in interface hep.aida.ICloud
Specified by:
isConverted in class Cloud
Returns:
true<\code> if the Cloud has been converted to a Histogram.

histogram

public hep.aida.IHistogram3D histogram()
                                throws RuntimeException
Get the Histogram representing the Cloud

Specified by:
histogram in interface hep.aida.ICloud3D
Returns:
the histogram.
Throws:
RuntimeException - if the histogram is not auto-convertible and "convert" has not been called.

setHistogram

public void setHistogram(hep.aida.IHistogram3D hist)
Set the Histogram representation of the Cloud.

Parameters:
hist - The Histogram representing the Cloud.

fillHistogram

public void fillHistogram(hep.aida.IHistogram3D hist3d)
Specified by:
fillHistogram in interface hep.aida.ICloud3D

reset

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

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

convertToHistogram

public void convertToHistogram()
Description copied from class: Cloud
Convert the ICloud to an IHistogram using the default number of bins.

Specified by:
convertToHistogram in interface hep.aida.ICloud
Specified by:
convertToHistogram in class Cloud

scale

public void scale(double scaleFactor)
           throws IllegalArgumentException
Description copied from class: Cloud
Scale the weights by a given factor.

Specified by:
scale in interface hep.aida.ICloud
Specified by:
scale in class Cloud
Parameters:
scaleFactor - The scale factor.
IllegalArgumentException

sumOfWeights

public double sumOfWeights()
Get the sum of weights of of all the entries

Specified by:
sumOfWeights in interface hep.aida.ICloud
Specified by:
sumOfWeights in class Cloud
Returns:
The sum of the weights of all the entries.

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.