hep.aida.ref.histogram
Class Profile1D
- 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.Profile1D
-
- All Implemented Interfaces:
- IDevManagedObject, IBaseHistogram, IManagedObject, IProfile, IProfile1D, Connectable, IsObservable, java.io.Serializable
public class Profile1D extends Profile implements IProfile1D, java.io.Serializable, IsObservable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Profile1D()Create a 1-dimensional Profile.Profile1D(java.lang.String name, java.lang.String title, IAxis axis)Create a 1-dimensional Profile.Profile1D(java.lang.String name, java.lang.String title, IAxis axis, java.lang.String options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(IProfile1D profile)Modifies this IProfile1D 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.IAxisaxis()Returns the X axis.intbinEntries(int index)Number of entries in the corresponding bin (ie the number of times fill was called for this bin).doublebinError(int index)The error on this bin.doublebinHeight(int index)Total height of the corresponding bin (ie the sum of the weights in this bin).doublebinMean(int index)The weighted mean of the corresponding bin.doublebinRms(int index)The spread (RMS) of a bin.intcoordToIndex(double coord)Convenience method, equivalent to axis().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)Fill the IProfile1D.voidfill(double x, double y, double weight)Fill the IProfile1D.voidinitProfile1D(IAxis axis)voidinitProfile1D(IAxis axis, java.lang.String options)doublemaxBinHeight()Get the maximum height of the in-range bins.doublemean()Returns the mean of the in-range data of the profile as calculated on filling-time.doubleminBinHeight()Get the minimum height of the in-range bins.voidreset()Reset the histogram; as if just created.doublerms()Returns the rms of the in-range data of the profile as calculated on filling-time.voidscale(double scaleFactor)voidsetContents(double[] heights, double[] errors, int[] entries, double[] rmss, double[] meanXs)Set the content of the whole Histogram at once.voidsetMean(double mean)voidsetNEntries(int entries)voidsetRms(double rms)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.-
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
-
Profile1D
public Profile1D()
Create a 1-dimensional Profile.
-
Profile1D
public Profile1D(java.lang.String name, java.lang.String title, IAxis axis)Create a 1-dimensional Profile.- Parameters:
name- The name of the Profile as a ManagedObject.title- The title of the Profile.axis- The x-axis of the Profile.
-
Profile1D
public Profile1D(java.lang.String name, java.lang.String title, IAxis axis, java.lang.String options)
-
-
Method Detail
-
reset
public void reset()
Description copied from class:AbstractBaseHistogramReset the histogram; as if just created.- Specified by:
resetin interfaceIBaseHistogram- Overrides:
resetin classAbstractBaseHistogram
-
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.
-
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.
-
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.
-
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.
-
fill
public void fill(double x, double y, double weight)Description copied from interface:IProfile1DFill the IProfile1D. 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 interfaceIProfile1D
-
fill
public void fill(double x, double y)Description copied from interface:IProfile1DFill the IProfile1D. 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 interfaceIProfile1D
-
binEntries
public int binEntries(int index)
Description copied from interface:IProfile1DNumber of entries in the corresponding bin (ie the number of times fill was called for this bin).- Specified by:
binEntriesin interfaceIProfile1D- Parameters:
index- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
-
binHeight
public double binHeight(int index)
Description copied from interface:IProfile1DTotal height of the corresponding bin (ie the sum of the weights in this bin).- Specified by:
binHeightin interfaceIProfile1D- Parameters:
index- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
-
binError
public double binError(int index)
Description copied from interface:IProfile1DThe error on this bin.- Specified by:
binErrorin interfaceIProfile1D- Parameters:
index- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
-
binMean
public double binMean(int index)
Description copied from interface:IProfile1DThe weighted mean of the corresponding bin.- Specified by:
binMeanin interfaceIProfile1D- Parameters:
index- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.- Returns:
- The mean of the corresponding bin along the x axis.
-
binRms
public double binRms(int index)
Description copied from interface:IProfile1DThe spread (RMS) of a bin.- Specified by:
binRmsin interfaceIProfile1D- Parameters:
index- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
-
mean
public double mean()
Description copied from interface:IProfile1DReturns the mean of the in-range data of the profile as calculated on filling-time.- Specified by:
meanin interfaceIProfile1D
-
rms
public double rms()
Description copied from interface:IProfile1DReturns the rms of the in-range data of the profile as calculated on filling-time.- Specified by:
rmsin interfaceIProfile1D
-
axis
public IAxis axis()
Description copied from interface:IProfile1DReturns the X axis.- Specified by:
axisin interfaceIProfile1D
-
coordToIndex
public int coordToIndex(double coord)
Description copied from interface:IProfile1DConvenience method, equivalent to axis().coordToIndex(coord).- Specified by:
coordToIndexin interfaceIProfile1D- See Also:
IAxis.coordToIndex(double)
-
scale
public void scale(double scaleFactor) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
add
public void add(IProfile1D profile) throws java.lang.IllegalArgumentException
Description copied from interface:IProfile1DModifies this IProfile1D by adding the contents of profile to it.- Specified by:
addin interfaceIProfile1D- Parameters:
profile- The IProfile1D to be added to this IProfile1D- Throws:
java.lang.IllegalArgumentException- if profile binnings are incompatible
-
initProfile1D
public void initProfile1D(IAxis axis)
-
initProfile1D
public void initProfile1D(IAxis axis, java.lang.String options)
-
setRms
public void setRms(double rms)
-
setMean
public void setMean(double mean)
-
setContents
public void setContents(double[] heights, double[] errors, int[] entries, double[] rmss, double[] meanXs)Set the content of the whole Histogram at once. This is a convenience method for saving/restoring Histograms. Of the arguments below the heights, the errors and the entries array cannot be null. If the means array is null, the mean is defaulted to the geometric center of the bin. If the rms array is null, the rms is taken to be the bin width over the root of 12.- Parameters:
heights- The bins heightserrors- The bins errorsentries- The bin entries.rmss- The rmss of the binsmeanXs- The mean of the bin.
-
setNEntries
public void setNEntries(int entries)
-
setValidEntries
public void setValidEntries(int entries)
-
-
DMelt 3.0 © DataMelt by jWork.ORG