EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH

PTC_EPLACEMENT

USER MANUAL

SYNOPSIS


PTC_EPLACEMENT, 
range = [s, none],
x        = [r, 0], y       = [r, 0], z       = [r, 0],
phi      = [r, 0],
theta   = [r, 0], 
onlyposition    = [l, false, true] ,
onlyorientation = [l, false, true] ,
autoplacedownstream = [l, true, true] ,
refframe = [s, gcs] ; 


Description

Places a given element at required position and orientation. All rotations are made around the front face of the element.

Example

Dog leg chicane : postion of quads is matched to obtain required R566 value.

Command parameters and switches

range
string in range format,

Specifies name of the element to be moved.

x,y,z
real,

Coordinate of the front face of the magnet.

phi, theta
real,

polar (in xz plane, around z axis) and azimuthal (around x axis) angles, respectively.

refframe
string, default gcs

Defines the coordinate system with respect to which coordinates and angles are specified. Possible values are:

gcs
global coordinate system
current
current position
previouselement
end face of the previous element
onlyposition
logical, default false, if value explicitly not specified then true

If true, only translation are performed and orientation of the element is not changed.

onlyorientation
logical, default false, if value explicitly not specified then true

If true, only rotations are performed and position of the element is not changed.

autoplacedownstream
logical, default true,

if true all the elements downstream are placed at default positions in respect to the moved element, if false the rest of the layout stays untouched.

surveyall
logical, default true, if value explicitly not specified then true

If true, survey of all the line is performed after element placement at new position and orientation. It is implemented mainly for the software debugging purposes. If patching was performed correctly, the global survey should not change anything.

_

PROGRAMMERS MANUAL

The command is implemented pro_ptc_eplacement function in madxn.c and by subroutine ptc_eplacement() in madx_ptc_eplacement.f90.

Sopecified range is resolved with help of get_range command. Number of the element in the current sequence is resolved and passed as the parameter to the fortran routine. It allows to resolve uniquely the corresponding element in the PTC layout.

TRANSLATE_Fibre and ROTATE_Fibre routines of ptc are employed to place and orient an element in space. These commands adds rotation and translation from the current position. Hence, if the specified reference frame is other then "current", the element firstly needs to be placed at the center of the reference frame and then it is moved about the user specified coordinates.

After element placement at new position and orientation patch needs to be recomputed. If autoplacedownstream is false then patch to the next element is also recomputed. Otherwise, the layout is surveyed from the next element on, what places all the elements downstream with default position with respect to the moved element.

At the end all the layout is surveyed, if surveyall flag is true, what normally should always take place.