Interface OrbitSegmentCalculator
-
- All Known Implementing Classes:
SimpleOrbitSegmentCalculator
public interface OrbitSegmentCalculatorThis interface encapsulates the calls required to configure an region where to interpolate the orbit.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddElementToCalculate(Element element)Add an element to this calculator.java.util.Map<Element,java.util.Map<MadxTwissVariable,java.lang.Double>>calculate(Orbit orbit)Interpolate the orbit for all defined elements.java.lang.StringgetName()JMadPlanegetPlane()voidsetEndSegmentMonitor(Element element)Set the monitor at the ending of the segmentvoidsetIsCycleStartSegment(boolean isCycleStartSegment)Define that this segments contains the start and end element of the circular machine.voidsetStartSegmentMonitor(Element element)Set the monitor at the beginning of the segmentbooleanupdate(Optic optic)Update the internal transfer matrices according to the optic provided.
-
-
-
Method Detail
-
setStartSegmentMonitor
void setStartSegmentMonitor(Element element)
Set the monitor at the beginning of the segment- Parameters:
element- theElementdescribing the monitor
-
setEndSegmentMonitor
void setEndSegmentMonitor(Element element)
Set the monitor at the ending of the segment- Parameters:
element- theElementdescribing the monitor
-
setIsCycleStartSegment
void setIsCycleStartSegment(boolean isCycleStartSegment)
Define that this segments contains the start and end element of the circular machine.- Parameters:
isCycleStartSegment- set totrueif 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:
trueif 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.
-
-