Package xal.smf

Class Ring

All Implemented Interfaces:
Comparable, ElementType, DataListener

public class Ring extends AcceleratorSeqCombo
Ring is a subclass of combo sequence that is intended to support the special needs of a Ring. A ring is made up of ring segments.
Author:
tap
  • Field Details

  • Constructor Details

  • Method Details

    • isLinear

      public boolean isLinear()
      Identify whether the sequence is within a linear section. This helps us to determine whether it is meaningful to identify one node as being downstream from another.
      Overrides:
      isLinear in class AcceleratorSeq
      Returns:
      false since by definition the ring is not a linear section
    • getRelativePosition

      public double getRelativePosition(double position, AcceleratorNode referenceNode)
      Convert the sequence position to a position relative to the specified reference node.
      Overrides:
      getRelativePosition in class AcceleratorSeq
      Parameters:
      position - the position of a location relative to the sequence's start
      referenceNode - the node relative to which we wish to get the position
    • getShortestRelativePosition

      public double getShortestRelativePosition(AcceleratorNode node, AcceleratorNode referenceNode)
      Get the shortest relative position of one node with respect to a reference node. This is really useful for ring sequences.
      Overrides:
      getShortestRelativePosition in class AcceleratorSeq
      Parameters:
      node - the node whose relative position is sought
      referenceNode - the reference node relative to which the node's position is calculated
      Returns:
      the distance (positive or negative) of the node with respect to the reference node whose magnitude is shortest