java.lang.Object
simpa.acc.api.create.AccSourceArrangement
- All Implemented Interfaces:
Comparable<AccElement>
,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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface simpa.acc.api.create.AccElement
AccElement.ElementType
-
Constructor Summary
ConstructorsConstructorDescriptionAccSourceArrangement
(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.AccSourceArrangement
(List<PointSource> poles, double scaling, String name, String groupName, double longiPos) -
Method Summary
Modifier and TypeMethodDescriptiondouble
getName()
getType()
void
setGroupName
(String groupName) void
setLongiPos
(double longiPos) The longitudinal position of the element in the beam line.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface simpa.acc.api.create.AccElement
compareTo
-
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
- 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
- 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
- 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 interfaceAccElement
-
getType
- Specified by:
getType
in interfaceAccElement
-
getName
- Specified by:
getName
in interfaceAccElement
-