Class AbstractTransferElement

All Implemented Interfaces:
Cloneable, ISimpleElement
Direct Known Subclasses:
AbstractMagnetElement, Aperture, Cavity

public abstract class AbstractTransferElement extends AbstractOpticalElement
Transfer elements are all elements that transfer electron beam. Their dimension in direction of electron beam is not zero.
Author:
igor@scictrl.com
  • Field Details

    • PR_LENGTH

      public static final int PR_LENGTH
      Constant PR_LENGTH=5
      See Also:
    • matrix

      protected TransferMatrix matrix
      Main transfer matrix.
    • matrices

      protected List<TransferMatrix> matrices
      Matrices which depend on this element for updates.
    • length

      protected double length
      Length of this element.
  • Constructor Details

    • AbstractTransferElement

      public AbstractTransferElement(String name)
      Constructs transfer element with specified name and default parameter's values.
      Parameters:
      name - a String name
    • AbstractTransferElement

      public AbstractTransferElement(String name, boolean virtual, double position, double relpos, String relFrom, double length)
      Constructs the AbstractTransferElement with specified parameters.
      Parameters:
      name - a String object
      virtual - a boolean
      position - a double
      relpos - a double
      relFrom - a String object
      length - a double
  • Method Details

    • clone

      public Object clone()
      Returns the clone of this element. Returns not initialized clone of this element. All data is copied to the clone. Returns not initialized clone of this element. All data is copied to the clone.

      clone.

      Specified by:
      clone in interface ISimpleElement
      Overrides:
      clone in class AbstractOpticalElement
      Returns:
      a Object the clone of this element.
      See Also:
    • getAlpha1

      public PositionedData getAlpha1()
      This method return machine function alpha in the beginning of the transfer element.
      Returns:
      a PositionedData object
    • getAlpha2

      public PositionedData getAlpha2()
      This method return machine function alpha in the end of the transfer element.
      Returns:
      a PositionedData object
    • getBeta1

      public PositionedData getBeta1()
      This method return machine function beta in the beginning of the transfer element.
      Returns:
      a PositionedData object
    • getBeta2

      public PositionedData getBeta2()
      This method return machine function beta in the end of the transfer element.
      Returns:
      a PositionedData object
    • getDispersion1

      public DispersionData getDispersion1()
      This method return machine function dispersion in the beginning of the transfer element.
      Returns:
      a DispersionData object
    • getDispersion2

      public DispersionData getDispersion2()
      This method return machine function dispersion in the end of the transfer element.
      Returns:
      a DispersionData object
    • getLength

      public double getLength()
      This method return length of the element.
      Returns:
      a double
    • getMatrix

      public TransferMatrix getMatrix()
      This method return transfer matrix of the element.
      Returns:
      a TransferMatrix object
      See Also:
    • getQ1

      public PositionedData getQ1()
      This method return normalised beam phase in teh beginning of the elemnet.
      Returns:
      a PositionedData object
    • getQ2

      public PositionedData getQ2()
      This method return normalised beam phase in teh end of the elemnet.
      Returns:
      a PositionedData object
    • newMatrix

      public TransferMatrix newMatrix()
      This method return transfer matrix of drift with the same length as this element.
      Returns:
      a TransferMatrix object
      See Also:
    • newMatrix

      public TransferMatrix newMatrix(double length)
      This method return transfer matrix of drift with the specified length.
      Parameters:
      length - a double
      Returns:
      a TransferMatrix object
      See Also:
    • setLength

      public void setLength(double value) throws IllegalStateException
      Sets the length of element. This operation is valid only when DataBush is in ACCESS_ALL_DATA mode, otherwize IllegalAccessException is thrown.
      Parameters:
      value - a double
      Throws:
      IllegalStateException - if any.
    • setWith

      public void setWith(Object[] par) throws IllegalStateException
      Sets parameters values of this element to those in parameter array. As parameter must be used such array as for dynamical construction of new instance of this class. Current values are overriden for each not null object in array.

      setWith.

      setWith.

      Overrides:
      setWith in class AbstractOpticalElement
      Parameters:
      par - an array of Object objects
      Throws:
      IllegalStateException - if element is initialized and inside DataBush.
      See Also:
    • toString

      public String toString()
      Returns the string representation of this element. Returns string describing this element. String is formated in input-file code. Returns a String that represents the value of this object.

      toString.

      Specified by:
      toString in interface ISimpleElement
      Overrides:
      toString in class AbstractOpticalElement
      See Also: