Class SVTStripFactory

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

public class SVTStripFactory extends Object

Geometry for the SVT Link icon

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

    Constructors
    Constructor
    Description
    SVTStripFactory(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, boolean applyAlignmentShifts)
    Constructs a new geometry factory for sensor strips.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    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.
    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.
    getIdealLayerCorners(int aLayer, int aSector)
    Returns the corners of a sensor layer in the detector frame.
    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.
    getLayerCorners(int aLayer, int aSector)
    Returns the corners of a sensor layer in the lab frame, depending on this factory's setup.
    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.
    getShiftedLayerCorners(int aLayer, int aSector)
    Returns the corners of a sensor layer in the lab frame after the alignment shifts have been applied.
    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
    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 frame
    transformToLab(int aRegion, int aSector, int aModule, Vector3d pLoc)
    Transform the pLab point from the strip to the lab frame
    transformToLab(int aLayer, int aSector, Vector3d pLoc)
    Transform the pLoc point from the strip to the lab frame
    transformToLocal(int aLayer, int aSector, double x, double y, double z)
    Transform the (x,y,z) point from the lab to the local frame
    transformToLocal(int aRegion, int aSector, int aModule, Vector3d pLab)
    Transform the pLab point from the lab to the local frame
    transformToLocal(int aLayer, int aSector, Vector3d pLab)
    Transform the pLab point from the lab to the local frame

    Methods inherited from class java.lang.Object Link icon

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

  • Method Details Link icon

    • getStrip Link icon

      public Line3d getStrip(int aLayer, int aSector, int aStrip)
      Returns either an ideal or shifted strip, depending on this factory's setup.
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      aStrip - an index starting from 0
      Returns:
      Line3D a strip in the lab frame
      See Also:
    • getStrip Link icon

      public Line3d getStrip(int aRegion, int aSector, int aModule, int aStrip)
      Returns either an ideal or shifted strip, depending on this factory's setup.
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      aStrip - an index starting from 0
      Returns:
      Line3D a strip in the lab frame
      See Also:
    • getIdealStrip Link icon

      public Line3d getIdealStrip(int aLayer, int aSector, int aStrip) throws IllegalArgumentException
      Returns a sensor strip before any alignment shifts been applied.
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      aStrip - an index starting from 0
      Returns:
      Line3D a strip in the lab frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • getIdealStrip Link icon

      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 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      aStrip - an index starting from 0
      Returns:
      Line3D a strip in the lab frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • createIdealStrip Link icon

      public Line3d createIdealStrip(int aStrip, int aModule) throws IllegalArgumentException
      Returns a sensor strip before any alignment shifts been applied.
      Parameters:
      aStrip - an index starting from 0
      aModule - 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 Link icon

      public Line3d getShiftedStrip(int aLayer, int aSector, int aStrip) throws IllegalArgumentException
      Returns a sensor strip after the alignment shifts have been applied.
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      aStrip - an index starting from 0
      Returns:
      Line3D a strip in the lab frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • getShiftedStrip Link icon

      public Line3d getShiftedStrip(int aRegion, int aSector, int aModule, int aStrip)
      Returns a sensor strip after the alignment shifts have been applied.
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      aStrip - an index starting from 0
      Returns:
      Line3D a strip in the lab frame
    • createShiftedStrip Link icon

      public Line3d createShiftedStrip(int aRegion, int aSector, int aModule, int aStrip)
      Returns a sensor strip after the alignment shifts have been applied.
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      aStrip - an index starting from 0
      Returns:
      Line3D a strip in the local frame
    • getModuleNormal Link icon

      public Vector3d getModuleNormal(int aLayer, int aSector)
      Returns the normal the module in the lab frame, depending on this factory's setup.
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      Returns:
      Vector3d unit vector, normal to the plane, pointing radially outwards
      See Also:
    • getModuleEndPoints Link icon

      public Line3d getModuleEndPoints(int aLayer, int aSector)
      Returns the end points of the module in the lab frame, depending on this factory's setup.
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      Returns:
      Line3d going from origin to e end of modules
      See Also:
    • getLayerCorners Link icon

      public Vector3d[] getLayerCorners(int aLayer, int aSector)
      Returns the corners of a sensor layer in the lab frame, depending on this factory's setup.
      Parameters:
      aLayer - an index starting from 0
      aSector - 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 Link icon

      public 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.
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - 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 Link icon

      public Vector3d[] getIdealLayerCorners(int aLayer, int aSector) throws IllegalArgumentException
      Returns the corners of a sensor layer in the detector frame.
      Parameters:
      aLayer - an index starting from 0
      aSector - 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 Link icon

      public Vector3d[] getIdealLayerCorners(int aRegion, int aSector, int aModule)
      Returns the corners of a sensor layer in the detector frame.
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      Returns:
      Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
    • createIdealLayerCorners Link icon

      public Vector3d[] createIdealLayerCorners(int aModule) throws IllegalArgumentException
      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 Link icon

      public Vector3d[] getShiftedLayerCorners(int aLayer, int aSector) throws IllegalArgumentException
      Returns the corners of a sensor layer in the lab frame after the alignment shifts have been applied.
      Parameters:
      aLayer - an index starting from 0
      aSector - 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 Link icon

      public 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.
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      Returns:
      Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
    • createShiftedLayerCorners Link icon

      public 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.
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      Returns:
      Point3D[] array of corners in order ( origin, max width, max width and max length, max length )
    • transformToLocal Link icon

      public Vector3d transformToLocal(int aLayer, int aSector, double x, double y, double z)
      Transform the (x,y,z) point from the lab to the local frame
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      x -
      y -
      z -
      Returns:
      Vector3d of point coordinate in the module local frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • transformToLocal Link icon

      public Vector3d transformToLocal(int aLayer, int aSector, Vector3d pLab)
      Transform the pLab point from the lab to the local frame
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      pLab - a point in the lab frame
      Returns:
      Vector3d of point coordinate in the module local frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • transformToLocal Link icon

      public Vector3d transformToLocal(int aRegion, int aSector, int aModule, Vector3d pLab)
      Transform the pLab point from the lab to the local frame
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      pLab - a point in the lab frame
      Returns:
      Vector3d of point coordinate in the module local frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • transformToLab Link icon

      public Vector3d transformToLab(int aLayer, int aSector, double x, double y, double z)
      Transform the (x,y,z) point from the local to the lab frame
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      x -
      y -
      z -
      Returns:
      Vector3d of point coordinate in the module local frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • transformToLab Link icon

      public Vector3d transformToLab(int aLayer, int aSector, Vector3d pLoc)
      Transform the pLoc point from the strip to the lab frame
      Parameters:
      aLayer - an index starting from 0
      aSector - an index starting from 0
      pLoc - a point in the lab frame
      Returns:
      Vector3d of point coordinate in the module local frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • transformToLab Link icon

      public Vector3d transformToLab(int aRegion, int aSector, int aModule, Vector3d pLoc)
      Transform the pLab point from the strip to the lab frame
      Parameters:
      aRegion - an index starting from 0
      aSector - an index starting from 0
      aModule - an index starting from 0
      pLoc - a point in the local frame
      Returns:
      Vector3d of point coordinate in the module local frame
      Throws:
      IllegalArgumentException - indices out of bounds
    • setApplyAlignmentShifts Link icon

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

      public boolean isSetApplyAlignmentShifts()
      Returns whether alignment shifts are applied.
      Returns:
      boolean true/false
    • setAlignmentShiftScale Link icon

      public void setAlignmentShiftScale(double aScaleTranslation, double aScaleRotation)
      Sets scale factors to amplify alignment shifts for visualisation purposes.
      Parameters:
      aScaleTranslation - a scale factor for translation shifts
      aScaleRotation - a scale factor for rotation shifts