Constructor and Description |
---|
H1F()
The default constructor, which creates a Histogram1D object with the Name "default",
the Title "default", no Axis titles, and sets the minimum xAxis value to 0, the maximum x
value to 1, and creates 1 bin.
|
H1F(String name,
double xMin,
double xMax,
float[] binHeights)
Creates a 1-D Histogram with the specified name, minimum and maximum x-axis values,
and the bin heights
|
H1F(String name,
int bins,
double xMin,
double xMax)
Creates a 1-D Histogram with the specified name, number of bins, and minimum and maximum
x-axis values
|
H1F(String name,
String title,
double xMin,
double xMax)
Creates a new histogram using the name, title, minimum, and maximum.
|
H1F(String name,
String title,
int bins,
double xMin,
double xMax)
Creates a 1-D Histogram with the specified name, title, number of bins, and minimum
and maximum x-axis values
|
H1F(String hName,
String xTitle,
String yTitle,
int bins,
double xMin,
double xMax)
Creates a Histogram1D object using the specified name, axis titles, number of bins,
and minimum and maximum x axis values.
|
Modifier and Type | Method and Description |
---|---|
void |
add(H1F h) |
static H1F |
add(H1F h1,
H1F h2)
Adds two histograms.
|
static H1F |
create(String name,
int bins,
DataVector vec) |
static H1F |
create(String name,
int bins,
DataVector vec,
DataVector weight) |
void |
divide(double number) |
void |
divide(H1F hist)
Divides the current histogram object by the parameter 1-D histogram.
|
static H1F |
divide(H1F h1,
H1F h2)
Static method for H1D to divide two histograms, the resulting
histogram is created, and arguments are untouched.
|
void |
fill(DataVector vec) |
void |
fill(DataVector vec,
DataVector weight) |
void |
fill(double value)
Increments the bin corresponding to that value by 1
|
void |
fill(double value,
double weight)
Increments the bin corresponding to that value by that weight
|
void |
fixBinWidths(double sensitivity)
Changes the bin widths to vary with a set minimum slope to
be allowed as its own bin.
|
DatasetAttributes |
getAttributes() |
Axis |
getAxis()
Retrieves the x-axis as an Axis object
|
double |
getBinContent(int bin)
Returns the content of the specified bin as a double.
|
double |
getBinError(int bin)
Returns the error of the specified bin as a double.
|
float[] |
getData() |
double |
getData(int xbin,
int ybin) |
float[] |
getDataError() |
double |
getDataEX(int bin) |
double |
getDataEY(int bin) |
int |
getDataSize(int axis) |
double |
getDataX(int bin) |
double |
getDataY(int bin) |
int |
getEntries() |
int |
getFillColor() |
Func1D |
getFunction() |
GraphErrors |
getGraph()
Retrieves a graph of the histogram
|
double |
getIntegral() |
int |
getLineColor() |
int |
getLineWidth() |
int |
getMaximumBin()
Returns bin number with maximum entries.
|
double |
getMean()
Calculates the mean of the data in the histogram
|
String |
getName() |
double |
getRMS()
Calculates the root mean square of the histogram data
|
PaveText |
getStatBox() |
String[] |
getStatText() |
String |
getTitle()
The getter for the histogram title.
|
String |
getTitleX()
The getter for the x-axis title.
|
String |
getTitleY()
The getter for the y-axis title.
|
Axis |
getxAxis()
Retrieves the x-axis as an Axis object
|
Axis |
getXaxis() |
Axis |
getyAxis()
Retrieves the y-axis as an Axis object
|
Axis |
getYaxis() |
H1F |
histClone(String name)
returns a copy of the histogram with different name.
|
void |
incrementBinContent(int bin)
Increments the content in the specified bin by one.
|
void |
incrementBinContent(int bin,
double weight)
Increments the content in the specified bin by the entered weight.
|
void |
initAttributes() |
double |
integral() |
double |
integral(int start_bin,
int end_bin) |
void |
modify(DataVector vec,
double rmin,
double rmax) |
void |
normalize(double number)
Normalizes the histogram data to the specified number
|
static H1F |
normalized(H1F h1,
H1F h2)
returns a new histogram with a content of h1 where the integral is normalized
to histogram h2.
|
void |
reset()
Resets all bins to 0
|
void |
set(int bins,
double min,
double max)
Sets the specified number of bins, min and max to the x axis
and creates a standard Y axis with a min value of 0 and a max value
of 0.
|
void |
setBinContent(int bin,
double value)
Sets the value to the specified bin.
|
void |
setBinError(int bin,
double value)
Sets the bin error to the specified bin.
|
H1F |
setFillColor(int color)
ROOT COMPATABILITY Functions
|
void |
setFunction(Func1D f) |
H1F |
setLineColor(int color) |
H1F |
setLineWidth(int width) |
void |
setName(String name)
Sets the specified parameter as the name of the histogram
|
void |
setOptStat(int i) |
void |
setOptStat(String i) |
void |
setTitle(String title) |
void |
setTitleX(String xTitle)
Sets the x-axis title to the specified parameter
|
void |
setTitleY(String yTitle)
Sets the y-axis title to the specified parameter
|
String |
toString()
Overrides the toString method of type Object
|
public H1F()
public H1F(String hName, String xTitle, String yTitle, int bins, double xMin, double xMax)
hName
- the desired name of the 1-D HistogramxTitle
- the desired x-axis titleyTitle
- the desired y-axis titlebins
- the desired number of binsxMin
- the desired minimum value on the x axisxMax
- the desired maximum value on the x axispublic H1F(String name, double xMin, double xMax, float[] binHeights)
name
- the desired name of the histogramxMin
- the desired minimum x-axis valuexMax
- the desired maximum x-axis valuebinHeights
- a double array of the heights of the binspublic H1F(String name, int bins, double xMin, double xMax)
name
- The desired name of the histogrambins
- The desired number of binsxMin
- The desired minimum x-axis valuexMax
- The desired maximum x-axis valuepublic H1F(String name, String title, int bins, double xMin, double xMax)
name
- The desired name of the histogramtitle
- The desired title of the histogrambins
- The desired number of binsxMin
- The desired minimum x-axis valuexMax
- The desired maximum x-axis valuepublic H1F(String name, String title, double xMin, double xMax)
name
- The desired name of the histogramtitle
- The desired title of the histogramxMin
- The desired minimum x-axis valuexMax
- The desired maximum x-axis valuepublic final void initAttributes()
public final void setTitle(String title)
public final void setTitleX(String xTitle)
xTitle
- The desired title of the x-axispublic final void setTitleY(String yTitle)
yTitle
- The desired title of the y-axispublic static H1F create(String name, int bins, DataVector vec, DataVector weight)
public static H1F create(String name, int bins, DataVector vec)
public String getTitle()
public String getTitleX()
public String getTitleY()
public final void setName(String name)
public int getEntries()
public double getMean()
public String[] getStatText()
public double getRMS()
public final void set(int bins, double min, double max)
bins
- the desired number of bins.min
- the desired minimum x valuemax
- the desired maximum y valuepublic double getIntegral()
public double integral()
public double integral(int start_bin, int end_bin)
public void fill(double value)
value
- the value to incrementpublic void fill(double value, double weight)
value
- the value to incrementweight
- the weight to increment bypublic void normalize(double number)
number
- the value to normalize the data topublic void incrementBinContent(int bin)
bin
- the bin to be incremented, specified in array indexing format.public void incrementBinContent(int bin, double weight)
bin
- the bin to be incremented, specified in array indexing format.weight
- the weight to increment bypublic void modify(DataVector vec, double rmin, double rmax)
public void fill(DataVector vec)
public void fill(DataVector vec, DataVector weight)
public void add(H1F h)
public void divide(double number)
public static H1F divide(H1F h1, H1F h2)
h1
- h2
- public static H1F add(H1F h1, H1F h2)
h1
- first histogramh2
- second histogrampublic static H1F normalized(H1F h1, H1F h2)
h1
- histogram to normalizeh2
- histogram for normalizationpublic void divide(H1F hist)
hist
- the 1-D histogram object to divide the current object bypublic void setBinContent(int bin, double value)
bin
- the bin to enter the value into, specified in array indexing formatvalue
- the value to store in the specified binpublic H1F histClone(String name)
name
- public void setBinError(int bin, double value)
bin
- the bin to enter the value of the error into, specified in array indexing formatvalue
- the error to store in the specified binpublic double getBinContent(int bin)
bin
- The bin to retrieve the content of, specified in array indexing formatpublic double getBinError(int bin)
bin
- The bin to retrieve the error of, specified in array indexing formatpublic Axis getXaxis()
public Axis getYaxis()
public Axis getxAxis()
public Axis getyAxis()
public Axis getAxis()
public String toString()
public GraphErrors getGraph()
public float[] getData()
public float[] getDataError()
public int getMaximumBin()
public void fixBinWidths(double sensitivity)
sensitivity
- what percentage of the maximum slope
all bins have to be at minimum to be
considered its own distinct binpublic int getDataSize(int axis)
getDataSize
in interface IDataSet
public DatasetAttributes getAttributes()
getAttributes
in interface IDataSet
public H1F setFillColor(int color)
color
- public int getFillColor()
public H1F setLineColor(int color)
public int getLineColor()
public H1F setLineWidth(int width)
public int getLineWidth()
public void setFunction(Func1D f)
public Func1D getFunction()
public PaveText getStatBox()
getStatBox
in interface IDataSet
public void setOptStat(int i)
public void setOptStat(String i)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics