hep.aida.ref.histogram
Class Profile2D
- java.lang.Object
-
- hep.aida.ref.event.AIDAObservable
-
- hep.aida.ref.ManagedObject
-
- hep.aida.ref.histogram.AbstractBaseHistogram
-
- hep.aida.ref.histogram.Profile
-
- hep.aida.ref.histogram.Profile2D
-
- All Implemented Interfaces:
- IDevManagedObject, IBaseHistogram, IManagedObject, IProfile, IProfile2D, Connectable, IsObservable, java.io.Serializable
public class Profile2D extends Profile implements IProfile2D, IsObservable, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Profile2D()Create a 1-dimensional Profile.Profile2D(java.lang.String name, java.lang.String title, IAxis xAxis, IAxis yAxis)Create a 1-dimensional Profile.Profile2D(java.lang.String name, java.lang.String title, IAxis xAxis, IAxis yAxis, java.lang.String options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(IProfile2D profile)Modifies this profile by adding the contents of profile to it.intallEntries()Get the number or all the entries, both in range and underflow/overflow bins of the IProfile.intbinEntries(int indexX, int indexY)The number of entries (ie the number of times fill was called for this bin).intbinEntriesX(int indexX)Equivalent to projectionX().binEntries(indexX).intbinEntriesY(int indexY)Equivalent to projectionY().binEntries(indexY).doublebinError(int indexX, int indexY)The error on this bin.doublebinHeight(int indexX, int indexY)Total height of the corresponding bin (ie the sum of the weights in this bin).doublebinHeightX(int indexX)Equivalent to projectionX().binHeight(indexX).doublebinHeightY(int indexY)Equivalent to projectionY().binHeight(indexY).doublebinMeanX(int indexX, int indexY)The weighted mean along x of a given bin.doublebinMeanY(int indexX, int indexY)The weighted mean along y of a given bin.doublebinRms(int indexX, int indexY)The spread (RMS) of this bin.intcoordToIndexX(double coord)Convenience method, equivalent to xAxis().coordToIndex(coord).intcoordToIndexY(double coord)Convenience method, equivalent to yAxis().coordToIndex(coord).intentries()Number of in-range entries in the histogram.intextraEntries()Get the number of entries in the underflow and overflow bins.voidfill(double x, double y, double z)Fill the IProfile2D.voidfill(double x, double y, double z, double weight)Fill the IProfile2D.voidinitProfile2D(IAxis xAxis, IAxis yAxis)voidinitProfile2D(IAxis xAxis, IAxis yAxis, java.lang.String options)doublemaxBinHeight()Get the maximum height of the in-range bins.doublemeanX()Returns the mean of the in-range data of the profile, as calculated on filling-time projected on the X axis.doublemeanY()Returns the mean of the in-range data of the profile, as calculated on filling-time projected on the Y axis.doubleminBinHeight()Get the minimum height of the in-range bins.voidreset()Reset the histogram; as if just created.doublermsX()Returns the rms of the in-range data of the profile as calculated on filling-time projected on the X axis.doublermsY()Returns the rms of the in-range data of the profile as calculated on filling-time projected on the Y axis.voidscale(double scaleFactor)voidsetContents(double[][] heights, double[][] errors, int[][] entries, double[][] rmss, double[][] meanXs, double[][] meanYs)voidsetMeanX(double meanX)voidsetMeanY(double meanY)voidsetNEntries(int entries)voidsetRmsX(double rmsX)voidsetRmsY(double rmsY)voidsetValidEntries(int entries)doublesumAllBinHeights()Get the sum of all the bins heights (including underflow and overflow bin).doublesumBinHeights()Get the sum of in range bin heights in the IProfile.doublesumExtraBinHeights()Get the sum of the underflow and overflow bin height.IAxisxAxis()Return the X axis.IAxisyAxis()Return the Y axis.-
Methods inherited from class hep.aida.ref.histogram.Profile
nanEntries
-
Methods inherited from class hep.aida.ref.histogram.AbstractBaseHistogram
annotation, dimension, mapBinNumber, setAnnotation, setTitle, title
-
Methods inherited from class hep.aida.ref.ManagedObject
isFillable, name, setFillable, setName, type, typeForClass
-
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, isConnected, removeAllListeners, removeListener, setConnected, setValid, setValidForAll
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, nanEntries, setTitle, title
-
Methods inherited from interface hep.aida.ref.event.IsObservable
addListener, removeAllListeners, removeListener, setValid
-
Methods inherited from interface hep.aida.ref.event.Connectable
isConnected, setConnected
-
-
-
-
Constructor Detail
-
Profile2D
public Profile2D()
Create a 1-dimensional Profile.
-
Profile2D
public Profile2D(java.lang.String name, java.lang.String title, IAxis xAxis, IAxis yAxis)Create a 1-dimensional Profile.- Parameters:
name- The name of the Profile as a ManagedObject.title- The title of the Profile.xAxis- The x-axis of the Profile.yAxis- The y-axis of the Profile.
-
-
Method Detail
-
reset
public void reset()
Description copied from class:AbstractBaseHistogramReset the histogram; as if just created.- Specified by:
resetin interfaceIBaseHistogram- Overrides:
resetin classAbstractBaseHistogram
-
binMeanX
public double binMeanX(int indexX, int indexY)Description copied from interface:IProfile2DThe weighted mean along x of a given bin.- Specified by:
binMeanXin interfaceIProfile2D- Parameters:
indexX- The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.indexY- The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.- Returns:
- The mean of the corresponding bin along the x axis.
-
binMeanY
public double binMeanY(int indexX, int indexY)Description copied from interface:IProfile2DThe weighted mean along y of a given bin.- Specified by:
binMeanYin interfaceIProfile2D- Parameters:
indexX- The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.indexY- The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.- Returns:
- The mean of the corresponding bin along the x axis.
-
binEntries
public int binEntries(int indexX, int indexY)Description copied from interface:IProfile2DThe number of entries (ie the number of times fill was called for this bin).- Specified by:
binEntriesin interfaceIProfile2D- Parameters:
indexX- the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY- the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
-
binEntriesX
public int binEntriesX(int indexX)
Description copied from interface:IProfile2DEquivalent to projectionX().binEntries(indexX).- Specified by:
binEntriesXin interfaceIProfile2D
-
binEntriesY
public int binEntriesY(int indexY)
Description copied from interface:IProfile2DEquivalent to projectionY().binEntries(indexY).- Specified by:
binEntriesYin interfaceIProfile2D
-
binError
public double binError(int indexX, int indexY)Description copied from interface:IProfile2DThe error on this bin.- Specified by:
binErrorin interfaceIProfile2D- Parameters:
indexX- the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY- the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
-
binHeight
public double binHeight(int indexX, int indexY)Description copied from interface:IProfile2DTotal height of the corresponding bin (ie the sum of the weights in this bin).- Specified by:
binHeightin interfaceIProfile2D- Parameters:
indexX- the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY- the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
-
binHeightX
public double binHeightX(int indexX)
Description copied from interface:IProfile2DEquivalent to projectionX().binHeight(indexX).- Specified by:
binHeightXin interfaceIProfile2D
-
binHeightY
public double binHeightY(int indexY)
Description copied from interface:IProfile2DEquivalent to projectionY().binHeight(indexY).- Specified by:
binHeightYin interfaceIProfile2D
-
binRms
public double binRms(int indexX, int indexY)Description copied from interface:IProfile2DThe spread (RMS) of this bin.- Specified by:
binRmsin interfaceIProfile2D- Parameters:
indexX- the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY- the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
-
coordToIndexX
public int coordToIndexX(double coord)
Description copied from interface:IProfile2DConvenience method, equivalent to xAxis().coordToIndex(coord).- Specified by:
coordToIndexXin interfaceIProfile2D- See Also:
IAxis.coordToIndex(double)
-
coordToIndexY
public int coordToIndexY(double coord)
Description copied from interface:IProfile2DConvenience method, equivalent to yAxis().coordToIndex(coord).- Specified by:
coordToIndexYin interfaceIProfile2D- See Also:
IAxis.coordToIndex(double)
-
fill
public void fill(double x, double y, double z) throws java.lang.IllegalArgumentExceptionDescription copied from interface:IProfile2DFill the IProfile2D. If either a coordinate or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Specified by:
fillin interfaceIProfile2D- Throws:
java.lang.IllegalArgumentException
-
fill
public void fill(double x, double y, double z, double weight) throws java.lang.IllegalArgumentExceptionDescription copied from interface:IProfile2DFill the IProfile2D. If either a coordinate or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Specified by:
fillin interfaceIProfile2D- Throws:
java.lang.IllegalArgumentException
-
meanX
public double meanX()
Description copied from interface:IProfile2DReturns the mean of the in-range data of the profile, as calculated on filling-time projected on the X axis.- Specified by:
meanXin interfaceIProfile2D
-
meanY
public double meanY()
Description copied from interface:IProfile2DReturns the mean of the in-range data of the profile, as calculated on filling-time projected on the Y axis.- Specified by:
meanYin interfaceIProfile2D
-
rmsX
public double rmsX()
Description copied from interface:IProfile2DReturns the rms of the in-range data of the profile as calculated on filling-time projected on the X axis.- Specified by:
rmsXin interfaceIProfile2D
-
rmsY
public double rmsY()
Description copied from interface:IProfile2DReturns the rms of the in-range data of the profile as calculated on filling-time projected on the Y axis.- Specified by:
rmsYin interfaceIProfile2D
-
xAxis
public IAxis xAxis()
Description copied from interface:IProfile2DReturn the X axis.- Specified by:
xAxisin interfaceIProfile2D
-
yAxis
public IAxis yAxis()
Description copied from interface:IProfile2DReturn the Y axis.- Specified by:
yAxisin interfaceIProfile2D
-
entries
public int entries()
Description copied from class:AbstractBaseHistogramNumber of in-range entries in the histogram.- Specified by:
entriesin interfaceIBaseHistogram- Specified by:
entriesin classAbstractBaseHistogram- Returns:
- The number of in-range entries.
-
allEntries
public int allEntries()
Description copied from interface:IProfileGet the number or all the entries, both in range and underflow/overflow bins of the IProfile.- Specified by:
allEntriesin interfaceIProfile- Returns:
- The sum of all the entries.
-
extraEntries
public int extraEntries()
Description copied from interface:IProfileGet the number of entries in the underflow and overflow bins.- Specified by:
extraEntriesin interfaceIProfile- Returns:
- The numer of entries in the out-of-range bins.
-
maxBinHeight
public double maxBinHeight()
Description copied from interface:IProfileGet the maximum height of the in-range bins.- Specified by:
maxBinHeightin interfaceIProfile- Returns:
- The maximum height among the in-range bins.
-
minBinHeight
public double minBinHeight()
Description copied from interface:IProfileGet the minimum height of the in-range bins.- Specified by:
minBinHeightin interfaceIProfile- Returns:
- The minimum height among the in-range bins.
-
sumAllBinHeights
public double sumAllBinHeights()
Description copied from interface:IProfileGet the sum of all the bins heights (including underflow and overflow bin).- Specified by:
sumAllBinHeightsin interfaceIProfile- Returns:
- The sum of all the bins heights.
-
sumBinHeights
public double sumBinHeights()
Description copied from interface:IProfileGet the sum of in range bin heights in the IProfile.- Specified by:
sumBinHeightsin interfaceIProfile- Returns:
- The sum of all the in-range bins heights.
-
sumExtraBinHeights
public double sumExtraBinHeights()
Description copied from interface:IProfileGet the sum of the underflow and overflow bin height.- Specified by:
sumExtraBinHeightsin interfaceIProfile- Returns:
- The sum of the out-of-range bins heights.
-
scale
public void scale(double scaleFactor) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
add
public void add(IProfile2D profile) throws java.lang.IllegalArgumentException
Description copied from interface:IProfile2DModifies this profile by adding the contents of profile to it.- Specified by:
addin interfaceIProfile2D- Throws:
java.lang.IllegalArgumentException- if the profile binnings are incompatible
-
setRmsX
public void setRmsX(double rmsX)
-
setRmsY
public void setRmsY(double rmsY)
-
setMeanX
public void setMeanX(double meanX)
-
setMeanY
public void setMeanY(double meanY)
-
setNEntries
public void setNEntries(int entries)
-
setValidEntries
public void setValidEntries(int entries)
-
setContents
public void setContents(double[][] heights, double[][] errors, int[][] entries, double[][] rmss, double[][] meanXs, double[][] meanYs)
-
-
DMelt 3.0 © DataMelt by jWork.ORG