Class AbstractSuperlayer<LayerType extends Layer>
- Type Parameters:
- LayerType- the specific type of- Layercontained by the- Superlayer
- All Implemented Interfaces:
- Superlayer<LayerType>,- Showable
- Direct Known Subclasses:
- AlertDCSuperlayer,- AlertTOFSuperlayer,- BSTSuperlayer,- CNDSuperlayer,- DCSuperlayer,- ECSuperlayer,- FMTSuperlayer,- FTCALSuperlayer,- FTOFSuperlayer,- FTOFSuperlayerMesh
Superlayer interface to minimize the effort
 required to implement a Superlayer.
 
 To implement a Superlayer, the programmer needs only to extend this
 class and provide implementations for the
 Superlayer.getType() method.
 
 Initially the Superlayer will contain no Layers, so
 Layers must be added to the Superlayer after
 AbstractSuperlayer's constructor has been invoked via the
 addLayer(org.jlab.geom.base.Layer) method.
- Author:
- jnhankins
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractSuperlayer(DetectorId detectorId, int sectorId, int superlayerId) Initializes an empty AbstractSuperlayer with the given id.
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidAdds a layer to this superlayer.Returns an unmodifiable list of all layers contained in this superlayer.getCrossSections(Transformation3D transform) Returns a list of lists of lines such that each of the inner lists contains the cross section lines for a single component.Returns the id of the detector that this superlayer is contained in.Returns a list of DetecorHits which store information about intersections with components in this superlayer.final LayerTypegetLayer(int layerId) Returns the layer associated with the given layer id.getLayerHits(Path3D path) Returns a list of DetecorHits which store information about intersections with layer surface boundaries in this superlayer.final intReturns the number of layers contained in this sector.final intReturns the id of the sector that this superlayer is contained in.final intReturns the id of this superlayer.final voidsetTransformation(Transformation3D transform) Sets the transformation of all layers contained in this superlayer.voidshow()InvokesSystem.out.println(this).toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jlab.geom.base.SuperlayergetType
- 
Constructor Details- 
AbstractSuperlayerInitializes an empty AbstractSuperlayer with the given id.- Parameters:
- detectorId- the id of this superlayer's detector
- sectorId- the id of this superlayer's sector
- superlayerId- the id of this superlayer
 
 
- 
- 
Method Details- 
getDetectorIdDescription copied from interface:SuperlayerReturns the id of the detector that this superlayer is contained in.- Specified by:
- getDetectorIdin interface- Superlayer<LayerType extends Layer>
- Returns:
- the id of this superlayer's detector
 
- 
getSectorIdpublic final int getSectorId()Description copied from interface:SuperlayerReturns the id of the sector that this superlayer is contained in.- Specified by:
- getSectorIdin interface- Superlayer<LayerType extends Layer>
- Returns:
- the id of this superlayer's sector
 
- 
getSuperlayerIdpublic final int getSuperlayerId()Description copied from interface:SuperlayerReturns the id of this superlayer.- Specified by:
- getSuperlayerIdin interface- Superlayer<LayerType extends Layer>
- Returns:
- the id of this superlayer
 
- 
getNumLayerspublic final int getNumLayers()Description copied from interface:SuperlayerReturns the number of layers contained in this sector.- Specified by:
- getNumLayersin interface- Superlayer<LayerType extends Layer>
- Returns:
- the number of layers
 
- 
addLayerAdds a layer to this superlayer. If a layer with the same id is contained in this superlayer then the preexisting layer is replaced by the given layer. Intended for use by detector factories.- Parameters:
- layer- the layer to add
 
- 
getLayerDescription copied from interface:SuperlayerReturns the layer associated with the given layer id.- Specified by:
- getLayerin interface- Superlayer<LayerType extends Layer>
- Parameters:
- layerId- the layer id
- Returns:
- the layer with the specified id
 
- 
getAllLayersDescription copied from interface:SuperlayerReturns an unmodifiable list of all layers contained in this superlayer.- Specified by:
- getAllLayersin interface- Superlayer<LayerType extends Layer>
- Returns:
- an unmodifiable list of layers
 
- 
getCrossSectionsDescription copied from interface:SuperlayerReturns a list of lists of lines such that each of the inner lists contains the cross section lines for a single component.This method takes a Transformation3D object as an argument, then constructs a Plane3Dobject in the xy-plane and applies the transformation to the plane. The intersection of the superlayer's component's shapes with the transformed plane is then calculated and stored in a list of lists of lines of lines. The inverse of the transformation is then applied to each line ensuring that each returned line is in the xy-plane- Specified by:
- getCrossSectionsin interface- Superlayer<LayerType extends Layer>
- Parameters:
- transform- the transformation
- Returns:
- a list of list of lines representing the cross section
- See Also:
 
- 
getLayerHitsDescription copied from interface:SuperlayerReturns a list of DetecorHits which store information about intersections with layer surface boundaries in this superlayer. The component ids stored in the detector hits will all be set to -1 to indicate that detector hit does not specify a specific component.- Specified by:
- getLayerHitsin interface- Superlayer<LayerType extends Layer>
- Parameters:
- path- the path
- Returns:
- a list of detector hits
 
- 
getHitsDescription copied from interface:SuperlayerReturns a list of DetecorHits which store information about intersections with components in this superlayer.- Specified by:
- getHitsin interface- Superlayer<LayerType extends Layer>
- Parameters:
- path- the path
- Returns:
- a list of detector hits
 
- 
setTransformationDescription copied from interface:SuperlayerSets the transformation of all layers contained in this superlayer. In most cases layers within a superlayer are "bolted" together and cannot move independently of one another, so this method is intended to provide a mechanism for moving groups of layers together.- Specified by:
- setTransformationin interface- Superlayer<LayerType extends Layer>
- Parameters:
- transform- the new transform
- See Also:
 
- 
showpublic void show()Description copied from interface:SuperlayerInvokesSystem.out.println(this).
- 
toString
 
-