Class CNDFactory
java.lang.Object
org.jlab.geom.detector.cnd.CNDFactory
- All Implemented Interfaces:
Factory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>, Showable
public class CNDFactory
extends Object
implements Factory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>
A Central Neutron Detector (CND)
Factory.
Factory: CNDFactory
Hierarchy:
CNDDetector →
CNDSector →
CNDSuperlayer →
CNDLayer →
ScintillatorPaddle
Due to the way the CND is organized, there is only one CNDSector
and CNDSuperlayer per CNDDetector. There are three CNDLayers
and each layer contains 48 ScintillatorPaddles grouped pairwise into
24 sectors. The equation for the sector id given a component id for the CND
is as follows
sector = ceil((component%47)/2)
This means that components 47 and 0 are both in sector 0, components 1 and 2
are in sector 1, components 3 and 4 are in sector 2, etc.
- Author:
- jnhankins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConstructs a newDetectorin CLAS coordinates using the given constants.Constructs a newDetectorin Local coordinates using the given constants.Constructs a newDetectorin Sector coordinates using the given constants.Constructs a newDetectorin Tilted coordinates using the given constants.createLayer(ConstantProvider cp, int sectorId, int superlayerId, int layerId) Constructs the specifiedLayerin Local coordinates using the given constants.createSector(ConstantProvider cp, int sectorId) Constructs the specifiedSectorin Local coordinates using the given constants.createSuperlayer(ConstantProvider cp, int sectorId, int superlayerId) Constructs the specifiedSuperlayerin Local coordinates using the given constants.getTransformation(ConstantProvider cp, int sector, int superlayer, int layer) Returns a transformation object for given sector, superlayer and layergetType()Returns "CND Factory".voidshow()InvokesSystem.out.println(this).toString()
-
Constructor Details
-
CNDFactory
public CNDFactory()
-
-
Method Details
-
createDetectorCLAS
Description copied from interface:FactoryConstructs a newDetectorin CLAS coordinates using the given constants.- Specified by:
createDetectorCLASin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp- the constant provider- Returns:
- a detector in CLAS coordinates
-
createDetectorSector
Description copied from interface:FactoryConstructs a newDetectorin Sector coordinates using the given constants.- Specified by:
createDetectorSectorin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp- the constant provider- Returns:
- a detector in Sector coordinates
-
createDetectorTilted
Description copied from interface:FactoryConstructs a newDetectorin Tilted coordinates using the given constants.- Specified by:
createDetectorTiltedin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp- the constant provider- Returns:
- a detector in Tilted coordinates
-
createDetectorLocal
Description copied from interface:FactoryConstructs a newDetectorin Local coordinates using the given constants.- Specified by:
createDetectorLocalin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp- the constant provider- Returns:
- a detector in Local coordinates
-
createSector
Description copied from interface:FactoryConstructs the specifiedSectorin Local coordinates using the given constants.- Specified by:
createSectorin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp- the constant providersectorId- the sector id of the desired sector- Returns:
- a sector in Local coordinates
-
createSuperlayer
Description copied from interface:FactoryConstructs the specifiedSuperlayerin Local coordinates using the given constants.- Specified by:
createSuperlayerin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp- the constant providersectorId- the sector id of the desired superlayersuperlayerId- the superlayer id of the desired superlayer- Returns:
- a superlayer in Local coordinates
-
createLayer
Description copied from interface:FactoryConstructs the specifiedLayerin Local coordinates using the given constants.- Specified by:
createLayerin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp- the constant providersectorId- the sector id of the desired layersuperlayerId- the superlayer id of the desired layerlayerId- the layer id of the desired layer- Returns:
- a layer in Local coordinates
-
getType
Returns "CND Factory".- Specified by:
getTypein interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Returns:
- "CND Factory"
-
show
public void show()Description copied from interface:FactoryInvokesSystem.out.println(this).- Specified by:
showin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Specified by:
showin interfaceShowable
-
toString
-
getTransformation
public Transformation3D getTransformation(ConstantProvider cp, int sector, int superlayer, int layer) Description copied from interface:FactoryReturns a transformation object for given sector, superlayer and layer- Specified by:
getTransformationin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>- Parameters:
cp-sector-superlayer-layer-- Returns:
-
getDetectorTransform
- Specified by:
getDetectorTransformin interfaceFactory<CNDDetector, CNDSector, CNDSuperlayer, CNDLayer>
-