Class Segment

All Implemented Interfaces:
Serializable, Cloneable, Comparable<Segment>, Iterable<FittedHit>, Collection<FittedHit>, List<FittedHit>, RandomAccess

public class Segment extends ArrayList<FittedHit> implements Comparable<Segment>, Cloneable
A class to describe segment objects, where a Segment is a fitted cluster that has been pruned of hits with bad residuals
Author:
ziegler
See Also:
  • Field Details

    • isOnTrack

      public boolean isOnTrack
    • associatedCrossId

      public int associatedCrossId
  • Constructor Details

    • Segment

      public Segment(FittedCluster fCluster)
      Construct the segment from the fitted cluster.
      Parameters:
      fCluster - the fitted Cluster
  • Method Details

    • clone

      public Object clone()
      Overrides:
      clone in class ArrayList<FittedHit>
    • Status

      public final int Status()
    • get_fittedCluster

      public FittedCluster get_fittedCluster()
      Returns:
      the fitted cluster
    • set_fittedCluster

      public final void set_fittedCluster(FittedCluster _fittedCluster)
      Sets the fitted cluster
      Parameters:
      _fittedCluster - the fitted cluster
    • get_Sector

      public int get_Sector()
      Returns:
      the segment sector (1...6)
    • set_Sector

      public void set_Sector(int _Sector)
      Sets the segment sector
      Parameters:
      _Sector - the segment sector (1...6)
    • get_Superlayer

      public int get_Superlayer()
      Returns:
      the segment superlayer (1...6)
    • set_Superlayer

      public void set_Superlayer(int _Superlayer)
      Sets the superlayer
      Parameters:
      _Superlayer - the superlayer (1...6)
    • get_Id

      public int get_Id()
      Returns:
      the segment ID, where the id corresponds to the index in the sequence of found segments
    • set_Id

      public void set_Id(int _Id)
      Sets the segment ID
      Parameters:
      _Id - the segment ID
    • get_Region

      public int get_Region()
      Returns:
      region (1...3)
    • get_RegionSlayer

      public int get_RegionSlayer()
      Returns:
      superlayer 1 or 2 in region (1...3)
    • get_ResiSum

      public double get_ResiSum()
      Returns:
      sum of residuals for all hits in segment
    • set_ResiSum

      public void set_ResiSum(double _ResiSum)
      Parameters:
      _ResiSum - sum of residuals for all hits in segment
    • get_TimeSum

      public double get_TimeSum()
      Returns:
      sum of the corrected (T0-subtracted) times of all hits in segment
    • set_TimeSum

      public void set_TimeSum(double _TimeSum)
      Parameters:
      _TimeSum - sum of the corrected (T0-subtracted) times of all hits in segment
    • isCloseTo

      public boolean isCloseTo(Segment otherseg)
      Parameters:
      otherseg - matching cluster in other superlayer in a region
      Returns:
      a region-segment proximity condition
    • hasNoMatchingSegment

      public boolean hasNoMatchingSegment(List<Segment> othersegs)
    • hasConsistentSlope

      public boolean hasConsistentSlope(Segment otherseg)
    • getAvgwire

      public double getAvgwire()
      Returns:
      the average wire number for the segment (this is used in the proximity condition employed in segment matching)
    • get_fitPlane

      public Plane3D get_fitPlane()
      Returns:
      the plane containing the segment fitted-line representation
    • set_SegmentEndPointsSecCoordSys

      public void set_SegmentEndPointsSecCoordSys(DCGeant4Factory DcDetector)
      Sets the segment endpoints in the sector coordinate system for ced display
      Parameters:
      DcDetector -
    • set_fitPlane

      public void set_fitPlane(DCGeant4Factory DcDetector)
      Sets the plane containing the segment fitted-line representation
      Parameters:
      DcDetector -
    • get_SegmentEndPoints

      public double[] get_SegmentEndPoints()
    • set_SegmentEndPoints

      public void set_SegmentEndPoints(double[] _SegmentEndPoints)
    • get_Trajectory

      public SegmentTrajectory get_Trajectory()
      Returns:
      segment trajectory
    • set_Trajectory

      public void set_Trajectory(SegmentTrajectory _Trajectory)
      Parameters:
      _Trajectory - segment trajectory
    • get_Status

      public int get_Status()
      Returns:
      word describing segment status (not yet used)
    • set_Status

      public final void set_Status(int _Status)
      Parameters:
      _Status - segment status word
    • printInfo

      public String printInfo()
      Returns:
      the segment info.
    • compareTo

      public int compareTo(Segment arg)
      Specified by:
      compareTo in interface Comparable<Segment>