Module simpa.acc

Class AccSourceArrangement

java.lang.Object
simpa.acc.api.create.AccSourceArrangement
All Implemented Interfaces:
Comparable<AccElement>, AccElement

public class AccSourceArrangement extends Object implements AccElement
Class holding a collection of point sources. These sources reproduce the EM field of an accelerator element. It holds also the longitudinal position in the beam line and the name of the group this element belongs to.
  • Constructor Details

    • AccSourceArrangement

      public AccSourceArrangement(List<PointSource> poles, double scaling, String name, String groupName, double longiPos)
    • AccSourceArrangement

      public AccSourceArrangement(String filename, org.apache.commons.math3.geometry.euclidean.threed.Vector3D translation, org.apache.commons.math3.geometry.euclidean.threed.Rotation rotation, double scaling, String name, String groupName, double longiPos)
      Constructor for an accelerator element from a solution file. The the sources from 'elementname-SOLUTION.txt' file is read. Then the sources are scaled, rotated and translated.
      Parameters:
      filename - File named according to the file naming conventions.FileNamingConventions containing the sources.
      translation - Translation to be applied after the rotation.
      rotation - Rotation applied before the translation.
      scaling - scaling factor for the sources.
      name - Name of the element.
      groupName - Group name to which this element belongs to.
      longiPos - Longitudinal position of the element.
  • Method Details

    • getGroupName

      public String getGroupName()
      Returns:
      Name of the element group this element belongs to. The group is usually consist of all elements connected to the same power supply.
    • setGroupName

      public void setGroupName(String groupName)
      Parameters:
      groupName - Name of the element group this element belongs to. The group is usually consist of all elements connected to the same power supply.
    • getSourceArrangement

      public SourceArrangement getSourceArrangement()
      Returns:
      The point sources reproducing the field of this accelerator element.
    • setLongiPos

      public void setLongiPos(double longiPos)
      The longitudinal position of the element in the beam line. This is the distance from the beginning of the beam line to the element. The unit is meter. This is usually set when constcting the sequence, but when an element is importted from another sequence, for example a distubance from another magnet not in this sequence, the longiPos doesn't make sense. In this case the set it to NaN.
      Parameters:
      longiPos - Longitudinal position of the element in the beam line.
    • getLongitudinalPosition

      public double getLongitudinalPosition()
      Specified by:
      getLongitudinalPosition in interface AccElement
    • getType

      public AccElement.ElementType getType()
      Specified by:
      getType in interface AccElement
    • getName

      public String getName()
      Specified by:
      getName in interface AccElement