cern.hep.aida.ref
Class Histogram3D
java.lang.Object
cern.hep.aida.ref.Histogram3D
- All Implemented Interfaces:
- colt.hep.aida.IHistogram, colt.hep.aida.IHistogram3D, java.io.Serializable
public class Histogram3D
- extends java.lang.Object
- implements colt.hep.aida.IHistogram3D
A reference implementation of hep.aida.IHistogram3D.
The goal is to provide a clear implementation rather than the most efficient implementation.
However, performance seems fine - filling 3 * 10^5 points/sec, both using FixedAxis or VariableAxis.
- See Also:
- Serialized Form
Fields inherited from interface colt.hep.aida.IHistogram |
OVERFLOW, serialVersionUID, UNDERFLOW |
Constructor Summary |
Histogram3D(java.lang.String title,
double[] xEdges,
double[] yEdges,
double[] zEdges)
Creates a variable-width histogram. |
Histogram3D(java.lang.String title,
colt.hep.aida.IAxis xAxis,
colt.hep.aida.IAxis yAxis,
colt.hep.aida.IAxis zAxis)
Creates a histogram with the given axis binning. |
Histogram3D(java.lang.String title,
int xBins,
double xMin,
double xMax,
int yBins,
double yMin,
double yMax,
int zBins,
double zMin,
double zMax)
Creates a fixed-width histogram. |
Method Summary |
int |
allEntries()
|
int |
binEntries(int indexX,
int indexY,
int indexZ)
|
double |
binError(int indexX,
int indexY,
int indexZ)
|
double |
binHeight(int indexX,
int indexY,
int indexZ)
|
int |
dimensions()
|
int |
entries()
|
double |
equivalentBinEntries()
|
int |
extraEntries()
|
void |
fill(double x,
double y,
double z)
|
void |
fill(double x,
double y,
double z,
double weight)
|
double |
meanX()
|
double |
meanY()
|
double |
meanZ()
|
int[] |
minMaxBins()
|
colt.hep.aida.IHistogram2D |
projectionXY()
|
colt.hep.aida.IHistogram2D |
projectionXZ()
|
colt.hep.aida.IHistogram2D |
projectionYZ()
|
void |
reset()
|
double |
rmsX()
|
double |
rmsY()
|
double |
rmsZ()
|
colt.hep.aida.IHistogram2D |
sliceXY(int indexZ)
|
colt.hep.aida.IHistogram2D |
sliceXY(int indexZ1,
int indexZ2)
|
colt.hep.aida.IHistogram2D |
sliceXZ(int indexY)
|
colt.hep.aida.IHistogram2D |
sliceXZ(int indexY1,
int indexY2)
|
colt.hep.aida.IHistogram2D |
sliceYZ(int indexX)
|
colt.hep.aida.IHistogram2D |
sliceYZ(int indexX1,
int indexX2)
|
double |
sumAllBinHeights()
|
double |
sumBinHeights()
|
double |
sumExtraBinHeights()
|
java.lang.String |
title()
|
colt.hep.aida.IAxis |
xAxis()
|
colt.hep.aida.IAxis |
yAxis()
|
colt.hep.aida.IAxis |
zAxis()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface colt.hep.aida.IHistogram3D |
minMaxBins, projectionXY, projectionXZ, projectionYZ, sliceXY, sliceXY, sliceXZ, sliceXZ, sliceYZ, sliceYZ, xAxis, yAxis, zAxis |
Methods inherited from interface colt.hep.aida.IHistogram |
dimensions, entries, extraEntries, sumBinHeights, sumExtraBinHeights, title |
Histogram3D
public Histogram3D(java.lang.String title,
double[] xEdges,
double[] yEdges,
double[] zEdges)
- Creates a variable-width histogram.
Example: xEdges = (0.2, 1.0, 5.0, 6.0), yEdges = (-5, 0, 7), zEdges = (-5, 0, 7) yields 3*2*2 in-range bins.
- Parameters:
title
- The histogram title.xEdges
- the bin boundaries the x-axis shall have;
must be sorted ascending and must not contain multiple identical elements.yEdges
- the bin boundaries the y-axis shall have;
must be sorted ascending and must not contain multiple identical elements.zEdges
- the bin boundaries the z-axis shall have;
must be sorted ascending and must not contain multiple identical elements.
- Throws:
java.lang.IllegalArgumentException
- if xEdges.length < 1 || yEdges.length < 1|| zEdges.length < 1.
Histogram3D
public Histogram3D(java.lang.String title,
int xBins,
double xMin,
double xMax,
int yBins,
double yMin,
double yMax,
int zBins,
double zMin,
double zMax)
- Creates a fixed-width histogram.
- Parameters:
title
- The histogram title.xBins
- The number of bins on the X axis.xMin
- The minimum value on the X axis.xMax
- The maximum value on the X axis.yBins
- The number of bins on the Y axis.yMin
- The minimum value on the Y axis.yMax
- The maximum value on the Y axis.zBins
- The number of bins on the Z axis.zMin
- The minimum value on the Z axis.zMax
- The maximum value on the Z axis.
Histogram3D
public Histogram3D(java.lang.String title,
colt.hep.aida.IAxis xAxis,
colt.hep.aida.IAxis yAxis,
colt.hep.aida.IAxis zAxis)
- Creates a histogram with the given axis binning.
- Parameters:
title
- The histogram title.xAxis
- The x-axis description to be used for binning.yAxis
- The y-axis description to be used for binning.zAxis
- The z-axis description to be used for binning.
allEntries
public int allEntries()
- Specified by:
allEntries
in interface colt.hep.aida.IHistogram
binEntries
public int binEntries(int indexX,
int indexY,
int indexZ)
- Specified by:
binEntries
in interface colt.hep.aida.IHistogram3D
binError
public double binError(int indexX,
int indexY,
int indexZ)
- Specified by:
binError
in interface colt.hep.aida.IHistogram3D
binHeight
public double binHeight(int indexX,
int indexY,
int indexZ)
- Specified by:
binHeight
in interface colt.hep.aida.IHistogram3D
equivalentBinEntries
public double equivalentBinEntries()
- Specified by:
equivalentBinEntries
in interface colt.hep.aida.IHistogram
fill
public void fill(double x,
double y,
double z)
- Specified by:
fill
in interface colt.hep.aida.IHistogram3D
fill
public void fill(double x,
double y,
double z,
double weight)
- Specified by:
fill
in interface colt.hep.aida.IHistogram3D
meanX
public double meanX()
- Specified by:
meanX
in interface colt.hep.aida.IHistogram3D
meanY
public double meanY()
- Specified by:
meanY
in interface colt.hep.aida.IHistogram3D
meanZ
public double meanZ()
- Specified by:
meanZ
in interface colt.hep.aida.IHistogram3D
reset
public void reset()
- Specified by:
reset
in interface colt.hep.aida.IHistogram
rmsX
public double rmsX()
- Specified by:
rmsX
in interface colt.hep.aida.IHistogram3D
rmsY
public double rmsY()
- Specified by:
rmsY
in interface colt.hep.aida.IHistogram3D
rmsZ
public double rmsZ()
- Specified by:
rmsZ
in interface colt.hep.aida.IHistogram3D
sumAllBinHeights
public double sumAllBinHeights()
- Specified by:
sumAllBinHeights
in interface colt.hep.aida.IHistogram
dimensions
public int dimensions()
- Specified by:
dimensions
in interface colt.hep.aida.IHistogram
entries
public int entries()
- Specified by:
entries
in interface colt.hep.aida.IHistogram
extraEntries
public int extraEntries()
- Specified by:
extraEntries
in interface colt.hep.aida.IHistogram
minMaxBins
public int[] minMaxBins()
- Specified by:
minMaxBins
in interface colt.hep.aida.IHistogram3D
projectionXY
public colt.hep.aida.IHistogram2D projectionXY()
- Specified by:
projectionXY
in interface colt.hep.aida.IHistogram3D
projectionXZ
public colt.hep.aida.IHistogram2D projectionXZ()
- Specified by:
projectionXZ
in interface colt.hep.aida.IHistogram3D
projectionYZ
public colt.hep.aida.IHistogram2D projectionYZ()
- Specified by:
projectionYZ
in interface colt.hep.aida.IHistogram3D
sliceXY
public colt.hep.aida.IHistogram2D sliceXY(int indexZ)
- Specified by:
sliceXY
in interface colt.hep.aida.IHistogram3D
sliceXY
public colt.hep.aida.IHistogram2D sliceXY(int indexZ1,
int indexZ2)
- Specified by:
sliceXY
in interface colt.hep.aida.IHistogram3D
sliceXZ
public colt.hep.aida.IHistogram2D sliceXZ(int indexY)
- Specified by:
sliceXZ
in interface colt.hep.aida.IHistogram3D
sliceXZ
public colt.hep.aida.IHistogram2D sliceXZ(int indexY1,
int indexY2)
- Specified by:
sliceXZ
in interface colt.hep.aida.IHistogram3D
sliceYZ
public colt.hep.aida.IHistogram2D sliceYZ(int indexX)
- Specified by:
sliceYZ
in interface colt.hep.aida.IHistogram3D
sliceYZ
public colt.hep.aida.IHistogram2D sliceYZ(int indexX1,
int indexX2)
- Specified by:
sliceYZ
in interface colt.hep.aida.IHistogram3D
sumBinHeights
public double sumBinHeights()
- Specified by:
sumBinHeights
in interface colt.hep.aida.IHistogram
sumExtraBinHeights
public double sumExtraBinHeights()
- Specified by:
sumExtraBinHeights
in interface colt.hep.aida.IHistogram
xAxis
public colt.hep.aida.IAxis xAxis()
- Specified by:
xAxis
in interface colt.hep.aida.IHistogram3D
yAxis
public colt.hep.aida.IAxis yAxis()
- Specified by:
yAxis
in interface colt.hep.aida.IHistogram3D
zAxis
public colt.hep.aida.IAxis zAxis()
- Specified by:
zAxis
in interface colt.hep.aida.IHistogram3D
title
public java.lang.String title()
- Specified by:
title
in interface colt.hep.aida.IHistogram
jHepWork 2.8 (©) S.Chekanov