Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getStrip(int, int, int)
- getStrip(int, int, int, int)
- getIdealStrip(int, int, int)
- getIdealStrip(int, int, int, int)
- createIdealStrip(int, int)
- getShiftedStrip(int, int, int)
- getShiftedStrip(int, int, int, int)
- createShiftedStrip(int, int, int, int)
- getModuleNormal(int, int)
- getModuleEndPoints(int, int)
- getLayerCorners(int, int)
- getLayerCorners(int, int, int)
- getIdealLayerCorners(int, int)
- getIdealLayerCorners(int, int, int)
- createIdealLayerCorners(int)
- getShiftedLayerCorners(int, int)
- getShiftedLayerCorners(int, int, int)
- createShiftedLayerCorners(int, int, int)
- transformToLocal(int, int, double, double, double)
- transformToLocal(int, int, Vector3d)
- transformToLocal(int, int, int, Vector3d)
- transformToLab(int, int, double, double, double)
- transformToLab(int, int, Vector3d)
- transformToLab(int, int, int, Vector3d)
- setApplyAlignmentShifts(boolean)
- isSetApplyAlignmentShifts()
- setAlignmentShiftScale(double, double)
Class SVTStripFactory
java.lang.Object
org.jlab.detector.geant4.v2.SVT.SVTStripFactory
Geometry for the SVT 
length unit: mm (3D Primitives), cm (Geant4Basic volume positions) angle unit: deg
Conventions:
- svt = four concentric regions / superlayers
- region / superlayer = ring of a variable number of sectors
- sector = pair of sensor modules and backing structure, connected and stabilised by copper and peek supports
- module = triplet of sensors
- sensor = silicon with etched strips in active region
- layer = plane of sensitive strips, spanning active regions of module
- strip = sensitive line
- Version:
- 1.1.1
- Author:
- pdavies
-
Constructor Summary
ConstructorsConstructorDescriptionSVTStripFactory
(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, boolean applyAlignmentShifts) Constructs a new geometry factory for sensor strips. -
Method Summary
Modifier and TypeMethodDescriptionVector3d[]
createIdealLayerCorners
(int aModule) Returns the corners of a sensor layer in the local frame.createIdealStrip
(int aStrip, int aModule) Returns a sensor strip before any alignment shifts been applied.Vector3d[]
createShiftedLayerCorners
(int aRegion, int aSector, int aModule) Returns the corners of a sensor layer in the local frame after the alignment shifts have been applied.createShiftedStrip
(int aRegion, int aSector, int aModule, int aStrip) Returns a sensor strip after the alignment shifts have been applied.Vector3d[]
getIdealLayerCorners
(int aLayer, int aSector) Returns the corners of a sensor layer in the detector frame.Vector3d[]
getIdealLayerCorners
(int aRegion, int aSector, int aModule) Returns the corners of a sensor layer in the detector frame.getIdealStrip
(int aLayer, int aSector, int aStrip) Returns a sensor strip before any alignment shifts been applied.getIdealStrip
(int aRegion, int aSector, int aModule, int aStrip) Returns a sensor strip before any alignment shifts been applied.Vector3d[]
getLayerCorners
(int aLayer, int aSector) Returns the corners of a sensor layer in the lab frame, depending on this factory's setup.Vector3d[]
getLayerCorners
(int aRegion, int aSector, int aModule) Returns the corners of a sensor layer in the lab frame, depending on this factory's setup.getModuleEndPoints
(int aLayer, int aSector) Returns the end points of the module in the lab frame, depending on this factory's setup.getModuleNormal
(int aLayer, int aSector) Returns the normal the module in the lab frame, depending on this factory's setup.Vector3d[]
getShiftedLayerCorners
(int aLayer, int aSector) Returns the corners of a sensor layer in the lab frame after the alignment shifts have been applied.Vector3d[]
getShiftedLayerCorners
(int aRegion, int aSector, int aModule) Returns the corners of a sensor layer in the lab frame after the alignment shifts have been applied.getShiftedStrip
(int aLayer, int aSector, int aStrip) Returns a sensor strip after the alignment shifts have been applied.getShiftedStrip
(int aRegion, int aSector, int aModule, int aStrip) Returns a sensor strip after the alignment shifts have been applied.getStrip
(int aLayer, int aSector, int aStrip) Returns either an ideal or shifted strip, depending on this factory's setup.getStrip
(int aRegion, int aSector, int aModule, int aStrip) Returns either an ideal or shifted strip, depending on this factory's setup.boolean
Returns whether alignment shifts are applied.void
setAlignmentShiftScale
(double aScaleTranslation, double aScaleRotation) Sets scale factors to amplify alignment shifts for visualisation purposes.void
setApplyAlignmentShifts
(boolean b) Manually sets whether alignment shifts should be applied.transformToLab
(int aLayer, int aSector, double x, double y, double z) Transform the (x,y,z) point from the local to the lab frametransformToLab
(int aRegion, int aSector, int aModule, Vector3d pLoc) Transform the pLab point from the strip to the lab frametransformToLab
(int aLayer, int aSector, Vector3d pLoc) Transform the pLoc point from the strip to the lab frametransformToLocal
(int aLayer, int aSector, double x, double y, double z) Transform the (x,y,z) point from the lab to the local frametransformToLocal
(int aRegion, int aSector, int aModule, Vector3d pLab) Transform the pLab point from the lab to the local frametransformToLocal
(int aLayer, int aSector, Vector3d pLab) Transform the pLab point from the lab to the local frame
-
Constructor Details
-
SVTStripFactory
public SVTStripFactory(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, boolean applyAlignmentShifts) Constructs a new geometry factory for sensor strips. Please runSVTConstants.connect()
first.- Parameters:
cp
- a DatabaseConstantProvider that has loaded the necessary tablesapplyAlignmentShifts
- a switch to set whether the alignment shifts will be applied- See Also:
-
-
Method Details
-
getStrip
Returns either an ideal or shifted strip, depending on this factory's setup.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0aStrip
- an index starting from 0- Returns:
- Line3D a strip in the lab frame
- See Also:
-
getStrip
Returns either an ideal or shifted strip, depending on this factory's setup.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0aStrip
- an index starting from 0- Returns:
- Line3D a strip in the lab frame
- See Also:
-
getIdealStrip
Returns a sensor strip before any alignment shifts been applied.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0aStrip
- an index starting from 0- Returns:
- Line3D a strip in the lab frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
getIdealStrip
public Line3d getIdealStrip(int aRegion, int aSector, int aModule, int aStrip) throws IllegalArgumentException Returns a sensor strip before any alignment shifts been applied.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0aStrip
- an index starting from 0- Returns:
- Line3D a strip in the lab frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
createIdealStrip
Returns a sensor strip before any alignment shifts been applied.- Parameters:
aStrip
- an index starting from 0aModule
- an index starting from 0- Returns:
- Line3D a strip in the local frame, relative to the upstream edge along z, and the centre along x.
- Throws:
IllegalArgumentException
- index out of bounds
-
getShiftedStrip
Returns a sensor strip after the alignment shifts have been applied.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0aStrip
- an index starting from 0- Returns:
- Line3D a strip in the lab frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
getShiftedStrip
Returns a sensor strip after the alignment shifts have been applied.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0aStrip
- an index starting from 0- Returns:
- Line3D a strip in the lab frame
-
createShiftedStrip
Returns a sensor strip after the alignment shifts have been applied.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0aStrip
- an index starting from 0- Returns:
- Line3D a strip in the local frame
-
getModuleNormal
Returns the normal the module in the lab frame, depending on this factory's setup.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0- Returns:
- Vector3d unit vector, normal to the plane, pointing radially outwards
- See Also:
-
getModuleEndPoints
Returns the end points of the module in the lab frame, depending on this factory's setup.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0- Returns:
- Line3d going from origin to e end of modules
- See Also:
-
getLayerCorners
Returns the corners of a sensor layer in the lab frame, depending on this factory's setup.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
- See Also:
-
getLayerCorners
Returns the corners of a sensor layer in the lab frame, depending on this factory's setup.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
- See Also:
-
getIdealLayerCorners
Returns the corners of a sensor layer in the detector frame.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
- Throws:
IllegalArgumentException
- indices out of bounds
-
getIdealLayerCorners
Returns the corners of a sensor layer in the detector frame.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
-
createIdealLayerCorners
Returns the corners of a sensor layer in the local frame.- Parameters:
aModule
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
- Throws:
IllegalArgumentException
- index out of bounds
-
getShiftedLayerCorners
Returns the corners of a sensor layer in the lab frame after the alignment shifts have been applied.- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
- Throws:
IllegalArgumentException
- indices out of bounds
-
getShiftedLayerCorners
Returns the corners of a sensor layer in the lab frame after the alignment shifts have been applied.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
-
createShiftedLayerCorners
Returns the corners of a sensor layer in the local frame after the alignment shifts have been applied.- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0- Returns:
- Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
-
transformToLocal
Transform the (x,y,z) point from the lab to the local frame- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0x
-y
-z
-- Returns:
- Vector3d of point coordinate in the module local frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
transformToLocal
Transform the pLab point from the lab to the local frame- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0pLab
- a point in the lab frame- Returns:
- Vector3d of point coordinate in the module local frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
transformToLocal
Transform the pLab point from the lab to the local frame- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0pLab
- a point in the lab frame- Returns:
- Vector3d of point coordinate in the module local frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
transformToLab
Transform the (x,y,z) point from the local to the lab frame- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0x
-y
-z
-- Returns:
- Vector3d of point coordinate in the module local frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
transformToLab
Transform the pLoc point from the strip to the lab frame- Parameters:
aLayer
- an index starting from 0aSector
- an index starting from 0pLoc
- a point in the lab frame- Returns:
- Vector3d of point coordinate in the module local frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
transformToLab
Transform the pLab point from the strip to the lab frame- Parameters:
aRegion
- an index starting from 0aSector
- an index starting from 0aModule
- an index starting from 0pLoc
- a point in the local frame- Returns:
- Vector3d of point coordinate in the module local frame
- Throws:
IllegalArgumentException
- indices out of bounds
-
setApplyAlignmentShifts
public void setApplyAlignmentShifts(boolean b) Manually sets whether alignment shifts should be applied. Use this to override the setting made at time of construction.- Parameters:
b
- true/false
-
isSetApplyAlignmentShifts
public boolean isSetApplyAlignmentShifts()Returns whether alignment shifts are applied.- Returns:
- boolean true/false
-
setAlignmentShiftScale
public void setAlignmentShiftScale(double aScaleTranslation, double aScaleRotation) Sets scale factors to amplify alignment shifts for visualisation purposes.- Parameters:
aScaleTranslation
- a scale factor for translation shiftsaScaleRotation
- a scale factor for rotation shifts
-