Package org.jlab.detector.geant4.v2.SVT
Class SVTVolumeFactory
java.lang.Object
org.jlab.detector.geant4.v2.SVT.SVTVolumeFactory
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.2
- Author:
- pdavies
- 
Field SummaryFieldsModifier and TypeFieldDescriptionbooleanA switch to control whether the sensor modules are made.booleanA switch to make only the sensors, without the passive materials Default: truebooleanA switch to control whether the physical sensors are made inside the strip modules.booleanA switch to control whether the sensor active and dead zones are made instead of the physical volume BUILDSENSORS=true must also be set.booleanDeprecated.booleanA switch to control whether debug information is displayed Default: falsedoubleA parameter to add space between volumes to prevent overlaps Default: 0.0
- 
Constructor SummaryConstructorsConstructorDescriptionSVTVolumeFactory(DatabaseConstantProvider cp, boolean applyAlignmentShifts) Constructs a new geometry factory for detector volumes.
- 
Method SummaryModifier and TypeMethodDescriptionvoidappendName(String aTag) Appends a tag to the current volumes.createDeadZone(String aType) Returns one dead zone of a sensor.voidcreateDownstreamSupport(int aRegion, Geant4Basic regionVol) Returns one sensor module, containing 3 physical sensors.static Geant4BasiccreateNamedVolume(String aName) Returns one specified box volume.createRegion(int aRegion) Returns one region, containing the required number of sector modules.Returns one sector module, containing a pair of sensor modules and backing structure.Returns one active zone of a sensor.Returns one physical sensor, containing active zone and dead zones.intReturns the last layer to be generated on makeVolumes().intReturns the first layer to be generated on makeVolumes().intReturns the last module in a sector to be generated on makeVolumes().intReturns the first module in a sector to be generated on makeVolumes().Returns the mother volume to export the geometry to, for example, a GDML file.getParameter(String aName) Returns a value from the Parameters HashMap.Returns the "Parameters" HashMap.getProperty(String aName) Returns a value from the Properties HashMap.intReturns the last region to be generated on makeVolumes().intReturns the first region to be generated on makeVolumes().int[]Returns the last sector in each region to be generated on makeVolumes().int[]Returns the first sector in each region to be generated on makeVolumes().booleanReturns whether alignment shifts are applied.static voidvoidmakeCage()voidGenerates the geometry using the current range and stores it in the mother volume.voidPopulates the HashMaps with constants.voidsetAlignmentShiftScale(double aScaleTranslation, double aScaleRotation) Sets scale factors to amplify alignment shifts for visualisation purposes.voidsetApplyAlignmentShifts(boolean b) Sets whether alignment shifts from CCDB should be applied to the geometry during generation.voidsetRange(int aRegion, int aSectorMin, int aSectorMax) Sets the range of indices to cycle over when generating the geometry in makeVolumes().voidsetRange(int aLayerMin, int aLayerMax, int[] aSectorMin, int[] aSectorMax) Sets the range of indices to cycle over when generating the geometry in makeVolumes().voidsetRange(int aRegionMin, int aRegionMax, int[] aSectorMin, int[] aSectorMax, int aModuleMin, int aModuleMax) Sets the range of indices to cycle over when generating the geometry in makeVolumes().Returns a string to display the current range of indices.toString()Returns a list of all the volumes in the gemcString() format.
- 
Field Details- 
VERBOSEpublic boolean VERBOSEA switch to control whether debug information is displayed Default: false
- 
BUILDSENSORZONESpublic boolean BUILDSENSORZONESA 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
- 
BUILDSENSORSpublic boolean BUILDSENSORSA switch to control whether the physical sensors are made inside the strip modules. Default: false
- 
BUILDMODULESpublic boolean BUILDMODULESA switch to control whether the sensor modules are made. Disable to see the high voltage rail assembly. Default: true
- 
BUILDPASSIVESpublic boolean BUILDPASSIVESA switch to make only the sensors, without the passive materials Default: true
- 
VOLSPACERpublic double VOLSPACERA parameter to add space between volumes to prevent overlaps Default: 0.0
- 
HALFBOXESpublic boolean HALFBOXESDeprecated.A switch to halve the dimensions of all boxes for geant4 format. Default: false
 
