Class Bend

All Implemented Interfaces:
Comparable, ElementType, MagnetType, DataListener

public class Bend extends Bend
Extends OpenXal Bend class with orientation and FringeField parameters.
Author:
Ivo List, Juan F. Esteban Müller <JuanF.EstebanMuller@esss.se>
  • Field Details

  • Constructor Details

    • Bend

      public Bend(String strId)
      Creates Bend with horizontal orientation.
      Parameters:
      strId - node id
    • Bend

      public Bend(String strId, ChannelFactory channelFactory)
      Creates Bend with horizontal orientation.
      Parameters:
      strId - node id
      channelFactory -
    • Bend

      public Bend(String strId, int orientation)
      Creates Bend with arbitrary orientation.
      Parameters:
      strId - node id
      orientation - orientation of the magnet, either HORIZONTAL or VERTICAL as defined by MagnetType.
    • Bend

      public Bend(String strId, int orientation, ChannelFactory channelFactory)
      Creates Bend with arbitrary orientation.
      Parameters:
      strId - node id
      orientation - orientation of the magnet, either HORIZONTAL or VERTICAL as defined by MagnetType.
      channelFactory -
  • Method Details

    • getType

      public String getType()
      Override to provide the correct type signature per instance. This is necessary since the Dipole class can represent more than one official type (DH or DV).
      Overrides:
      getType in class Bend
      Returns:
      The official type consistent with the naming convention.
    • setOrientation

      public void setOrientation(int orientation)
      Sets orientation of the magnet as defined by MagnetType.
      Parameters:
      orientation - orientation of the magnet, either HORIZONTAL or VERTICAL
    • getGap

      public double getGap()
      Returns:
      total gap of magnet (m)
    • setGap

      public void setGap(double value)
      Parameters:
      value - total gap of magnet (m)
    • getEntrK1

      public double getEntrK1()
      Returns:
      Upstream edge face Fringe-field factor (default = 0.45)
    • setEntrK1

      public void setEntrK1(double value)
      Parameters:
      value - Upstream edge face Fringe-field factor (default = 0.45)
    • getEntrK2

      public double getEntrK2()
      Returns:
      Upstream edge face Fringe-field factor (default = 2.80)
    • setEntrK2

      public void setEntrK2(double value)
      Parameters:
      value - Upstream edge face Fringe-field factor (default = 2.80)
    • getExitK1

      public double getExitK1()
      Returns:
      Downstream edge face Fringe-field factor (default = 0.45)
    • setExitK1

      public void setExitK1(double value)
      Parameters:
      value - Downstream edge face Fringe-field factor (default = 0.45)
    • getExitK2

      public double getExitK2()
      Returns:
      Downstream edge face Fringe-field factor (default = 2.80)
    • setExitK2

      public void setExitK2(double value)
      Parameters:
      value - Downstream edge face Fringe-field factor (default = 2.80)
    • getOrientation

      public int getOrientation()
      Get the orientation of the magnet as defined by MagnetType. The orientation of the dipole is determined by its type: DH or DV
      Specified by:
      getOrientation in interface MagnetType
      Overrides:
      getOrientation in class Bend
      Returns:
      One of HORIZONTAL or VERTICAL
    • isKindOf

      public boolean isKindOf(String type)
      Determine if this node is of the specified type. Override the default method since a dipole could represent either a vertical or horizontal type. Must also handle inheritance checking so we must or the direct type comparison with the inherited type checking.
      Specified by:
      isKindOf in interface ElementType
      Overrides:
      isKindOf in class AcceleratorNode
      Parameters:
      type - The type against which to compare this quadrupole's type.
      Returns:
      true if the node is a match and false otherwise.