Class AlignmentFactory

java.lang.Object
org.jlab.detector.geant4.v2.SVT.AlignmentFactory

public class AlignmentFactory extends Object

Geometry Alignment Link icon

Universal class for processing and applying alignment shifts to points and volumes.
Version:
1.0.11
Author:
pdavies
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static int
     
    static boolean
     
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static 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.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • NSHIFTDATARECLEN Link icon

      public static int NSHIFTDATARECLEN
    • VERBOSE Link icon

      public static boolean VERBOSE
  • Constructor Details Link icon

    • AlignmentFactory Link icon

      public AlignmentFactory()
  • Method Details Link icon

    • calcShifts Link icon

      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 set
      dataMeasured - second data set
      Returns:
      double[][] alignment shifts relative to the first data set
    • calcDeltas Link icon

      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 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
    • calcDeltas Link icon

      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 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
    • applyShift Link icon

      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 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
    • applyShift Link icon

      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 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
    • applyInverseShift Link icon

      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 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
    • applyShift Link icon

      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 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