java.lang.Object
simpa.acc.api.utils.Survey
This utility class is for verification of a sequence against MAD-X SURVEY
command output.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
centersToFile
(String file) Writes the CERN coordinates calculated by the constructor to a file.void
orbitToFile
(String file)
-
Constructor Details
-
Survey
public Survey(Sequence seq, double x0, double y0, double z0, double theta0, double phi0, double psi0, String elementName) Construct a survey object from the given sequence and parameters. The center coordinates of each element will be rotated and translated and stored. The resulting coordinates can be later written to a file or compared to a MAD-X survey output file.- Parameters:
seq
- Sequence to be surveyed.x0
- Starting X coordinate in the cern coordinate system.y0
- Starting Y coordinate in the cern coordinate system.z0
- Starting Z coordinate in the cern coordinate system.theta0
- Rotation defined according to MAD-X manual p. 13phi0
- Rotation defined according to MAD-X manual p. 13psi0
- Rotation defined according to MAD-X manual p. 13elementName
- Name of the element in the simpa sequence where the mad-x coordinates and angles are given. It can be null, in that case the start of the simpa sequence is taken. The map returned by the getCenters() method will contain an entry with the elementName as a key and the value is a Vector3D object having the same x,y,z values as the x0,y0,z0 parameters.
-
-
Method Details
-
centersToFile
Writes the CERN coordinates calculated by the constructor to a file.- Parameters:
file
- Output file to be written.
-
orbitToFile
-
getCenters
- Returns:
- Get a map with the elements names as keys and center coordinates in the CERN coordinate system as values.
-