Class ApertureSlice
- java.lang.Object
-
- cern.accsoft.steering.jmad.domain.aperture.ApertureSlice
-
public class ApertureSlice extends java.lang.ObjectRepresents 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 PositionApertureSlice(AperType type, double aper1, double aper2, double aper3, double aper4, double pos)Create a new ApertureSlice and calculate the Aperture Extrema
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAper1()doublegetAper2()doublegetAper3()doublegetAper4()doublegetMax(JMadPlane plane)returns max value of the aperture in the given plane.doublegetMin(JMadPlane plane)returns the aperture minimum value in the given planedoublegetPos(JMadPlane plane)retrieves the trajectory-position for the given plane.doublegetS()AperTypegetType()doublegetX()doublegetXmax()doublegetXmin()doublegetY()doublegetYmax()doublegetYmin()booleansameAperInfo(ApertureSlice actSlice)Compares two aperture slicesvoidsetApertureValues(double aper1, double aper2, double aper3, double aper4)Calculate the Aperture Extrema for the Aperture Slice according to the type and the 4 Aperture ValuesvoidsetS(double posS)voidsetType(AperType type)voidsetX(double x)voidsetXmax(double xMax)voidsetXmin(double xMin)voidsetY(double y)voidsetYmax(double yMax)voidsetYmin(double yMin)
-
-
-
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-AperTypeof this Elementaper1- Aperture Value 1aper2- Aperture Value 2aper3- Aperture Value 3aper4- Aperture Value 4pos- 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 aper1aper2- the value of the madx-variable aper2aper3- the value of the madx-variable aper3aper4- 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:
truewhen type/position and all 4 ApertureValues are equal
-
getType
public AperType getType()
-
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
-
-