Class MPGDTrapezoidGeant4Factory

java.lang.Object
org.jlab.detector.geant4.v2.Geant4Factory
org.jlab.detector.geant4.v2.MPGD.trapezoid.MPGDTrapezoidGeant4Factory
Direct Known Subclasses:
MUVTGeant4Factory, URWTGeant4Factory

public class MPGDTrapezoidGeant4Factory extends Geant4Factory
Generic Geant4 factory for trapezoidal MPGD-like trackers. It builds: - a world volume - NREGIONS = NLAYERS/2 (by convention) - NSECTORS per region The exact geometry parameters and material stack are taken from an MPGDTrapezoidConstants instance. Concrete detectors should: - extend this class - pass the appropriate constants + detector name in the constructor
  • Field Details

  • Constructor Details

    • MPGDTrapezoidGeant4Factory

      protected MPGDTrapezoidGeant4Factory(MPGDTrapezoidConstants constants)
      Parameters:
      constants - detector constants (already configured with CCDB paths/table names)
  • Method Details

    • init

      protected final void init()
      Initializes the world volume and constructs all regions and sectors. This must be called after the constants have been loaded from CCDB.
    • getSectorThickness

      public double getSectorThickness()
      Computes the total thickness (mm) of a sector by summing the thickness of all material volumes.
      Returns:
    • getSectorActiveVolumeDimensions

      public MPGDTrapezoidGeant4Factory.SectorDimensions getSectorActiveVolumeDimensions(int region)
      Parameters:
      region -
      Returns:
    • getSectorContainerDimensions

      public MPGDTrapezoidGeant4Factory.SectorDimensions getSectorContainerDimensions(int region)
      Parameters:
      region -
      Returns:
    • getSectorHeight

      public double getSectorHeight(int region)
      Computes the sector height (longitudinal extension in the RZ plane) for a given region.
      Parameters:
      region -
      Returns:
    • getCenterCoordinate

      public Vector3d getCenterCoordinate(int isector, int iregion)
      Computes the barycenter coordinates of a given sector/region in the CLAS12 coordinate system.
      Parameters:
      isector -
      iregion -
      Returns:
    • createSector

      public Geant4Basic createSector(int isector, int iregion)
      Builds a single sector for a given region and returns its volume.
      Parameters:
      isector -
      iregion -
      Returns:
    • createSectorVolume

      protected Geant4Basic createSectorVolume(int isector, int iregion, MPGDTrapezoidGeant4Factory.SectorDimensions dimSect)
      Creates the main trapezoidal sector volume and places it in the world.
      Parameters:
      isector -
      iregion -
      dimSect -
      Returns:
    • populateSectorWithDetectorStructure

      protected void populateSectorWithDetectorStructure(Geant4Basic sectorVolume, int isector, int iregion, MPGDTrapezoidGeant4Factory.SectorDimensions dimSect)
      Fills the given sector volume with material sub-volumes according to the CCDB material structure (layer/component stack).Stacking is done along the local Z direction (thickness).
      Parameters:
      sectorVolume -
      isector -
      iregion -
      dimSect -