Interface OrbitSegmentCalculator

  • All Known Implementing Classes:
    SimpleOrbitSegmentCalculator

    public interface OrbitSegmentCalculator
    This interface encapsulates the calls required to configure an region where to interpolate the orbit.
    • Method Detail

      • getPlane

        JMadPlane getPlane()
        Returns:
        the JMadPlane this orbit segment calculator works on
      • setStartSegmentMonitor

        void setStartSegmentMonitor​(Element element)
        Set the monitor at the beginning of the segment
        Parameters:
        element - the Element describing the monitor
      • setEndSegmentMonitor

        void setEndSegmentMonitor​(Element element)
        Set the monitor at the ending of the segment
        Parameters:
        element - the Element describing the monitor
      • setIsCycleStartSegment

        void setIsCycleStartSegment​(boolean isCycleStartSegment)
        Define that this segments contains the start and end element of the circular machine.
        Parameters:
        isCycleStartSegment - set to true if segment contains start and end element.
      • addElementToCalculate

        void addElementToCalculate​(Element element)
        Add an element to this calculator. For each update with a new monitor reading the orbit will be calculated.
        Parameters:
        element - the element to add to the calculations in this segment
      • update

        boolean update​(Optic optic)
        Update the internal transfer matrices according to the optic provided.
        Parameters:
        optic - the optic to update from
        Returns:
        true if update was successful
      • calculate

        java.util.Map<Element,​java.util.Map<MadxTwissVariable,​java.lang.Double>> calculate​(Orbit orbit)
        Interpolate the orbit for all defined elements. In case something goes wrong an empty map is returned.
        Parameters:
        orbit - the orbit to interpolate from
        Returns:
        the mapping between [element, value mapping] for all elements defined in the segment for the plane defined by getPlane(). where value mapping may contain orbit and angle
      • getName

        java.lang.String getName()
        Returns:
        the name of the calculator.