Class SVTVolumeFactory

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

public class SVTVolumeFactory 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.2
Author:
pdavies
  • Field Details Link icon

    • VERBOSE Link icon

      public boolean VERBOSE
      A switch to control whether debug information is displayed Default: false
    • BUILDSENSORZONES Link icon

      public boolean BUILDSENSORZONES
      A switch to control whether the sensor active and dead zones are made instead of the physical volume BUILDSENSORS=true must also be set. Default: false
    • BUILDSENSORS Link icon

      public boolean BUILDSENSORS
      A switch to control whether the physical sensors are made inside the strip modules. Default: false
    • BUILDMODULES Link icon

      public boolean BUILDMODULES
      A switch to control whether the sensor modules are made. Disable to see the high voltage rail assembly. Default: true
    • BUILDPASSIVES Link icon

      public boolean BUILDPASSIVES
      A switch to make only the sensors, without the passive materials Default: true
    • VOLSPACER Link icon

      public double VOLSPACER
      A parameter to add space between volumes to prevent overlaps Default: 0.0
    • HALFBOXES Link icon

      public boolean HALFBOXES
      Deprecated.
      A switch to halve the dimensions of all boxes for geant4 format. Default: false
  • Constructor Details Link icon

    • SVTVolumeFactory Link icon

      public SVTVolumeFactory(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, boolean applyAlignmentShifts)
      Constructs a new geometry factory for detector volumes. Please run SVTConstants.connect() first.
      Parameters:
      cp - a DatabaseConstantProvider that has loaded the necessary tables
      applyAlignmentShifts - a switch to set whether the alignment shifts from CCDB will be applied
  • Method Details Link icon

    • putParameters Link icon

      public void putParameters()
      Populates the HashMaps with constants.
    • createNamedVolume Link icon

      public static Geant4Basic createNamedVolume(String aName) throws IllegalArgumentException
      Returns one specified box volume.
      Parameters:
      aName - a key in the MATERIALDIMENSIONS HashMap
      Returns:
      Geant4Basic a box positioned at the origin
      Throws:
      IllegalArgumentException - unknown material
    • makeVolumes Link icon

      public void makeVolumes()
      Generates the geometry using the current range and stores it in the mother volume.
    • createRegion Link icon

      public Geant4Basic createRegion(int aRegion) throws IllegalArgumentException
      Returns one region, containing the required number of sector modules.
      Parameters:
      aRegion - an index starting from 0
      Returns:
      Geant4Basic a dummy volume positioned at the origin
      Throws:
      IllegalArgumentException - index out of bounds
    • makeCage Link icon

      public void makeCage()
    • createSector Link icon

      public Geant4Basic createSector()
      Returns one sector module, containing a pair of sensor modules and backing structure.
      Returns:
      Geant4Basic a dummy volume positioned in the lab frame
    • createModule Link icon

      public Geant4Basic createModule()
      Returns one sensor module, containing 3 physical sensors.
      Returns:
      Geant4Basic a volume positioned at the origin
    • createSensorPhysical Link icon

      public Geant4Basic createSensorPhysical()
      Returns one physical sensor, containing active zone and dead zones.
      Returns:
      Geant4Basic a volume positioned at the origin
    • createSensorActive Link icon

      public Geant4Basic createSensorActive()
      Returns one active zone of a sensor.
      Returns:
      Geant4Basic a volume positioned at the origin
    • createDeadZone Link icon

      public Geant4Basic createDeadZone(String aType) throws IllegalArgumentException
      Returns one dead zone of a sensor.
      Parameters:
      aType - one of two types of dead zone, extending along the length "l" or width "w" of the sensor
      Returns:
      Geant4Basic a volume positioned relative to a physical sensor
      Throws:
      IllegalArgumentException - unknown type
    • createHeatSink Link icon

      public Geant4Basic createHeatSink()
    • createCarbonFiber Link icon

      public Geant4Basic createCarbonFiber()
    • createBusCable Link icon

      public Geant4Basic createBusCable()
    • createPcBoardAndChips Link icon

      public Geant4Basic createPcBoardAndChips()
    • createEpoxyAndRailAndPads Link icon

      public Geant4Basic createEpoxyAndRailAndPads()
    • createDownstreamSupport Link icon

      public void createDownstreamSupport(int aRegion, Geant4Basic regionVol)
    • getMotherVolume Link icon

      public Geant4Basic getMotherVolume()
      Returns the mother volume to export the geometry to, for example, a GDML file.
      Returns:
      Geant4Basic the mother volume
    • getProperty Link icon

      public String getProperty(String aName)
      Returns a value from the Properties HashMap.
      Parameters:
      aName - name of a key
      Returns:
      String the value associated with the given key, or "none" if the key does not exist
    • getParameter Link icon

      public String getParameter(String aName)
      Returns a value from the Parameters HashMap.
      Parameters:
      aName - name of a key
      Returns:
      String the value associated with the given key, or "none" if the key does not exist.
    • getParameters Link icon

      public HashMap<String,String> getParameters()
      Returns the "Parameters" HashMap. Used by GEMC to interface with CCDB.
      Returns:
      HashMap a HashMap containing named constants and core parameters.
    • appendName Link icon

      public void appendName(String aTag)
      Appends a tag to the current volumes. Useful to avoid conflicts in a GDML file.
      Parameters:
      aTag - something to add
    • toString Link icon

      public String toString()
      Returns a list of all the volumes in the gemcString() format.
      Overrides:
      toString in class Object
      Returns:
      String multiple lines of text
    • setApplyAlignmentShifts Link icon

      public void setApplyAlignmentShifts(boolean b)
      Sets whether alignment shifts from CCDB should be applied to the geometry during generation.
      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
    • setRange Link icon

      public void setRange(int aLayerMin, int aLayerMax, int[] aSectorMin, int[] aSectorMax) throws IllegalArgumentException
      Sets the range of indices to cycle over when generating the geometry in makeVolumes(). Enter 0 to use the previous/default value.
      Parameters:
      aLayerMin - an index starting from 1
      aLayerMax - an index starting from 1
      aSectorMin - an index starting from 1
      aSectorMax - an index starting from 1
      Throws:
      IllegalArgumentException - indices out of bounds
    • setRange Link icon

      public void setRange(int aRegionMin, int aRegionMax, int[] aSectorMin, int[] aSectorMax, int aModuleMin, int aModuleMax) throws IllegalArgumentException
      Sets the range of indices to cycle over when generating the geometry in makeVolumes(). Enter 0 to use the previous/default value.
      Parameters:
      aRegionMin - an index starting from 1
      aRegionMax - an index starting from 1
      aSectorMin - an index starting from 1
      aSectorMax - an index starting from 1
      aModuleMin - an index starting from 1
      aModuleMax - an index starting from 1
      Throws:
      IllegalArgumentException - indices out of bounds
    • setRange Link icon

      public void setRange(int aRegion, int aSectorMin, int aSectorMax) throws IllegalArgumentException
      Sets the range of indices to cycle over when generating the geometry in makeVolumes(). Enter 0 to use the previous/default value.
      Parameters:
      aRegion - an index starting from 1
      aSectorMin - an index starting from 1
      aSectorMax - an index starting from 1
      Throws:
      IllegalArgumentException - indices out of bounds
    • showRange Link icon

      public String showRange()
      Returns a string to display the current range of indices.
      Returns:
      String a line of text
    • getRegionMin Link icon

      public int getRegionMin()
      Returns the first region to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: 1
      Returns:
      int a lower bound for the region index
    • getRegionMax Link icon

      public int getRegionMax()
      Returns the last region to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: NREGIONS
      Returns:
      int an upper bound for the region index
    • getSectorMin Link icon

      public int[] getSectorMin()
      Returns the first sector in each region to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: 1
      Returns:
      int a lower bound for the sector index in each region
    • getSectorMax Link icon

      public int[] getSectorMax()
      Returns the last sector in each region to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: NSECTORS[region]
      Returns:
      int an upper bound for the sector index in each region
    • getModuleMin Link icon

      public int getModuleMin()
      Returns the first module in a sector to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: 1
      Returns:
      int a lower bound for the module index
    • getModuleMax Link icon

      public int getModuleMax()
      Returns the last module in a sector to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: NMODULES
      Returns:
      int an upper bound for the module index
    • getLayerMin Link icon

      public int getLayerMin()
      Returns the first layer to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: 1
      Returns:
      int a lower bound for the layer index
    • getLayerMax Link icon

      public int getLayerMax()
      Returns the last layer to be generated on makeVolumes(). To use in a for loop, do for( int i = min-1; i < max; i++) Default: NLAYERS
      Returns:
      int an upper bound for the layer index
    • main Link icon

      public static void main(String[] args)