Class IdealMagSkewQuad3

All Implemented Interfaces:
IElectromagnet, IComponent, IElement

public class IdealMagSkewQuad3 extends ThickElectromagnet

Represents a "skewed" ideal quadrupole magnet. Such a device is a quadrupole magnet which is rolled about the beam axis by 45°. It is a corrective device which is meant to be driven with a bipolar supply. Thus, the sign of the magnetic field parameter (see ThickElectromagnet.setMagField(double)) can be either positive or negative

Looking down the beam axis toward a "skew quadrupole", a positive "skew" angle means the element is rotated clockwise by 45°. (This convention is consistent with the Tait-Bryan angles of aerospace engineering.)

Note that the action of a rotated element on phase space is also a rotation of the beam coordinates, but in the opposing direction. Thus, if this element is to be represented simply as a rotated IdealMagQuad element, then the coordinate rotation angles should negative that of the elements rotation angles.

With respect to the IdealMagQuad class, this class has one less parameter, the setOrientation() parameter. This condition results from the fact that skew quadrupole hardware objects can be driven in either direction (i.e., they have bipolar power supplies). Thus, the skew angle for any IdealMagSkewQuad3 object is always the same. Driving the device with a negative supply (see ThickElectromagnet.setMagField(double)) in effect changes its "orientation."

Specifically,

- A (+45°) skew quadrupole driven with a positive field focuses in the 2nd and 4th quadrants.
- A (+45°) skew quadrupole driven with a negative field focuses in the 1st and 3rd quadrants.

NOTES:

Since:
Mar 13, 2008
Author:
Christopher K. Allen
See Also:
  • xal.model.elem#IdealMagQuad
  • xal.model.elem#CoordinateRotation
  • Field Details

    • STR_TYPE_ID

      public static final String STR_TYPE_ID
      string type identifier for all IdealMagSectorDipole objects
      See Also:
    • DBL_SKEW_ANGLE

      public static final double DBL_SKEW_ANGLE
      The roll angle defining the skew (in radians)
      See Also:
    • INT_ORIENT

      public static final int INT_ORIENT
      orientation of the internal IdealMagQuad object
      See Also:
  • Constructor Details

    • IdealMagSkewQuad3

      public IdealMagSkewQuad3(String strId, double dblFld, double dblLen)
      Creates a new, initialized instance of IdealMagSkewQuad3. The length and field strength are set to the given values.
      Parameters:
      strId - string identifier for this element
      dblFld - field gradient strength (in Tesla/meter)
      dblLen - length of the skew quadrupole body
      Since:
      Mar 14, 2008
    • IdealMagSkewQuad3

      public IdealMagSkewQuad3(String strId)
      Create new, uninitialized IdealMagSkewQuad3 object. Use this constructor with caution as the length of the magnet is uninitialized.
      Since:
      Mar 14, 2008
    • IdealMagSkewQuad3

      public IdealMagSkewQuad3()
      Create new, uninitialized IdealMagSkewQuad3 object. Use this constructor with caution as the length of the magnet is uninitialized.
      Since:
      Mar 14, 2008
  • Method Details

    • toBeamFrame

      public static PhaseMatrix toBeamFrame(PhaseMatrix matQuad)

      toBeamFrame

      Converts a linear transform (represented as a PhaseMatrix object) from its representation in the magnet coordinates to its representation in the beam frame phase coordinates.

      Parameters:
      matQuad - linear transform in natural quadrupole magnet representation
      Returns:
      linear transform in beam frame phase coordinates representation
      Since:
      Mar 13, 2008
    • getSkewAngle

      public double getSkewAngle()

      Get the skew angle of the quadrupole magnet. For a description of this parameter see IdealMagSkewQuad3.

      Note that this parameter is fixed to the value of DBL_SKEW_ANGLE.

      Returns:
      skew angle about the beam axis (in radians)
      See Also:
    • getOrientation

      public int getOrientation()

      Return the enumeration code specifying the focusing orientation of the quadrupole. Note that the orientation of an IdealMagSkewQuad3 object cannot change. Thus, this method will always return the value IElectromagnet.ORIENT_NONE

      NOTE:
      The magnet orientation property has no effect upon the operation of the modeling element. This method is needed to satisfy the IElectromagnet interface, which should be re-designed because of this fact.

      Specified by:
      getOrientation in interface IElectromagnet
      Overrides:
      getOrientation in class ThickElectromagnet
      Returns:
      the value IElectromagnet.ORIENT_NONE
    • setOrientation

      public void setOrientation(int enmOrient)

      NOTE:
      This method has no effect. It is needed to satisfy the IElectromagnet interface, which should be re-designed because of this fact.

      Normally this method sets the quadrupole magnet focusing orientation, as required by the IElectromagnet interface.

      Specified by:
      setOrientation in interface IElectromagnet
      Overrides:
      setOrientation in class ThickElectromagnet
      Parameters:
      enmOrient - focusing orientation enumeration code (not used)
      See Also:
    • elapsedTime

      public double elapsedTime(IProbe probe, double dblLen)
      Returns the time taken for the probe to drift through part of the element.
      Specified by:
      elapsedTime in interface IElement
      Specified by:
      elapsedTime in class ThickElement
      Parameters:
      probe - propagating probe
      dblLen - length of subsection to propagate through meters
      Returns:
      the elapsed time through sectionUnits: seconds
      Since:
      Mar 13, 2008
      See Also:
    • energyGain

      public double energyGain(IProbe probe, double dblLen)
      Return the energy gain imparted to a particular probe. For an ideal quadrupole magnet this value is always zero.
      Specified by:
      energyGain in interface IElement
      Specified by:
      energyGain in class ThickElement
      Parameters:
      probe - dummy argument
      dblLen - dummy argument
      Returns:
      returns a zero value
      Since:
      Mar 13, 2008
      See Also:
    • transferMap

      public PhaseMap transferMap(IProbe probe, double length)
      Compute the partial transfer map of an ideal quadrupole for the particular probe. Computes transfer map for a section of quadrupole dblLen meters in length.
      Specified by:
      transferMap in interface IElement
      Specified by:
      transferMap in class ThickElement
      Parameters:
      probe - supplies the charge, rest and kinetic energy parameters
      length - compute transfer matrix for section of this length
      Returns:
      transfer map of ideal quadrupole for particular probe
      Since:
      Mar 13, 2008
      See Also:
    • print

      public void print(PrintWriter os)
      Dump current state and content to output stream.
      Overrides:
      print in class Element
      Parameters:
      os - output stream object