- 
- 
Constructor Details- 
SVTVolumeFactoryConstructs a new geometry factory for detector volumes. Please runSVTConstants.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- 
putParameterspublic void putParameters()Populates the HashMaps with constants.
- 
createNamedVolumeReturns one specified box volume.- Parameters:
- aName- a key in the MATERIALDIMENSIONS HashMap
- Returns:
- Geant4Basic a box positioned at the origin
- Throws:
- IllegalArgumentException- unknown material
 
- 
makeVolumespublic void makeVolumes()Generates the geometry using the current range and stores it in the mother volume.
- 
createRegionReturns 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
 
- 
makeCagepublic void makeCage()
- 
createSectorReturns one sector module, containing a pair of sensor modules and backing structure.- Returns:
- Geant4Basic a dummy volume positioned in the lab frame
 
- 
createModuleReturns one sensor module, containing 3 physical sensors.- Returns:
- Geant4Basic a volume positioned at the origin
 
- 
createSensorPhysicalReturns one physical sensor, containing active zone and dead zones.- Returns:
- Geant4Basic a volume positioned at the origin
 
- 
createSensorActiveReturns one active zone of a sensor.- Returns:
- Geant4Basic a volume positioned at the origin
 
- 
createDeadZoneReturns 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
- 
createCarbonFiber
- 
createBusCable
- 
createPcBoardAndChips
- 
createEpoxyAndRailAndPads
- 
createDownstreamSupport
- 
getMotherVolumeReturns the mother volume to export the geometry to, for example, a GDML file.- Returns:
- Geant4Basic the mother volume
 
- 
getPropertyReturns 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
 
- 
getParameterReturns 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.
 
- 
getParametersReturns the "Parameters" HashMap. Used by GEMC to interface with CCDB.- Returns:
- HashMap a HashMap containing named constants and core parameters.
 
- 
appendNameAppends a tag to the current volumes. Useful to avoid conflicts in a GDML file.- Parameters:
- aTag- something to add
 
- 
toStringReturns a list of all the volumes in the gemcString() format.
- 
setApplyAlignmentShiftspublic void setApplyAlignmentShifts(boolean b) Sets whether alignment shifts from CCDB should be applied to the geometry during generation.- Parameters:
- b- true/false
 
- 
isSetApplyAlignmentShiftspublic boolean isSetApplyAlignmentShifts()Returns whether alignment shifts are applied.- Returns:
- boolean true/false
 
- 
setAlignmentShiftScalepublic 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
 
- 
setRangepublic 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
 
- 
setRangepublic 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
 
- 
setRangeSets 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
 
- 
showRangeReturns a string to display the current range of indices.- Returns:
- String a line of text
 
- 
getRegionMinpublic int getRegionMin()Returns the first region to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: 1- Returns:
- int a lower bound for the region index
 
- 
getRegionMaxpublic int getRegionMax()Returns the last region to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: NREGIONS- Returns:
- int an upper bound for the region index
 
- 
getSectorMinpublic int[] getSectorMin()Returns the first sector in each region to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: 1- Returns:
- int a lower bound for the sector index in each region
 
- 
getSectorMaxpublic int[] getSectorMax()Returns the last sector in each region to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: NSECTORS[region]- Returns:
- int an upper bound for the sector index in each region
 
- 
getModuleMinpublic int getModuleMin()Returns the first module in a sector to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: 1- Returns:
- int a lower bound for the module index
 
- 
getModuleMaxpublic int getModuleMax()Returns the last module in a sector to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: NMODULES- Returns:
- int an upper bound for the module index
 
- 
getLayerMinpublic int getLayerMin()Returns the first layer to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: 1- Returns:
- int a lower bound for the layer index
 
- 
getLayerMaxpublic int getLayerMax()Returns the last layer to be generated on makeVolumes(). To use in a for loop, dofor( int i = min-1; i < max; i++)Default: NLAYERS- Returns:
- int an upper bound for the layer index
 
- 
main
 
-