Interface Component

All Superinterfaces:
Showable, Transformable
All Known Implementing Classes:
AbstractComponent, AlertDCWire, ConcaveComponent, DriftChamberWire, MeshComponent, PrismaticComponent, RectangularComponent, ScintillatorMesh, ScintillatorPaddle, SiStrip, TrackerStrip

public interface Component extends Transformable, Showable
One sensing component of a detector.

An object implementing this interface represents single sensing component within a detector and provides access to essential geometry information about that component.

Factory: Factory
Hierarchy: DetectorSectorSuperlayerLayerComponent

Component contains a Point3D called midpoint which generally represents the geometric center of the Component but may be redefined as needed by specific kinds of Components.

Component also contains a double value called length that represents the length of the component. What this value measures is dependent on the type of component.

Componets are also enclosed in volume that are defined points, edges, and faces.

Author:
jnhankins
  • Method Details Link icon

    • getComponentId Link icon

      int getComponentId()
      Returns the component's id number.
      Returns:
      the id
    • getNumVolumePoints Link icon

      int getNumVolumePoints()
      Returns the number of points that define the volume.
      Returns:
      the number of volume points
    • getVolumePoint Link icon

      Point3D getVolumePoint(int p)
      Returns the point on the volume with the specified index.
      Parameters:
      p - the index of the point
      Returns:
      the point on the volume
    • getNumVolumeEdges Link icon

      int getNumVolumeEdges()
      Returns the number of edges between the points that define the volume.
      Returns:
      the number of volume edges
    • getVolumeEdge Link icon

      Line3D getVolumeEdge(int e)
      Returns the edge on the volume with the specified index.

      Though edges are returned as Line3D objects and a majority components have edges which are all straight line segments, edges are not required to be straight lines. The edge may, in reality, be curved, in which case the returned Line3D is merely storing the two points bounding a curved path segment. Thus, special care must be taken to ensure that the edge is in fact a straight line segment if one intends to use it as such.

      Parameters:
      e - the index of the edge
      Returns:
      the edge on the volume
    • getVolumeShape Link icon

      Shape3D getVolumeShape()
      Returns the volume of the component.

      A volume is represented by a Shape3D object which contains a list of triangular Face3D objects. This these triangles bound a closed closed volume.

      Returns:
      the volume
    • getVolumeCrossSection Link icon

      List<Line3D> getVolumeCrossSection(Transformation3D transformation)
      Returns the cross section of a plane through the the component's volume as a list of lines in the xy-plane.

      This method takes a Transformation3D object as an argument, then constructs a new Plane3D object in the xy-plane and applies the transformation to the plane. The intersection of the volume's shape with the transformed plane is then calculated and stored in a list of lines. The inverse of the transformation is then applied to each line in the list ensuring that each line in the returned list is in the xy-plane.

      Parameters:
      transformation - the transformation to apply to the plane
      Returns:
      a list of lines in the xy-plane representing the cross section
    • getVolumeIntersection Link icon

      boolean getVolumeIntersection(Line3D line, Point3D inIntersect, Point3D outIntersect)
      Returns true if the given line segment intersect the volume-shape twice (one incoming intersection and one out going) and stores the incoming and outgoing intersection points are stored in the first and second Point3D objects given as arguments respectively.

      The incoming intersection is defined such that the incoming intersection point is closer to the origin of the line than the outgoing intersection point.

      Parameters:
      line - the line segment
      inIntersect - the incoming intersection
      outIntersect - the outgoing intersection
      Returns:
      true if two intersections are found
    • getMidpoint Link icon

      Point3D getMidpoint()
      Returns the midpoint of this component. By convention, the midpoint of a component is normally the geometric center of the component's volume but the definition of midpoint may vary by component type.
      Returns:
      the midpoint
    • getLength Link icon

      double getLength()
      Returns the length of this component.
      Returns:
      the length
    • getType Link icon

      String getType()
      Returns a string that identifies the specific subtype of this component.
      Returns:
      a string naming this component's type
    • show Link icon

      void show()
      Invokes System.out.println(this).
      Specified by:
      show in interface Showable