public class TrackError extends Object
TrackError should support the following operations:
construct: tv(), te(), td() (should fill with zeros) copy: tv2(tv1), te2(te1), td2(td1) assignment: tv2 = tv2, te2 = te1, td2 = td1 indexing: tv(i), te(i,j), td(i,j) minimum element: tv.min(), te.min(), td.min() maximum element: tv.max(), te.max(), td.max() absolute minimum element: tv.amin(), te.amin(), td.amin() absolute maximum element: tv.amax(), te.amax(), td.amax() addition: tv2 += tv1, tv3 = tv1 + tv2, te2 += te1, te3 = tv1 + te2, td2 += td1, td3 = td1 + td2, subtraction: tv2 -= tv1, tv3 = tv1 - tv2, te2 -= te1, te3 = tv1 - te2, td2 -= td1, td3 = td1 - td2, inversion: int stat = invert( TrackError& te1 ) (0 for success) output stream: cout << tv << te << td equality: tv1==tv2, te1==te2, td1==td2 inequality: tv!=tv2, te1!=te2, td1!=td2 chisquare difference: chisq_diff(tv,te) = tv_T * te * tv (tv is the difference between two vectors and te is the inverse of the error matrix.) transpose: td.transpose() transform: te.xform(td)
Constructor and Description |
---|
TrackError()
Default constructor creates 5x5 matrix of zeros.
|
TrackError(double[][] mat)
Constructor from array.
|
TrackError(Matrix mat)
Constructor from Jama Matrix.
|
TrackError(TrackError te)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
amax()
Absolute maximum TrackError element.
|
double |
amin()
Absolute minimum TrackError element.
|
boolean |
equals(TrackError te)
Equality.
|
double |
get(int i,
int j)
Get an element of the error matrix.
|
Matrix |
getMatrix()
Get the track error matrix.
|
TrackError |
inverse()
Matrix inverse.
|
int |
invert()
Invert matrix in place.
|
boolean |
isEqual(TrackError te)
Equality within tolerance.
|
double[][] |
matrix()
Return the underlying vector.
|
double |
max()
Maximum TrackError element.
|
double |
min()
Minimum TrackError element.
|
TrackError |
minus(TrackError te)
Math function minus.
|
void |
normalize()
Normalize a matrix.
|
boolean |
notEquals(TrackError te)
Inequality convenience method.
|
TrackError |
plus(TrackError te)
Math function plus.
|
void |
set(int i,
int j,
double val)
Set an element of the error matrix.
|
void |
setIdentity()
Convenience method to set the error matrix to the identity matrix.
|
TrackError |
times(TrackError te)
Math function multiply.
|
String |
toString()
String representation of TrackError.
|
TrackError |
Xform(TrackDerivative deriv)
TrackDerivative * TrackError * TrackDerivative(transpose).
|
private Matrix _mat
private int _size
public TrackError()
public TrackError(double[][] mat)
mat
- 5x5 arraypublic TrackError(Matrix mat)
mat
- 5x5 Jama Matrix of doubles representing the Track error matrix.public TrackError(TrackError te)
te
- TrackError to copy.public void setIdentity()
public double[][] matrix()
public String toString()
public Matrix getMatrix()
public void set(int i, int j, double val)
i
- row index.j
- column index.val
- value for element (i,j).public double get(int i, int j)
i
- row index.j
- column index.public TrackError Xform(TrackDerivative deriv)
deriv
- TrackDerivative by which to transform the TrackError .public TrackError minus(TrackError te)
te
- TrackError to be subtracted.public TrackError plus(TrackError te)
te
- TrackError to be added.public TrackError times(TrackError te)
te
- TrackError to be multiplied by.public TrackError inverse()
public double max()
public double amax()
public double min()
public double amin()
public boolean equals(TrackError te)
te
- TrackError to check equality against.public boolean notEquals(TrackError te)
te
- TrackError to check equality against.public boolean isEqual(TrackError te)
te
- TrackError to check equality against.public int invert()
public void normalize()
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.