Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- calcShifts(int, double[][], double[][])
- calcDeltas(int, int, double[][], double[][])
- calcDeltas(int, int, int, double[][][], double[][][])
- applyShift(double[][], double[][], double[][], double, double)
- applyShift(Vector3d, double[], Vector3d, double, double)
- applyInverseShift(Vector3d, double[], Vector3d, double, double)
- applyShift(Geant4Basic, double[], Vector3d, double, double)
Class AlignmentFactory
java.lang.Object
org.jlab.detector.geant4.v2.SVT.AlignmentFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyInverseShift
(Vector3d aPoint, double[] aShift, Vector3d aCenter, double aScaleT, double aScaleR) Applies the inverse of the given alignment shift to the given point.static double[][]
applyShift
(double[][] aData, double[][] aShift, double[][] aCenterData, double aScaleT, double aScaleR) Applies alignment shifts in bulk.static void
applyShift
(Vector3d aPoint, double[] aShift, Vector3d aCenter, double aScaleT, double aScaleR) Applies the given alignment shift to the given point.static void
applyShift
(Geant4Basic aVol, double[] aShift, Vector3d aNominalCenter, double aScaleT, double aScaleR) Applies the given alignment shift to the given volume.static double[][]
calcDeltas
(int dataLen, int dataWid, double[][] dataIdeal, double[][] dataMeasured) Calculates the difference in coordinates between two sets of fiducial data.static double[][][]
calcDeltas
(int dataLen, int dataWid, int dataThk, double[][][] dataIdeal, double[][][] dataMeasured) Calculates the difference in coordinates between two sets of fiducial data.static double[][]
calcShifts
(int dataLen, double[][] dataIdeal, double[][] dataMeasured) Calculates alignment shifts between two sets of fiducial data.
-
Field Details
-
Constructor Details
-
Method Details
-
calcShifts
public static double[][] calcShifts(int dataLen, double[][] dataIdeal, double[][] dataMeasured) Calculates alignment shifts between two sets of fiducial data.- Parameters:
dataLen
- total number of data points (where each point is 3 Cartesian coordinates)dataIdeal
- first data setdataMeasured
- second data set- Returns:
- double[][] alignment shifts relative to the first data set
-
calcDeltas
public static double[][] calcDeltas(int dataLen, int dataWid, double[][] dataIdeal, double[][] dataMeasured) Calculates the difference in coordinates between two sets of fiducial data.- Parameters:
dataLen
- number of data pointsdataWid
- number of elements in each data pointdataIdeal
- first data setdataMeasured
- second data set- Returns:
- dataDeltas point difference relative to the first data set
-
calcDeltas
public static double[][][] calcDeltas(int dataLen, int dataWid, int dataThk, double[][][] dataIdeal, double[][][] dataMeasured) Calculates the difference in coordinates between two sets of fiducial data.- Parameters:
dataLen
- number of data pointsdataWid
- number of elements in each data pointdataThk
- number of components in each elementdataIdeal
- first data setdataMeasured
- second data set- Returns:
- dataDeltas point difference relative to the first data set, with uncertainty
-
applyShift
public static double[][] applyShift(double[][] aData, double[][] aShift, double[][] aCenterData, double aScaleT, double aScaleR) Applies alignment shifts in bulk.- Parameters:
aData
- points in the lab frameaShift
- translations and axis-angle rotations of the form { tx, ty, tz, rx, ry, rz, ra }aCenterData
- a point about which to rotate the first point (for example the midpoint of the ideal fiducials)aScaleT
- a scale factor for the translation shiftsaScaleR
- a scale factor for the rotation shifts- Returns:
- double[][] shifted points
-
applyShift
public static void applyShift(Vector3d aPoint, double[] aShift, Vector3d aCenter, double aScaleT, double aScaleR) throws IllegalArgumentException Applies the given alignment shift to the given point.- Parameters:
aPoint
- a point in the lab frameaShift
- a translation and axis-angle rotation of the form { tx, ty, tz, rx, ry, rz, ra }aCenter
- a point about which to rotate the first point (for example the midpoint of the ideal fiducials)aScaleT
- a scale factor for the translation shiftaScaleR
- a scale factor for the rotation shift- Throws:
IllegalArgumentException
- incorrect number of elements in shift array
-
applyInverseShift
public static void applyInverseShift(Vector3d aPoint, double[] aShift, Vector3d aCenter, double aScaleT, double aScaleR) throws IllegalArgumentException Applies the inverse of the given alignment shift to the given point. gilfoyle 12/21/17- Parameters:
aPoint
- a point in the lab frameaShift
- a translation and axis-angle rotation of the form { tx, ty, tz, rx, ry, rz, ra }aCenter
- a point about which to rotate the first point (for example the midpoint of the ideal fiducials)aScaleT
- a scale factor for the translation shiftaScaleR
- a scale factor for the rotation shift- Throws:
IllegalArgumentException
- incorrect number of elements in shift array
-
applyShift
public static void applyShift(Geant4Basic aVol, double[] aShift, Vector3d aNominalCenter, double aScaleT, double aScaleR) throws IllegalArgumentException Applies the given alignment shift to the given volume.- Parameters:
aVol
- a volume in the lab frameaShift
- a translation and axis-angle rotation of the form { tx, ty, tz, rx, ry, rz, ra } (ra in radians)aNominalCenter
- a point about which to rotate the first point (for example the midpoint of the nominal fiducials)aScaleT
- a scale factor for the translation shiftaScaleR
- a scale factor for the rotation shift- Throws:
IllegalArgumentException
- incorrect number of elements in shift array
-