Class AbstractSector<SuperlayerType extends Superlayer>
- Type Parameters:
- SuperlayerType- the specific type of- Superlayercontained by the- Sector
- Direct Known Subclasses:
- AlertDCSector,- AlertTOFSector,- BSTSector,- CNDSector,- DCSector,- ECSector,- FMTSector,- FTCALSector,- FTOFSector,- FTOFSectorMesh
Sector interface to minimize the effort
 required to implement a Sector.
 
 To implement a Sector, the programmer needs only to extend this class
 and provide implementations for the
 Sector.getType() method.
 
 Initially the Sector will contain no Superlayers, so
 Superlayers must be added to the Sector after
 AbstractSector's constructor has been invoked via the
 addSuperlayer(org.jlab.geom.base.Superlayer) method.
- Author:
- jnhankins
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractSector(DetectorId detectorId, int sectorId) Initializes an empty AbstractSector with the given id.
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidaddSuperlayer(SuperlayerType superlayer) Adds a superlayer to this sector.final List<SuperlayerType>Returns an unmodifiable list of all superlayers contained in this sector.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.final DetectorIdReturns the id of the detector that this sector is contained in.Returns a list of DetecorHits which store information about intersections with components in this sector.getLayerHits(Path3D path) Returns a list of DetecorHits which store information about intersections with layer surface boundaries in this sector.final intReturns the number of superlayers contained in this sector.final intReturns the id of this sector.final SuperlayerTypegetSuperlayer(int superlayerId) Returns the superlayer associated with the given superlayer id.voidshow()InvokesSystem.out.println(this).toString()
- 
Constructor Details- 
AbstractSectorInitializes an empty AbstractSector with the given id.- Parameters:
- detectorId- the id of this sector's detector
- sectorId- the id of this sector
 
 
- 
- 
Method Details- 
getDetectorIdDescription copied from interface:SectorReturns the id of the detector that this sector is contained in.- Specified by:
- getDetectorIdin interface- Sector<SuperlayerType extends Superlayer>
- Returns:
- the id of this sector's detector
 
- 
getSectorIdpublic final int getSectorId()Description copied from interface:SectorReturns the id of this sector.- Specified by:
- getSectorIdin interface- Sector<SuperlayerType extends Superlayer>
- Returns:
- the id of this sector
 
- 
getNumSuperlayerspublic final int getNumSuperlayers()Description copied from interface:SectorReturns the number of superlayers contained in this sector.- Specified by:
- getNumSuperlayersin interface- Sector<SuperlayerType extends Superlayer>
- Returns:
- the number of superlayers
 
- 
addSuperlayerAdds a superlayer to this sector. If a superlayer with the same id is contained in this sector then the preexisting superlayer is replaced by the given superlayer. Intended for use by detector factories.- Parameters:
- superlayer- the superlayer to add
 
- 
getSuperlayerDescription copied from interface:SectorReturns the superlayer associated with the given superlayer id.- Specified by:
- getSuperlayerin interface- Sector<SuperlayerType extends Superlayer>
- Parameters:
- superlayerId- the superlayer id
- Returns:
- the superlayer with the specified id
 
- 
getAllSuperlayersDescription copied from interface:SectorReturns an unmodifiable list of all superlayers contained in this sector.- Specified by:
- getAllSuperlayersin interface- Sector<SuperlayerType extends Superlayer>
- Returns:
- an unmodifiable list of superlayers
 
- 
getCrossSectionsDescription copied from interface:SectorReturns 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 sector'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- Sector<SuperlayerType extends Superlayer>
- Parameters:
- transform- the transformation
- Returns:
- a list of list of lines representing the cross section
- See Also:
 
- 
getLayerHitsDescription copied from interface:SectorReturns a list of DetecorHits which store information about intersections with layer surface boundaries in this sector. 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- Sector<SuperlayerType extends Superlayer>
- Parameters:
- path- the path
- Returns:
- a list of detector hits
 
- 
getHitsDescription copied from interface:SectorReturns a list of DetecorHits which store information about intersections with components in this sector.- Specified by:
- getHitsin interface- Sector<SuperlayerType extends Superlayer>
- Parameters:
- path- the path
- Returns:
- a list of detector hits
 
- 
showpublic void show()Description copied from interface:SectorInvokesSystem.out.println(this).- Specified by:
- showin interface- Sector<SuperlayerType extends Superlayer>
- Specified by:
- showin interface- Showable
 
- 
toString
 
-