Package org.jlab.detector.geant4.v2.SVT
Class SVTAlignmentFactory
java.lang.Object
org.jlab.detector.geant4.v2.SVT.SVTAlignmentFactory
Geometry for the SVT
Processes fiducial survey data into alignment shifts, and applies those shifts to a given point or volume.- Version:
- 1.1.0
- Author:
- pdavies
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidapplyShift(Vector3d aPos, double[] aShift, Vector3d aNominalCenter) Applies the given alignment shift to the given point.static voidapplyShift(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 Vector3dcreateFiducial(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 Vector3dgetIdealFiducialCenter(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 voidsetup(DatabaseConstantProvider cp, String aInputSurveyIdeal, String aInputSurveyMeasured) Sets up a new geometry factory to process fiducial survey data into alignment shifts.
- 
Constructor Details- 
SVTAlignmentFactorypublic SVTAlignmentFactory()
 
- 
- 
Method Details- 
setuppublic static void setup(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 tables
- aInputSurveyIdeal- a filename for the ideal data of the fiducial survey
- aInputSurveyMeasured- a filename for the measured data of the fiducial survey
 
- 
calcShiftspublic 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 data
- aDataMeasured- fiducial data
- aOutputFile- 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
 
- 
calcDeltaspublic 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 data
- aDataMeasured- second set of fiducial data
- aOutputFile- a filename
- Returns:
- double[][] point differences relative to the first data set
 
- 
calcDistanceDeltaspublic 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 data
- aDataMeasured- second set of distance data
- aOutputFile- a filename
- Returns:
- double[][][] distance differences relative to the first data set in {value,uncertainty} pairs
 
- 
calcTriangleSidespublic 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 data
- aUncertainty- uncertainty in the measurement of the coordinates
- aOutputFile- a filename
- Returns:
- double[][][] distances in {value,uncertainty} pairs
 
- 
applyShiftApplies the given alignment shift to the given point.- Parameters:
- aPos- a volume in the lab frame
- aShift- 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)
 
- 
applyShiftApplies 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 }
- aNominalCenter- a point about which to rotate the first point (for example the midpoint of the nominal fiducials)
 
- 
getShiftedFiducialDatapublic static double[][] getShiftedFiducialData()Returns locations of shifted fiducial points.- Returns:
- double[][] an array of data in fiducial survey format.
 
- 
getFactoryIdealFiducialDatapublic static double[][] getFactoryIdealFiducialData()Returns locations of nominal fiducial points.- Returns:
- double[][] an array of data in fiducial survey format.
 
- 
getShiftedFiducialspublic 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 0
- aSector- an index starting from 0
- Returns:
- Point3D[] an array of fiducial points in the order Cu+, Cu-, Pk
- Throws:
- IllegalArgumentException- indices out of bounds
 
- 
getIdealFiducialspublic 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 0
- aSector- an index starting from 0
- Returns:
- Point3D[] an array of fiducial points in the order Cu+, Cu-, Pk
- Throws:
- IllegalArgumentException- indices out of bounds
 
- 
getIdealFiducialCenterpublic 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 0
- aSector- 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
 
- 
createFiducialReturns 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
 
- 
getDataSurveyIdealpublic static double[][] getDataSurveyIdeal()
- 
getDataSurveyMeasuredpublic static double[][] getDataSurveyMeasured()
 
-