Package cnuphys.snr

Class SNRCluster

java.lang.Object
cnuphys.snr.SNRCluster

public class SNRCluster extends Object
Author:
heddle A cluster candidate is a list of wires with the requirement that there are no more than two wires in a given layer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The number of layers, probably 6
    final int
    The number of wires, probably 112
    a list for the segment starting points.
    final WireList[]
    one wirelist for each layer
  • Constructor Summary

    Constructors
    Constructor
    Description
    SNRCluster(int numLayers, int numWires)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int layer, int wire)
    Add a wire to the wire list for a given layer.
    void
    addSegmentStart(int wire)
    Add a segment (candidate) start wire
    void
    This removes wires from the wire list if there are more than two in a given layer.
    void
    Clear the wire lists.
    void
    This computes slope and intercept a line using the layer as the X value and the average wire number as the Y so a slope of 0 looks "vertical".
    double
    Get the slope of the linear fit
    double
    getWirePosition(int layer)
    Used to draw a linear fit to the cluster
    boolean
    The given cluster is a subset of this cluster if all wirelists are subsets
    void
     
    String representation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • numLayers

      public final int numLayers
      The number of layers, probably 6
    • numWires

      public final int numWires
      The number of wires, probably 112
    • segmentStartList

      public final SegmentStartList segmentStartList
      a list for the segment starting points.
    • wireLists

      public final WireList[] wireLists
      one wirelist for each layer
  • Constructor Details

    • SNRCluster

      public SNRCluster(int numLayers, int numWires)
      Parameters:
      numLayers - the number of layers, for CLAS12 6
      numWires - the number of wires, for CLAS12 112
  • Method Details

    • add

      public void add(int layer, int wire)
      Add a wire to the wire list for a given layer. The wireList will enforce no duplicates, but will keep repeat count
      Parameters:
      layer - the zero-based layer, for CLAS12 [0..5]
      wire - the zero-based wire, for CLAS12 [0..111]
    • addSegmentStart

      public void addSegmentStart(int wire)
      Add a segment (candidate) start wire
      Parameters:
      wire - the zero-based wire, for CLAS12 [0..111]
      numMissing - the number of missing layers required
    • clear

      public void clear()
      Clear the wire lists. So the object can be reused, but only for the same sector, superlayer, and numLayers
    • toString

      public String toString()
      String representation
      Overrides:
      toString in class Object
      Returns:
      a String representation of the cluster
    • packData

      public void packData(NoiseReductionParameters params)
    • getSlope

      public double getSlope()
      Get the slope of the linear fit
      Returns:
    • clean

      public void clean()
      This removes wires from the wire list if there are more than two in a given layer.
    • computeLine

      public void computeLine()
      This computes slope and intercept a line using the layer as the X value and the average wire number as the Y so a slope of 0 looks "vertical". We do it this way to avoid the possibility of an infinite slope.
    • getWirePosition

      public double getWirePosition(int layer)
      Used to draw a linear fit to the cluster
      Parameters:
      layer - the layer
      Returns:
      the wire position as a real (with fractional part)
    • hasSubset

      public boolean hasSubset(SNRCluster c)
      The given cluster is a subset of this cluster if all wirelists are subsets
      Parameters:
      c - the given cluster
      Returns:
      true if the given cluster is a subset of this cluster