Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- setup(DatabaseConstantProvider, String, String)
- calcShifts(double[][], double[][], String)
- calcDeltas(double[][], double[][], String)
- calcDistanceDeltas(double[][][], double[][][], String)
- calcTriangleSides(double[][], double, String)
- applyShift(Vector3d, double[], Vector3d)
- applyShift(Geant4Basic, double[], Vector3d)
- getShiftedFiducialData()
- getFactoryIdealFiducialData()
- getShiftedFiducials(int, int)
- getIdealFiducials(int, int)
- getIdealFiducialCenter(int, int)
- createFiducial(int)
- getDataSurveyIdeal()
- getDataSurveyMeasured()
Class SVTAlignmentFactory
java.lang.Object
org.jlab.detector.geant4.v2.SVT.SVTAlignmentFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyShift
(Vector3d aPos, double[] aShift, Vector3d aNominalCenter) Applies the given alignment shift to the given point.static void
applyShift
(Geant4Basic aVol, double[] aShift, Vector3d aNominalCenter) Applies the given alignment shift to the given volume.static double[][]
calcDeltas
(double[][] aDataIdeal, double[][] aDataMeasured, String aOutputFile) Calculates the difference between two sets of fiducial data, and writes them to the given file.static double[][][]
calcDistanceDeltas
(double[][][] aDataIdeal, double[][][] aDataMeasured, String aOutputFile) Calculates the difference between two sets of distance data, and writes them to the given file.static double[][]
calcShifts
(double[][] aDataIdeal, double[][] aDataMeasured, String aOutputFile) Calculates the alignment shifts between two sets of fiducial data, and writes them to the given file.static double[][][]
calcTriangleSides
(double[][] aData, double aUncertainty, String aOutputFile) Calculates the distances between points for each triangle in a set of fiducial data, and writes them to the given file.static Vector3d
createFiducial
(int aFid) Returns a fiducial point on a sector module in the local frame.static double[][]
static double[][]
static double[][]
Returns locations of nominal fiducial points.static Vector3d
getIdealFiducialCenter
(int aRegion, int aSector) Returns the fiducial center for a sector module before any alignment shifts been applied.static Vector3d[]
getIdealFiducials
(int aRegion, int aSector) Returns a set of fiducial points for a sector module before any alignment shifts been applied.static double[][]
Returns locations of shifted fiducial points.static Vector3d[]
getShiftedFiducials
(int aRegion, int aSector) Returns a set of fiducial points for a sector module after the alignment shifts been applied.static void
setup
(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, String aInputSurveyIdeal, String aInputSurveyMeasured) Sets up a new geometry factory to process fiducial survey data into alignment shifts.
-
Constructor Details
-
Method Details
-
setup
public static void setup(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, String aInputSurveyIdeal, String aInputSurveyMeasured) Sets up a new geometry factory to process fiducial survey data into alignment shifts. Please runSVTConstants.connect()
first.- Parameters:
cp
- a DatabaseConstantProvider that has loaded the necessary tablesaInputSurveyIdeal
- a filename for the ideal data of the fiducial surveyaInputSurveyMeasured
- a filename for the measured data of the fiducial survey
-
calcShifts
public static double[][] calcShifts(double[][] aDataIdeal, double[][] aDataMeasured, String aOutputFile) Calculates the alignment shifts between two sets of fiducial data, and writes them to the given file.- Parameters:
aDataIdeal
- fiducial dataaDataMeasured
- fiducial dataaOutputFile
- a filename- Returns:
- double[][] translations and axis-angle rotations of the form { tx, ty, tz, rx, ry, rz, ra } relative to the first data set
-
calcDeltas
public static double[][] calcDeltas(double[][] aDataIdeal, double[][] aDataMeasured, String aOutputFile) Calculates the difference between two sets of fiducial data, and writes them to the given file.- Parameters:
aDataIdeal
- first set of fiducial dataaDataMeasured
- second set of fiducial dataaOutputFile
- a filename- Returns:
- double[][] point differences relative to the first data set
-
calcDistanceDeltas
public static double[][][] calcDistanceDeltas(double[][][] aDataIdeal, double[][][] aDataMeasured, String aOutputFile) Calculates the difference between two sets of distance data, and writes them to the given file.- Parameters:
aDataIdeal
- first set of distance dataaDataMeasured
- second set of distance dataaOutputFile
- a filename- Returns:
- double[][][] distance differences relative to the first data set in {value,uncertainty} pairs
-
calcTriangleSides
public static double[][][] calcTriangleSides(double[][] aData, double aUncertainty, String aOutputFile) Calculates the distances between points for each triangle in a set of fiducial data, and writes them to the given file.- Parameters:
aData
- the set of fiducial dataaUncertainty
- uncertainty in the measurement of the coordinatesaOutputFile
- a filename- Returns:
- double[][][] distances in {value,uncertainty} pairs
-
applyShift
Applies the given alignment shift to the given point.- Parameters:
aPos
- a volume in the lab frameaShift
- a translation and axis-angle rotation of the form { tx, ty, tz, rx, ry, rz, ra }aNominalCenter
- a point about which to rotate the first point (for example the midpoint of the nominal fiducials)
-
applyShift
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 }aNominalCenter
- a point about which to rotate the first point (for example the midpoint of the nominal fiducials)
-
getShiftedFiducialData
public static double[][] getShiftedFiducialData()Returns locations of shifted fiducial points.- Returns:
- double[][] an array of data in fiducial survey format.
-
getFactoryIdealFiducialData
public static double[][] getFactoryIdealFiducialData()Returns locations of nominal fiducial points.- Returns:
- double[][] an array of data in fiducial survey format.
-
getShiftedFiducials
public static Vector3d[] getShiftedFiducials(int aRegion, int aSector) throws IllegalArgumentException Returns a set of fiducial points for a sector module after the alignment shifts been applied. These indices start from 0.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0- Returns:
- Point3D[] an array of fiducial points in the order Cu+, Cu-, Pk
- Throws:
IllegalArgumentException
- indices out of bounds
-
getIdealFiducials
public static Vector3d[] getIdealFiducials(int aRegion, int aSector) throws IllegalArgumentException Returns a set of fiducial points for a sector module before any alignment shifts been applied.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0- Returns:
- Point3D[] an array of fiducial points in the order Cu+, Cu-, Pk
- Throws:
IllegalArgumentException
- indices out of bounds
-
getIdealFiducialCenter
public static Vector3d getIdealFiducialCenter(int aRegion, int aSector) throws IllegalArgumentException Returns the fiducial center for a sector module before any alignment shifts been applied.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0- Returns:
- Point3D the mean average point of the 3 fiducial points (Cu+, Cu-, Pk)
- Throws:
IllegalArgumentException
- indices out of bounds
-
createFiducial
Returns a fiducial point on a sector module in the local frame.- Parameters:
aFid
- an index for the desired point: 0, 1, 2- Returns:
- Point3D one of 3 fiducial points: Cu+, Cu-, Pk
- Throws:
IllegalArgumentException
- indices out of bounds
-
getDataSurveyIdeal
public static double[][] getDataSurveyIdeal() -
getDataSurveyMeasured
public static double[][] getDataSurveyMeasured()
-