public class H2D extends DrawOptions implements Serializable
Constructor and Description |
---|
H2D(hep.aida.ref.histogram.Cloud2D c2d,
int binX,
int binY)
Create H2D histogram from Cloud2D.
|
H2D(hep.aida.ref.histogram.Histogram2D h1)
Create a H2D histogram from JAIDA histogram
|
H2D(hep.aida.IHistogram2D h1)
Create H2D histogram from JAIDA IHistogram2D class
|
H2D(String title,
double[] edgesX,
double[] edgesY)
Create a 2D histogram using variable size bins in X and Y
|
H2D(String title,
hep.aida.IAxis xAx,
hep.aida.IAxis yAy)
Define H2D in terms of axis
|
H2D(String title,
int binsX,
double minX,
double maxX,
int binsY,
double minY,
double maxY)
Create 2D histogram
|
H2D(hep.io.root.interfaces.TH2 h2t)
Create H2D histogram from JAIDA TH1 histogram class
|
Modifier and Type | Method and Description |
---|---|
int |
allEntries()
Get number of all entries
|
int |
binEntries(int indexX,
int indexY)
Number of entries in the corresponding bin (i.e.
|
double |
binError(int indexX,
int indexY)
Error of the corresponding bin.
|
double[][] |
binErrors()
Get errors on heights as 2D array.
|
double |
binHeight(int indexX,
int indexY)
Total height of the corresponding bin.
|
double[][] |
binHeights()
Get bin heights as 2D array.
|
double[] |
binMeans(int i,
int j)
Get bin mean position at the location (i,i)
|
double[][] |
binMeansX()
Get mean position for X axis as 2D array.
|
double[][] |
binMeansY()
Get mean position for Y axis as 2D array.
|
void |
clear() |
H2D |
copy()
Make a copy of the data holder
|
H2D |
copy(String newtitle)
Get exact copy of the current histogram.
|
void |
doc()
Show online documentation.
|
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(hep.aida.ref.histogram.Cloud2D c2d)
Fill H2D histogram from Cloud2D.
|
void |
fill(double[] value1,
double[] value2)
Fill H2D histogram from 2 arrays (X amd Y).
|
void |
fill(double[] value1,
double[] value2,
double[] weights)
Fill H2D histogram from arrays.
|
void |
fill(double value1,
double value2)
Fill H2D histogram assuming all weights are unity.
|
void |
fill(double value1,
double value2,
double weight)
Fill H2D histogram with weights
|
void |
fill(P0D value1,
P0D value2)
Fill H2D histogram from 2 arrays.
|
void |
fill(P0I value1,
P0I value2)
Fill H2D histogram from 2 arrays.
|
int |
findBinX(double x)
Convert a coordinate X on the axis to a bin number
|
int |
findBinY(double y)
Convert a coordinate Y on the axis to a bin number
|
hep.aida.ref.histogram.Histogram2D |
get()
Get the JAIDA Histogram2D
|
hep.aida.IAxis |
getAxisX()
Get IAxis in X
|
hep.aida.IAxis |
getAxisY()
Get IAxis in Y
|
int |
getBinsX()
Get the number of bins in X
|
int |
getBinsY()
Get the number of bins in Y
|
H2D |
getDensity()
Get a density distribution dividing each bin of the histogram by the bin
width and the total number of heights for all bins.
|
double[] |
getLowerEdgesX()
Get lower edges for X bins as 1D array.
|
double[] |
getLowerEdgesY()
Get lower edges for Y bins as 1D array.
|
double |
getLowerEdgeX(int index)
Get lower edge of the bin in X
|
double |
getLowerEdgeY(int index)
Get lower edge of the bins in Y
|
double |
getMaxX()
Get max value of axis in X
|
double |
getMaxY()
Get max value of Y axis
|
double |
getMeanX()
Get mean on X.
|
double |
getMeanY()
Get mean on Y
|
double |
getMinX()
Get min value of axis in X
|
double |
getMinY()
Get min value of Y axis
|
int |
getOverflowEntriesX()
Get overflow entries in Y
|
int |
getOverflowEntriesY()
Get overflow entries in Y
|
double |
getOverflowHeightX()
Get overflow entries in Y
|
double |
getOverflowHeightY()
Get overflow height in Y
|
H2D |
getProbability()
Return q probability distribution derived from a histogram.
|
double |
getRmsX()
Get RMS on X
|
double |
getRmsY()
Get RMS on Y
|
Map<String,Double> |
getStat()
Calculate complete statistics for this histogram for the X or Y
Unlike other methods (like mean or rms), it performs calculations
on the existing histogram, thus the method is somewhat slow.
|
int |
getUnderflowEntriesX()
Get underflow entries in X
|
int |
getUnderflowEntriesY()
Get underflow entries in Y
|
double |
getUnderflowHeightX()
Get underflow height in X
|
double |
getUnderflowHeightY()
Get underflow height in Y
|
double |
getUpperEdgeX(int index)
Get upper edge of the bin in X
|
double |
getUpperEdgeY(int index)
Get upper edge of the bin in Y
|
double |
integral(int BinMinX,
int BinMaxX,
int BinMinY,
int BinMaxY)
Integrate histogram between two indices.
|
double |
integral(int BinMinX,
int BinMaxX,
int BinMinY,
int BinMaxY,
boolean timesBinWidth)
Integrate histogram between two indices.
|
double |
integralRange(double xMin,
double xMax,
double yMin,
double yMax,
boolean timesBinWidth)
Integrate histogram in the range.
|
H2D |
oper(H2D a,
String title,
String what)
Various manipulations with histograms (+,-,*,/).
|
H2D |
operScale(String title,
double scaleFactor)
Scale the histogram and return scaled object.
|
void |
scale(double scaleFactor)
Scale the histogram.
|
void |
scale(String title,
double scaleFactor)
Scale the histogram.
|
void |
setBinError(int indexX,
int indexY,
double error)
Set the error on this bin.
|
void |
setContents(double[][] heights,
double[][] errors)
Set content of H2D histogram
|
void |
setContents(double[][] heights,
double[][] errors,
int[][] entries,
double[][] meanXs,
double[][] rmsXs,
double[][] meanYs,
double[][] rmsYs)
Set the content of the whole Histogram at once.
|
void |
setMeanX(double mean)
Set mean on X.
|
void |
setMeanY(double mean)
Set mean on Y
|
void |
setNEntries(int entries)
Set all entries.
|
void |
setRmsX(double rmsX)
Set RMS on X.
|
void |
setRmsY(double rmsY)
Set RMS on Y
|
void |
setValidEntries(int entries)
Set in-range entries.
|
double |
sumAllBinHeights()
Get the sum of the bin heights for all the entries, in-range and
out-range ones.
|
double |
sumExtraBinHeights()
Get the sum of the bin heights for all the entries outside the
Histogram's range.
|
copyLinePars, getBinWidth, getColor, getDrawOption, getDrawOptions, getFillColor, getLegend, getLineParm, getLineStyle, getNameX, getNameY, getNameZ, getPenWidth, getSymbol, getSymbolShape, getSymbolSize, getTitle, getType, isBars, isErrX, isErrY, isFilled, printDrawOptions, printDrawOptions, setBars, setBinWidth, setColor, setDrawLine, setDrawLineKey, setDrawOption, setDrawSymbol, setErr, setErrAll, setErrColor, setErrColor, setErrColorX, setErrColorY, setErrFill, setErrFillColor, setErrFillColor, setErrSys, setErrSysFill, setErrSysFillColor, setErrSysFillColor, setErrSysX, setErrSysY, setErrTicSize, setErrX, setErrY, setFill, setFillColor, setFillColorTransparency, setGraphStyle, setLegend, setLineStyle, setNameX, setNameY, setNameZ, setPenDash, setPenDash, setPenWidth, setPenWidthErr, setPenWidthErrSys, setStyle, setSymbol, setSymbol, setSymbolSize, setTitle, setType
public H2D(String title, int binsX, double minX, double maxX, int binsY, double minY, double maxY)
title
- TitlebinsX
- Number of bins in XminX
- Min value in XmaxX
- Max value in XbinsY
- Number of bins in YminY
- Min value in YmaxY
- Max value in Ypublic H2D(hep.aida.IHistogram2D h1)
h1
- IHistogram2D histogram from JAIDApublic H2D(hep.aida.ref.histogram.Cloud2D c2d, int binX, int binY)
c2d
- Cloud2DbinX
- number of bins in XbinY
- number of bins in Ypublic H2D(String title, double[] edgesX, double[] edgesY)
title
- - bin titlesedgesX
- - array with bin edges in XedgesY
- - array with bin edges in Ypublic H2D(String title, hep.aida.IAxis xAx, hep.aida.IAxis yAy)
title
- titlexAx
- Axis for XyAy
- Axis for Ypublic H2D(hep.aida.ref.histogram.Histogram2D h1)
h1
- Histogram2D histogrampublic H2D(hep.io.root.interfaces.TH2 h2t)
h1t
- TH1 histogram from JAIDApublic hep.aida.ref.histogram.Histogram2D get()
public void setRmsY(double rmsY)
rmsY
- RMS on Ypublic void setMeanY(double mean)
mean
- on Ypublic double getRmsY()
public double getMeanY()
public double getMeanX()
public double getRmsX()
public void setNEntries(int entries)
entries
- entriespublic void setValidEntries(int entries)
entries
- entriespublic void setRmsX(double rmsX)
public void setMeanX(double mean)
mean
- on Xpublic void setContents(double[][] heights, double[][] errors)
heights
- heightserrors
- errorspublic void setContents(double[][] heights, double[][] errors, int[][] entries, double[][] meanXs, double[][] rmsXs, double[][] meanYs, double[][] rmsYs)
heights
- The bin heightserrors
- The bin errorsentries
- The bin entriesmeanXs
- The means of the bin along the x axisrmsXs
- The rmss of the bin along the x axismeanYs
- The means of the bin along the y axisrmsYs
- The rmss of the bin along the y axispublic void fill(double value1, double value2)
value1
- value in Xvalue2
- value in Ypublic void setBinError(int indexX, int indexY, double error)
indexX
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.indexY
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.error
- the error.public double binHeight(int indexX, int indexY)
indexX
- The x bin number in the external representation: (0...N-1) or
OVERFLOW or UNDERFLOW.indexY
- The y bin number in the external representation: (0...N-1) or
OVERFLOW or UNDERFLOW.public int extraEntries()
public double sumExtraBinHeights()
public double sumAllBinHeights()
public int getBinsX()
public int getBinsY()
public double getMinX()
public double getMaxX()
public double getMaxY()
public double getMinY()
public int getUnderflowEntriesY()
public double getUnderflowHeightY()
public double getUnderflowHeightX()
public int getUnderflowEntriesX()
public int getOverflowEntriesY()
public double getOverflowHeightY()
public int getOverflowEntriesX()
public double getOverflowHeightX()
public double getLowerEdgeX(int index)
index
- of the binpublic H2D oper(H2D a, String title, String what)
a
- H2D histogram.title
- New Titlepublic void scale(String title, double scaleFactor)
title
- New titlescaleFactor
- Scale factorpublic H2D operScale(String title, double scaleFactor)
title
- New titlescaleFactor
- Scale factorpublic double getUpperEdgeX(int index)
index
- of the binpublic double getUpperEdgeY(int index)
index
- of the binpublic double getLowerEdgeY(int index)
index
- of the binpublic Map<String,Double> getStat()
The key for the output map are: mean, error, rms, variance, stddev etc. Print the keys of this map to get the full access to statistics.
public int allEntries()
public int entries()
public hep.aida.IAxis getAxisX()
public hep.aida.IAxis getAxisY()
public void clear()
public double[][] binHeights()
public double[][] binErrors()
public double[][] binMeansX()
public double[] getLowerEdgesX()
public double[] getLowerEdgesY()
public double[][] binMeansY()
public double[] binMeans(int i, int j)
i
- bin position in Xj
- bin position in Ypublic H2D copy(String newtitle)
newtitle
- New titlepublic H2D getDensity()
public int binEntries(int indexX, int indexY)
indexX
- the x bin number in the external representation: (0...N-1) or
OVERFLOW or UNDERFLOW.indexY
- the y bin number in the external representation: (0...N-1) or
OVERFLOW or UNDERFLOW.public double binError(int indexX, int indexY)
indexX
- the x bin number in the external representation: (0...N-1) or
OVERFLOW or UNDERFLOW.indexY
- the y bin number in the external representation: (0...N-1) or
OVERFLOW or UNDERFLOW.public void fill(double value1, double value2, double weight)
value1
- value in Xvalue2
- value in Yweight
- weightpublic void fill(double[] value1, double[] value2)
value1
- array with values in Xvalue2
- array with values in Ypublic void fill(hep.aida.ref.histogram.Cloud2D c2d)
c2d
- input Cloud2D
array with values in Xpublic void fill(P0D value1, P0D value2)
value1
- array with values in Xvalue2
- array with values in Ypublic void fill(P0I value1, P0I value2)
value1
- array with values in Xvalue2
- array with values in Ypublic void fill(double[] value1, double[] value2, double[] weights)
value1
- array with values in Xvalue2
- array with values in Yweights
- weightspublic int findBinX(double x)
x
- coordinate on axispublic int findBinY(double y)
y
- coordinate on axispublic double integralRange(double xMin, double xMax, double yMin, double yMax, boolean timesBinWidth)
xMin
- Min value for X integration (included to integration)xMax
- Max index for X integration (included to integration)yMin
- Min index for Y integration (included to integration)yMax
- Max index for Y integration (included to integration)timesBinWidth
- If true, the integral is the sum of the bin contents
multiplied by the bin width in x.public H2D getProbability()
public H2D copy()
public void scale(double scaleFactor)
scaleFactor
- Scale factorpublic double integral(int BinMinX, int BinMaxX, int BinMinY, int BinMaxY)
BinMinX
- Min index for X integration (included to integration, start
from 1)BinMaxX
- Max index for X integration (included to integration)BinMinY
- Min index for Y integration (included to integration, start
from 1)BinMaxY
- Max index for Y integration (included to integration)public double integral(int BinMinX, int BinMaxX, int BinMinY, int BinMaxY, boolean timesBinWidth)
BinMinX
- Min index for X integration (included to integration, start
from 1)BinMaxX
- Max index for X integration (included to integration)BinMinY
- Min index for Y integration (included to integration, start
from 1)BinMaxY
- Max index for Y integration (included to integration)timesBinWidth
- If true, the integral is the sum of the bin contents
multiplied by the bin width in x.public void doc()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics