public class TrackVector extends Object
TrackVector tv 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)
Modifier and Type | Field and Description |
---|---|
private int |
_length |
private Matrix |
_vec |
Constructor and Description |
---|
TrackVector()
Default constructor.
|
TrackVector(double[] vec)
Constructor from array.
|
TrackVector(Matrix mat)
Constructor from Jama Matrix.
|
TrackVector(TrackVector tv)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
amax()
Absolute Maximum TrackVector element.
|
double |
amin()
Absolute Minimum TrackVector element.
|
static double |
chisqDiff(TrackVector tv,
TrackError te)
Chi-squared difference between TrackVectors.
|
boolean |
equals(TrackVector tv)
Equality operator.
|
double |
get(int i)
Get a track vector element.
|
Matrix |
getMatrix()
Return the underlying track vector as a Jama Matrix.
|
boolean |
isEqual(TrackVector tv)
Equality within tolerance.
|
Matrix |
matrix()
Return the underlying track vector as a Jama Matrix.
|
double |
max()
Maximum TrackVector element.
|
double |
min()
Mimimum TrackVector element.
|
TrackVector |
minus(TrackVector tv)
Math funtion minus.
|
boolean |
notEquals(TrackVector tv)
Inequality operator.
|
TrackVector |
plus(TrackVector tv)
Math funtion plus.
|
void |
set(int i,
double val)
Set a track vector element.
|
String |
toString()
String representation of this TrackVector.
|
double[] |
vector()
Return the underlying vector.
|
private Matrix _vec
private int _length
public TrackVector()
public TrackVector(double[] vec)
vec
- 5 dimensional vector of doubles.public TrackVector(Matrix mat)
mat
- 5 dimensional Jama Column Matrix of doubles.public TrackVector(TrackVector tv)
tv
- TrackVector to copy.public double[] vector()
public TrackVector minus(TrackVector tv)
tv
- TrackVector to be subtracted.public TrackVector plus(TrackVector tv)
tv
- TrackVector to be subtracted.public String toString()
public Matrix getMatrix()
public Matrix matrix()
public void set(int i, double val)
i
- The track element to set.val
- The value to be assigned to track element i.public double get(int i)
i
- The track element to get.public boolean equals(TrackVector tv)
tv
- TrackVector to check against.public boolean notEquals(TrackVector tv)
tv
- TrackVector to check against.public boolean isEqual(TrackVector tv)
tv
- TrackVector to check against.public double amax()
public double max()
public double amin()
public double min()
public static double chisqDiff(TrackVector tv, TrackError te)
tv
- TrackVector to compare to.te
- TrackError of uncertainties.Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.