Package org.jlab.detector.geant4.v2.SVT
Class AlignmentFactory
java.lang.Object
org.jlab.detector.geant4.v2.SVT.AlignmentFactory
Geometry Alignment
Universal class for processing and applying alignment shifts to points and volumes.- Version:
- 1.0.11
- Author:
- pdavies
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyInverseShift(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 voidapplyShift(Vector3d aPoint, double[] aShift, Vector3d aCenter, double aScaleT, double aScaleR) Applies the given alignment shift to the given point.static voidapplyShift(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
-
NSHIFTDATARECLEN
public static int NSHIFTDATARECLEN -
VERBOSE
public static boolean VERBOSE
-
-
Constructor Details
-
AlignmentFactory
public AlignmentFactory()
-
-
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
-