Constructor and Description |
---|
H2F() |
H2F(String name)
Creates an empty 2D Histogram with 1 bin x and y axes
|
H2F(String name,
int bx,
double xmin,
double xmax,
int by,
double ymin,
double ymax)
Creates a 2D Histogram with the specified parameters.
|
H2F(String name,
String title,
int bx,
double xmin,
double xmax,
int by,
double ymin,
double ymax) |
Modifier and Type | Method and Description |
---|---|
void |
add(H2F h) |
static H2F |
create(String name,
int binsX,
int binsY,
DataVector vecX,
DataVector vecY)
creates 2D histogram from given DataVectors, min and max are determined
by data vectors.
|
void |
divide(H2F h) |
static H2F |
divide(H2F h1,
H2F h2) |
void |
fill(double x,
double y)
Adds 1.0 to the bin with that value
|
void |
fill(double x,
double y,
double w) |
int |
findBin(double x,
double y)
Finds which bin has that value.
|
DatasetAttributes |
getAttributes() |
double |
getBinContent(int bx,
int by)
Finds the bin content at that bin
|
double[][] |
getContentBuffer()
Generates a 2D array with the content in the histogram
|
double |
getData(int xbin,
int ybin) |
float |
getDataBufferBin(int bin) |
int |
getDataBufferSize() |
double |
getDataEX(int bin) |
double |
getDataEY(int bin) |
int |
getDataSize(int axis) |
double |
getDataX(int bin) |
double |
getDataY(int bin) |
double[][] |
getErrorBuffer()
Creates an error buffer with each element being 0.0
|
double |
getMaximum() |
String |
getName() |
GraphErrors |
getProfileX() |
GraphErrors |
getProfileY() |
H2F |
getRegion(String name,
int bx_start,
int bx_end,
int by_start,
int by_end)
Specifies the region in the 2D histogram with those attributes
|
ArrayList<H1F> |
getSlicesX() |
ArrayList<H1F> |
getSlicesY() |
PaveText |
getStatBox() |
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() |
Axis |
getYAxis() |
H2F |
histClone(String name) |
void |
modify(DataVector vecX,
DataVector vecY,
double xmin,
double xmax,
double ymin,
double ymax) |
float[] |
offset() |
H1F |
projectionX()
Creates a projection of the 2D histogram onto the X Axis, adding up all
the y bins for each x bin
|
H1F |
projectionY()
Creates a projection of the 2D histogram onto the Y Axis, adding up all
the x bins for each y bin
|
H2F |
rebinX(int ngroups) |
H2F |
rebinY(int ngroups) |
void |
reset()
Resets the content of the histogram, sets all bin contents to 0
|
void |
set(int bx,
double xmin,
double xmax,
int by,
double ymin,
double ymax)
Sets the bins to the x and y axes and creates the buffer of the histogram
|
void |
setBinContent(int bx,
int by,
double w)
Sets the bin to that value
|
void |
setDataBufferBin(int bin,
float value) |
void |
setName(String name) |
void |
setTitle(String title)
Sets the specified parameter as the title of the histogram
|
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
|
H1F |
sliceX(int xBin)
Creates a 1-D Histogram slice of the specified y Bin
|
H1F |
sliceY(int yBin)
Creates a 1-D Histogram slice of the specified x Bin
|
public H2F()
public H2F(String name)
name
- the desired name of the 2D Histogrampublic H2F(String name, int bx, double xmin, double xmax, int by, double ymin, double ymax)
name
- the name of the histogrambx
- the number of x axis binsxmin
- the minimum x axis valuexmax
- the maximum x axis valueby
- the number of y axis binsymin
- the minimum y axis valueymax
- the maximum y axis valuepublic final void set(int bx, double xmin, double xmax, int by, double ymin, double ymax)
bx
- number of bins on the x axisxmin
- the minimum value on the x axisxmax
- the maximum value on the x axisby
- number of bins on the y axisymin
- the minimum value on the y axisymax
- the maximum value on the y axispublic String getName()
public Axis getXAxis()
public Axis getYAxis()
public double getMaximum()
public double getBinContent(int bx, int by)
bx
- The x coordinate of the binby
- The y coordinate of the binpublic void modify(DataVector vecX, DataVector vecY, double xmin, double xmax, double ymin, double ymax)
public static H2F create(String name, int binsX, int binsY, DataVector vecX, DataVector vecY)
name
- name of 2D histogrambinsX
- number of bins in XbinsY
- number of bins in YvecX
- DataVector with x-pointsvecY
- DataVector with y-pointspublic 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 String getTitle()
public String getTitleX()
public String getTitleY()
public final void setTitle(String title)
title
- The desired title of the histogrampublic int getDataBufferSize()
public float getDataBufferBin(int bin)
public void setDataBufferBin(int bin, float value)
public void setBinContent(int bx, int by, double w)
bx
- The x coordinate of the binby
- The y coordinate of the binw
- The desired value to set the bin topublic void fill(double x, double y)
x
- the x coordinate valuey
- the y coordinate valuepublic void fill(double x, double y, double w)
public void add(H2F h)
public void divide(H2F h)
public int findBin(double x, double y)
x
- The x value to search fory
- The y value to search forpublic double[][] getContentBuffer()
public double[][] getErrorBuffer()
public H2F getRegion(String name, int bx_start, int bx_end, int by_start, int by_end)
name
- The name of the histogrambx_start
- The x coordinate beginningbx_end
- The x coordinate endby_start
- The y coordinate beginningby_end
- The y coordinate endpublic GraphErrors getProfileX()
public GraphErrors getProfileY()
public H2F rebinX(int ngroups)
ngroups
- indicates how many bins of this have to be merged into one
bin of the result NOTE: If ngroup is not an exact divider of the number
of bins, the top limit of the rebinned histogram is reduced to the upper
edge of the last bin that can make a complete group.public H2F rebinY(int ngroups)
ngroups
- indicates how many bins of this have to be merged into one
bin of the result NOTE: If ngroup is not an exact divider of the number
of bins, the top limit of the rebinned histogram is reduced to the upper
edge of the last bin that can make a complete group.public H1F projectionX()
public H1F projectionY()
public H1F sliceX(int xBin)
xBin
- the bin on the y axis to create a slice ofpublic H1F sliceY(int yBin)
yBin
- the bin on the x axis to create a slice ofpublic float[] offset()
public void reset()
public int getDataSize(int axis)
getDataSize
in interface IDataSet
public DatasetAttributes getAttributes()
getAttributes
in interface IDataSet
public PaveText getStatBox()
getStatBox
in interface IDataSet
Jas4pp 1.5 © Java Analysis Studio for Particle Physics