Class DCFactoryUpdated
java.lang.Object
org.jlab.geom.detector.dc.DCFactoryUpdated
- All Implemented Interfaces:
Factory<DCDetector, DCSector, DCSuperlayer, DCLayer>, Showable
public class DCFactoryUpdated
extends Object
implements Factory<DCDetector, DCSector, DCSuperlayer, DCLayer>
- Author:
- gavalian
-
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 "DC Factory".protected static doublemidpointXOffset(int layer, double w_layer) Returns the xoffset between the first guard wire of the first guard wire layer of the current superlayer and the the first sense wire of the current layer.voidshow()InvokesSystem.out.println(this).toString()
-
Constructor Details
-
DCFactoryUpdated
public DCFactoryUpdated()
-
-
Method Details
-
createDetectorCLAS
Description copied from interface:FactoryConstructs a newDetectorin CLAS coordinates using the given constants.- Specified by:
createDetectorCLASin interfaceFactory<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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
-
midpointXOffset
protected static double midpointXOffset(int layer, double w_layer) Returns the xoffset between the first guard wire of the first guard wire layer of the current superlayer and the the first sense wire of the current layer.Developer's Note: The old geometry implementation produces this value incorrectly. It performs the layer staggering so that every other layer is shifted down towards the x-axis. However, it should shift every other layer up away from the x-axis. The correct and incorrect methods are both included. When ready, comment out the old method and uncomment the new method.
- Parameters:
layer- the layer index within superlayer where the first sense wire layer has index 0w_layer- the distance between midpoints of wires in the same layer in the x-axis- Returns:
- the x-offset
-
getType
Returns "DC Factory".- Specified by:
getTypein interfaceFactory<DCDetector, DCSector, DCSuperlayer, DCLayer>- Returns:
- "DC Factory"
-
show
public void show()Description copied from interface:FactoryInvokesSystem.out.println(this).- Specified by:
showin interfaceFactory<DCDetector, DCSector, DCSuperlayer, DCLayer>- 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<DCDetector, DCSector, DCSuperlayer, DCLayer>- Parameters:
cp-sector-superlayer-layer-- Returns:
-
getDetectorTransform
- Specified by:
getDetectorTransformin interfaceFactory<DCDetector, DCSector, DCSuperlayer, DCLayer>
-