public class StatShape extends Object
Constructor and Description |
---|
StatShape(double[] x,
double[] y,
double[] w,
int n)
Perform a linear regression analysis with weights and prepare for a shape
identification.
|
Modifier and Type | Method and Description |
---|---|
void |
doc()
Show online documentation.
|
double[] |
getCenters(int k)
Get the centers in non-quadrant method.
|
double |
getChi2()
Get Chi2 of this fit
|
double[] |
getCovariance()
Get covariance matrix.
|
P1D |
getData()
Get data back used for fitting (can be inverted in Y and Y for best
results).
|
F1D |
getFitFunction()
Get a fit function after the linear regression (major axis).
|
F1D |
getFitFunctionPerp()
Get a fit function perpendicular to the linear regression line (minor
axis).
|
F1D[] |
getFitFunctionQuadrants()
Get linear functions after rotation of major and minor axes by 45 deg to
define the quadrants.
|
double[] |
getFitParameters()
Get fit parameters, the intercept (0) and the slope (1)
|
double[] |
getFitParametersPerp()
Get fit parameters of a function perpendicular (minor) axis to the linear
regression line the intercept (0) and the slope (1)
|
double[] |
getFitParametersRotate()
Parameters after rotation of major and minor axes by 45deg.
|
double[] |
getMeans()
Get weighted means in X and Y
|
double[] |
getSummary()
Return all shape parameters
|
void |
process(int choice)
Process event.
|
public StatShape(double[] x, double[] y, double[] w, int n)
x
- array in xy
- array in yw
- weight of the data pointn
- total number of pointspublic P1D getData()
public double getChi2()
public double[] getCovariance()
public void process(int choice)
option
- option =0 use weighted linear regression and weighted means in quadrants
=1 use unweighted linear regression and weighted means in quadrants
=2 use unweighted calculations for everythingpublic double[] getFitParameters()
public F1D getFitFunction()
public F1D getFitFunctionPerp()
public double[] getFitParametersPerp()
public double[] getFitParametersRotate()
public F1D[] getFitFunctionQuadrants()
public double[] getMeans()
public double[] getCenters(int k)
k
- current center centers (1,2,3,4)public double[] getSummary()
public void doc()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics