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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addElementToCalculate(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.String
getName()
JMadPlane
getPlane()
void
setEndSegmentMonitor(Element element)
Set the monitor at the ending of the segmentvoid
setIsCycleStartSegment(boolean isCycleStartSegment)
Define that this segments contains the start and end element of the circular machine.void
setStartSegmentMonitor(Element element)
Set the monitor at the beginning of the segmentboolean
update(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
- theElement
describing the monitor
-
setEndSegmentMonitor
void setEndSegmentMonitor(Element element)
Set the monitor at the ending of the segment- Parameters:
element
- theElement
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 totrue
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.
-
-