Class ApertureSlice


  • public class ApertureSlice
    extends java.lang.Object
    Represents one slice of aperture in the aperture model. Such a slice is not necessarily equivalent with one element. In the contrary on element might have many slices.

    This class contains the original values as well as the calculated min/max values for the both planes. Additionaly the positions for a so-called reference trajectory are stored, around which the aperture can later be centered.

    • Constructor Summary

      Constructors 
      Constructor Description
      ApertureSlice​(AperType type, double pos)
      Create a new ApertureSlice only defined by its Type and Position
      ApertureSlice​(AperType type, double aper1, double aper2, double aper3, double aper4, double pos)
      Create a new ApertureSlice and calculate the Aperture Extrema
    • Constructor Detail

      • ApertureSlice

        public ApertureSlice​(AperType type,
                             double aper1,
                             double aper2,
                             double aper3,
                             double aper4,
                             double pos)
        Create a new ApertureSlice and calculate the Aperture Extrema
        Parameters:
        type - AperType of this Element
        aper1 - Aperture Value 1
        aper2 - Aperture Value 2
        aper3 - Aperture Value 3
        aper4 - Aperture Value 4
        pos - Position of this Element in the Sequence
      • ApertureSlice

        public ApertureSlice​(AperType type,
                             double pos)
        Create a new ApertureSlice only defined by its Type and Position
        Parameters:
        type - AperType of this Element
        pos - Position of this Element in the Sequence
    • Method Detail

      • getAper1

        public double getAper1()
      • getAper2

        public double getAper2()
      • getAper3

        public double getAper3()
      • getAper4

        public double getAper4()
      • setApertureValues

        public final void setApertureValues​(double aper1,
                                            double aper2,
                                            double aper3,
                                            double aper4)
        Calculate the Aperture Extrema for the Aperture Slice according to the type and the 4 Aperture Values
        Parameters:
        aper1 - the value of the madx-variable aper1
        aper2 - the value of the madx-variable aper2
        aper3 - the value of the madx-variable aper3
        aper4 - the value of the madx-variable aper4
      • sameAperInfo

        public boolean sameAperInfo​(ApertureSlice actSlice)
        Compares two aperture slices
        Parameters:
        actSlice - aperture slice to compare to this one
        Returns:
        true when type/position and all 4 ApertureValues are equal
      • setType

        public void setType​(AperType type)
      • getXmin

        public double getXmin()
      • setXmin

        public void setXmin​(double xMin)
      • getXmax

        public double getXmax()
      • setXmax

        public void setXmax​(double xMax)
      • getS

        public double getS()
      • setS

        public void setS​(double posS)
      • getYmin

        public double getYmin()
      • setYmin

        public void setYmin​(double yMin)
      • getYmax

        public double getYmax()
      • setYmax

        public void setYmax​(double yMax)
      • getX

        public double getX()
      • setX

        public void setX​(double x)
      • getY

        public double getY()
      • setY

        public void setY​(double y)
      • getPos

        public double getPos​(JMadPlane plane)
        retrieves the trajectory-position for the given plane. This is the position around which the aperture can be centered.
        Parameters:
        plane - the plane for which to get the position
        Returns:
        the position in the given plane
      • getMax

        public double getMax​(JMadPlane plane)
        returns max value of the aperture in the given plane.
        Parameters:
        plane - the plane for which to get the value
        Returns:
        the max aperture value in the given plane
      • getMin

        public double getMin​(JMadPlane plane)
        returns the aperture minimum value in the given plane
        Parameters:
        plane - the plane for which to retrieve the minimum value
        Returns:
        the aperture minimum value in the given plane