Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- putParameters()
- createNamedVolume(String)
- makeVolumes()
- createRegion(int)
- makeCage()
- createSector()
- createModule()
- createSensorPhysical()
- createSensorActive()
- createDeadZone(String)
- createHeatSink()
- createCarbonFiber()
- createBusCable()
- createPcBoardAndChips()
- createEpoxyAndRailAndPads()
- createDownstreamSupport(int, Geant4Basic)
- getMotherVolume()
- getProperty(String)
- getParameter(String)
- getParameters()
- appendName(String)
- toString()
- setApplyAlignmentShifts(boolean)
- isSetApplyAlignmentShifts()
- setAlignmentShiftScale(double, double)
- setRange(int, int, int[], int[])
- setRange(int, int, int[], int[], int, int)
- setRange(int, int, int)
- showRange()
- getRegionMin()
- getRegionMax()
- getSectorMin()
- getSectorMax()
- getModuleMin()
- getModuleMax()
- getLayerMin()
- getLayerMax()
- main(String[])
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 Summary
FieldsModifier and TypeFieldDescriptionboolean
A switch to control whether the sensor modules are made.boolean
A switch to make only the sensors, without the passive materials Default: trueboolean
A switch to control whether the physical sensors are made inside the strip modules.boolean
A switch to control whether the sensor active and dead zones are made instead of the physical volume BUILDSENSORS=true must also be set.boolean
Deprecated.boolean
A switch to control whether debug information is displayed Default: falsedouble
A parameter to add space between volumes to prevent overlaps Default: 0.0 -
Constructor Summary
ConstructorsConstructorDescriptionSVTVolumeFactory
(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, boolean applyAlignmentShifts) Constructs a new geometry factory for detector volumes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendName
(String aTag) Appends a tag to the current volumes.createDeadZone
(String aType) Returns one dead zone of a sensor.void
createDownstreamSupport
(int aRegion, Geant4Basic regionVol) Returns one sensor module, containing 3 physical sensors.static Geant4Basic
createNamedVolume
(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.int
Returns the last layer to be generated on makeVolumes().int
Returns the first layer to be generated on makeVolumes().int
Returns the last module in a sector to be generated on makeVolumes().int
Returns 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.int
Returns the last region to be generated on makeVolumes().int
Returns 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().boolean
Returns whether alignment shifts are applied.static void
void
makeCage()
void
Generates the geometry using the current range and stores it in the mother volume.void
Populates the HashMaps with constants.void
setAlignmentShiftScale
(double aScaleTranslation, double aScaleRotation) Sets scale factors to amplify alignment shifts for visualisation purposes.void
setApplyAlignmentShifts
(boolean b) Sets whether alignment shifts from CCDB should be applied to the geometry during generation.void
setRange
(int aRegion, int aSectorMin, int aSectorMax) Sets the range of indices to cycle over when generating the geometry in makeVolumes().void
setRange
(int aLayerMin, int aLayerMax, int[] aSectorMin, int[] aSectorMax) Sets the range of indices to cycle over when generating the geometry in makeVolumes().void
setRange
(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
-
VERBOSE
public boolean VERBOSEA switch to control whether debug information is displayed Default: false -
BUILDSENSORZONES
public 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 -
BUILDSENSORS
public boolean BUILDSENSORSA switch to control whether the physical sensors are made inside the strip modules. Default: false -
BUILDMODULES
public boolean BUILDMODULESA switch to control whether the sensor modules are made. Disable to see the high voltage rail assembly. Default: true -
BUILDPASSIVES
public boolean BUILDPASSIVESA switch to make only the sensors, without the passive materials Default: true -
VOLSPACER
public double VOLSPACERA parameter to add space between volumes to prevent overlaps Default: 0.0 -
HALFBOXES
public boolean HALFBOXESDeprecated.A switch to halve the dimensions of all boxes for geant4 format. Default: false
-
-
Constructor Details
-
SVTVolumeFactory
public SVTVolumeFactory(org.jlab.detector.calib.utils.DatabaseConstantProvider cp, boolean applyAlignmentShifts) Constructs a new geometry factory for detector volumes. Please runSVTConstants.connect()
first.- Parameters:
cp
- a DatabaseConstantProvider that has loaded the necessary tablesapplyAlignmentShifts
- a switch to set whether the alignment shifts from CCDB will be applied
-
-
Method Details
-
putParameters
public void putParameters()Populates the HashMaps with constants. -
createNamedVolume
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
public void makeVolumes()Generates the geometry using the current range and stores it in the mother volume. -
createRegion
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
public void makeCage() -
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
Returns one sensor module, containing 3 physical sensors.- Returns:
- Geant4Basic a volume positioned at the origin
-
createSensorPhysical
Returns one physical sensor, containing active zone and dead zones.- Returns:
- Geant4Basic a volume positioned at the origin
-
createSensorActive
Returns one active zone of a sensor.- Returns:
- Geant4Basic a volume positioned at the origin
-
createDeadZone
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
-
createCarbonFiber
-
createBusCable
-
createPcBoardAndChips
-
createEpoxyAndRailAndPads
-
createDownstreamSupport
-
getMotherVolume
Returns the mother volume to export the geometry to, for example, a GDML file.- Returns:
- Geant4Basic the mother volume
-
getProperty
-
getParameter
-
getParameters
-
appendName
Appends a tag to the current volumes. Useful to avoid conflicts in a GDML file.- Parameters:
aTag
- something to add
-
toString
-
setApplyAlignmentShifts
public void setApplyAlignmentShifts(boolean b) Sets whether alignment shifts from CCDB should be applied to the geometry during generation.- 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
-
setRange
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 1aLayerMax
- an index starting from 1aSectorMin
- an index starting from 1aSectorMax
- an index starting from 1- Throws:
IllegalArgumentException
- indices out of bounds
-
setRange
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 1aRegionMax
- an index starting from 1aSectorMin
- an index starting from 1aSectorMax
- an index starting from 1aModuleMin
- an index starting from 1aModuleMax
- an index starting from 1- Throws:
IllegalArgumentException
- indices out of bounds
-
setRange
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 1aSectorMin
- an index starting from 1aSectorMax
- an index starting from 1- Throws:
IllegalArgumentException
- indices out of bounds
-
showRange
Returns a string to display the current range of indices.- Returns:
- String a line of text
-
getRegionMin
public 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
-
getRegionMax
public 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
-
getSectorMin
public 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
-
getSectorMax
public 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
-
getModuleMin
public 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
-
getModuleMax
public 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
-
getLayerMin
public 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
-
getLayerMax
public 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
-