Class MPGDTrapezoidStripFactory
java.lang.Object
org.jlab.detector.geant4.v2.MPGD.trapezoid.MPGDTrapezoidStripFactory
- Direct Known Subclasses:
MUVTStripFactory, URWTStripFactory
Base class implementing strip/surface/plane geometry for trapezoidal MPGD
detectors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MPGDTrapezoidConstantsprotected final MPGDTrapezoidGeant4Factoryprotected final IndexedList<Line3D> protected final IndexedList<Line3D> protected final IndexedList<Integer> protected final IndexedList<Plane3D> protected final IndexedList<Trap3D> protected final IndexedList<Line3D> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMPGDTrapezoidStripFactory(MPGDTrapezoidConstants constants) -
Method Summary
Modifier and TypeMethodDescriptionprotected intbaseLayerForCCDB(int layer) final voidbuildAll()protected List<MPGDTrapezoidStripFactory.StripGeom> Build full strip list (LOCAL) and assign CLAS12 component IDs by sorting on local X midpoint.protected MPGDTrapezoidStripFactory.StripConstantsbuildStripConstants(int region, int layer) Build StripConstants using: - XY trapezoid from geo.getSectorDimensionsPhysical(region) (NOT enlarged) - zReadoutLocal from CCDB sensitive thickness (findReadoutZLocal) - pitch/width/stereo from CCDBprotected static booleanbuildStripSegment(int internalIndex, MPGDTrapezoidStripFactory.StripConstants c, Vector3d out1, Vector3d out2) protected voidprotected Plane3DcreatePlane(int sector, int layer) protected Trap3DcreateSurface(int sector, int layer) protected doublePitch in cm (CCDB stored in mm).protected doubleStereo angle in rad (CCDB stored in deg).protected doubleWidth in cm (CCDB stored in mm).protected voidprotected voidprotected voidprotected doublefindReadoutZLocal(int layer) Readout plane z in sensitive-local.Convention: - 1D: even layerInRegion => +zHalf, odd => -zHalf - 2D: always +zHalfintgetNComponents(int sector, int layer) Number of components (strips) for this (sector, layer).getPlane(int sector, int layer) Readout plane in global frame.protected doublegetSensitiveHalfThicknessCm(int layer) Compute the sensitive half thickness (cm) from CCDB (Sensitivity==1).protected intgetSensitiveMatComponentId(int layer) Return the CCDB "Component" index (matC) whose Sensitivity==1 for a given layer.protected StringgetSensitiveVolumeName(int region, int sector, int layer) Build expected sensitive-volume name using the naming convention from AbstractMPGDTrapezoidGeant4Factory.populateSectorWithDetectorStructure(): rg{region}_s{sector}_l{layerGlobal0Based}_matC{matC} where: - region is 1-based in the name - sector is 1-based in the name - matC is the CCDB material "Component" id for Sensitivity==1getStrip(int sector, int layer, int component) Global strip line in CLAS12 frame.getStripLocal(int sector, int layer, int component) Strip line in sensitive-volume local frame.getStripTilted(int sector, int layer, int component) Strip line in legacy tilted frame (debug/plot).getSurface(int sector, int layer) Readout trapezoid surface in global frame.protected abstract Geant4BasicgetVolumeByName(String name) Detector-specific hook: Must return the volume object given its name.Typically implemented by indexing geo.getAllVolumes() into a Mapinvalid input: '<'String,Geant4Basic>.protected static booleanintersectEdgeWithLineNormal(Vector3d A, Vector3d B, Vector3d nXY, double rhs, Vector3d out) protected booleanIf true: readout is 2D => same zReadoutLocal for both layers.Override in detector.protected Vector3dtoGlobalSensitive(int region, int sector, int layer, Vector3d local) Transform a point from sensitive-local -> global using the sensitive volume transform.protected static double[]toStripFrameXY(double x, double y, MPGDTrapezoidStripFactory.StripConstants c) protected Line3D
-
Field Details
-
C
-
geo
-
globalStrips
-
localStrips
-
tiltedStrips
-
planes
-
surfaceLayers
-
nComponents
-
-
Constructor Details
-
MPGDTrapezoidStripFactory
-
-
Method Details
-
getVolumeByName
Detector-specific hook: Must return the volume object given its name.Typically implemented by indexing geo.getAllVolumes() into a Mapinvalid input: '<'String,Geant4Basic>.- Parameters:
name-- Returns:
-
is2DReadout
protected boolean is2DReadout()If true: readout is 2D => same zReadoutLocal for both layers.Override in detector.- Returns:
-
baseLayerForCCDB
protected int baseLayerForCCDB(int layer) -
defaultPitchCm
protected double defaultPitchCm()Pitch in cm (CCDB stored in mm). Override if detector is different. -
defaultWidthCm
protected double defaultWidthCm()Width in cm (CCDB stored in mm). Override if detector is different. -
defaultStereoAngleRad
protected double defaultStereoAngleRad()Stereo angle in rad (CCDB stored in deg). Override if detector is layer-dependent. -
getSensitiveMatComponentId
protected int getSensitiveMatComponentId(int layer) Return the CCDB "Component" index (matC) whose Sensitivity==1 for a given layer.- Parameters:
layer-- Returns:
-
getSensitiveHalfThicknessCm
protected double getSensitiveHalfThicknessCm(int layer) Compute the sensitive half thickness (cm) from CCDB (Sensitivity==1).- Parameters:
layer-- Returns:
-
findReadoutZLocal
protected double findReadoutZLocal(int layer) Readout plane z in sensitive-local.Convention: - 1D: even layerInRegion => +zHalf, odd => -zHalf - 2D: always +zHalf- Parameters:
layer-- Returns:
-
getSensitiveVolumeName
Build expected sensitive-volume name using the naming convention from AbstractMPGDTrapezoidGeant4Factory.populateSectorWithDetectorStructure(): rg{region}_s{sector}_l{layerGlobal0Based}_matC{matC} where: - region is 1-based in the name - sector is 1-based in the name - matC is the CCDB material "Component" id for Sensitivity==1- Parameters:
region-sector-layer-- Returns:
-
toGlobalSensitive
-
buildStripConstants
Build StripConstants using: - XY trapezoid from geo.getSectorDimensionsPhysical(region) (NOT enlarged) - zReadoutLocal from CCDB sensitive thickness (findReadoutZLocal) - pitch/width/stereo from CCDB- Parameters:
region-layer-- Returns:
-
toStripFrameXY
protected static double[] toStripFrameXY(double x, double y, MPGDTrapezoidStripFactory.StripConstants c) -
intersectEdgeWithLineNormal
-
buildStripSegment
protected static boolean buildStripSegment(int internalIndex, MPGDTrapezoidStripFactory.StripConstants c, Vector3d out1, Vector3d out2) -
buildStripCache
protected List<MPGDTrapezoidStripFactory.StripGeom> buildStripCache(MPGDTrapezoidStripFactory.StripConstants c) Build full strip list (LOCAL) and assign CLAS12 component IDs by sorting on local X midpoint.- Parameters:
c-- Returns:
-
toTilted
-
createSurface
- Parameters:
sector-layer-- Returns:
-
createPlane
- Parameters:
sector-layer-- Returns:
-
buildAll
public final void buildAll() -
clearCaches
protected void clearCaches() -
fillStripLists
protected void fillStripLists() -
fillSurfaceLists
protected void fillSurfaceLists() -
fillPlaneLists
protected void fillPlaneLists() -
getStrip
Global strip line in CLAS12 frame.- Parameters:
sector-layer-component-- Returns:
-
getStripLocal
Strip line in sensitive-volume local frame.- Parameters:
sector-layer-component-- Returns:
-
getStripTilted
Strip line in legacy tilted frame (debug/plot).- Parameters:
sector-layer-component-- Returns:
-
getPlane
Readout plane in global frame.- Parameters:
sector-layer-- Returns:
-
getSurface
Readout trapezoid surface in global frame.- Parameters:
sector-layer-- Returns:
-
getNComponents
public int getNComponents(int sector, int layer) Number of components (strips) for this (sector, layer).- Parameters:
sector-layer-- Returns:
-