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 SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
NSHIFTDATARECLENpublic static int NSHIFTDATARECLEN
- 
VERBOSEpublic static boolean VERBOSE
 
- 
- 
Constructor Details- 
AlignmentFactorypublic AlignmentFactory()
 
- 
- 
Method Details- 
calcShiftspublic 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 set
- dataMeasured- second data set
- Returns:
- double[][] alignment shifts relative to the first data set
 
- 
calcDeltaspublic 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 points
- dataWid- number of elements in each data point
- dataIdeal- first data set
- dataMeasured- second data set
- Returns:
- dataDeltas point difference relative to the first data set
 
- 
calcDeltaspublic 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 points
- dataWid- number of elements in each data point
- dataThk- number of components in each element
- dataIdeal- first data set
- dataMeasured- second data set
- Returns:
- dataDeltas point difference relative to the first data set, with uncertainty
 
- 
applyShiftpublic static double[][] applyShift(double[][] aData, double[][] aShift, double[][] aCenterData, double aScaleT, double aScaleR) Applies alignment shifts in bulk.- Parameters:
- aData- points in the lab frame
- aShift- 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 shifts
- aScaleR- a scale factor for the rotation shifts
- Returns:
- double[][] shifted points
 
- 
applyShiftpublic 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 frame
- aShift- 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 shift
- aScaleR- a scale factor for the rotation shift
- Throws:
- IllegalArgumentException- incorrect number of elements in shift array
 
- 
applyInverseShiftpublic 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 frame
- aShift- 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 shift
- aScaleR- a scale factor for the rotation shift
- Throws:
- IllegalArgumentException- incorrect number of elements in shift array
 
- 
applyShiftpublic 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 frame
- aShift- 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 shift
- aScaleR- a scale factor for the rotation shift
- Throws:
- IllegalArgumentException- incorrect number of elements in shift array
 
 
-