APERTYPE | # of parameters | meaning of parameters |
---|---|---|
CIRCLE | 1 | radius |
ELLIPSE | 2 | horizontal half axis, vertical half axis |
RECTANGLE | 2 | half width and half height |
LHCSCREEN | 3 | half width, half height (of rect.) and radius (of circ.) |
MARGUERITE | 3 | half width, half height (of rect.) and radius (of circ.) |
RECTELLIPSE | 4 | half width, half height (of rectangle), horizontal half axis, vertical half axis (of ellipse) |
RACETRACK | 3 | horizontal, vertical shift, radius shift |
FILENAME | 0 | where the file contains a list of x and y coordinates outlining the shape. This option is only supported by the aperture module, see below. |
MB : SBEND, L := l.MB, APERTYPE=ELLIPSE, APERTURE={0.02202,0.02202};And an example for setting a FILENAME aperture for another magnet. Notice that no aperture parameters are needed.
MB: SBEND, L := 5, APERTYPE=myfile;The syntax of myfile should be like this:
x0 y0 xi yi ... xn ynNotes concerning the use of aperture:
select,flag=twiss,clear; select,flag=twiss,column=name,s,betx,alfx,mux,bety,alfy,muy,apertype,aper_1,aper_2;and a subsequent TWISS command will put the aperture information together with the specified TWISS parameters into the TWISS table.
Syntax: APER_TOL = {r, g, s}; MB : SBEND, L := l.MB, APER_TOL={1.5, 1.1, 0};
The minimum n1 for each element is written to the last Twiss table, to allow for matching by aperture.
file=filename, halofile=filename, pipefile=filename, range=range, exn=real, eyn=real, dqf=real, betaqfx=real, dp=real, dparx=real, dpary=real, cor=r, bbeat=real, nco=integer, halo={real,real,real,real}, interval=real spec=real, notsimple=logical, trueprofile=filename, offsetelem=filename;where the parameters have the following meaning:
magnet.name1 So X Y Si X Y Si X Y Sn X Y magnet.name2 So X Y Si X Y Si X Y Sn X Y etc.
!This is the start of the file. !Comments are made with exclamation marks. mb.a14r1.b1 0 0.0002 0.000004 7.15 1.4e-5 0.3e-3 14.3 0.0000000032 4e-6 !further comments can of course be added mq.22r1.b1 0 0.3e-5 1.332e-4 1.033 0.00034 0.3e-9 2.066 0 0.00e-2 3.1 4.232e-4 0.00000003 !This is the end of the file.
X_offs(s) = Ax*s^2 + Bx*s + Cxand
Y_offs(s) = Ay*s^2 + By*s + Cy. The coordinate systems are in meters.
reference.point magnet.name1 Ax Bx Cx Ay By Cy magnet.name2 Ax Bx Cx Ay By Cy etc.
!This is the start of the file. !First we give a reference point. The origin of the !coordinate system will be at the START of this element. mq.12r1.b1 !Then we give a list of elements and their displacement !w.r.t. the reference point. mcbxa.3l2 0 -2.56545 -3 0 -2.3443666 0 !The next nodes use the same reference point. !Elements offset w.r.t. another point must be given in another file, !together with the new reference point. mcbxa.3r2 0.3323 32.443355 -0.84 0.2522 32.554363 0.0 !This is the end of the file.
@ NAME %06s "OFFSET" @ TYPE %06s "OFFSET" @ REFERENCE %10s "mq.12r1.b1" * NAME S_IP X_OFF DX_OFF DDX_OFF Y_OFF DY_OFF DDY_OFF "mq.12r1.b1" 0.0 -3.0 -2.56545 0.0 0.0 -2.3443666 0.0 "mcbxa.3r2" 0.0 -0.84 32.443355 0.3323 0.0 32.554363 0.2522 A python script to convert a file from the old V.3.XX format to the new V4.xx can be found at : /afs/cern.ch/eng/lhc/optics/V6.503/aperture/convert_offsets.py usage : convert_offsets.py filenameAs an example we see in the picture below how the horizontal axes of elements m1 and m2 does not coincide with the reference trajectory.
X_tot(s) = X_ref(s) - X_offs(s)and
Y_tot(s) = Y_ref(s) - Y_offs(s)are taken into account in the aperture calculations.
The aperture module needs a Twiss table to operate on. It is important not to USE another period or sequence between the Twiss and aperture module calls, else aperture looses its table. One can choose the ranges for Twiss and aperture freely, they need not be the same.
use, period=lhcb1; select, flag=twiss,range=mb.a14r1.b1/mb.a17r1.b1,column=keyword,name,parent,k0l,k1l,s,betx,bety,n1; twiss, file=twiss.b1.data, betx=beta.ip1, bety=beta.ip1, x=+x.ip1, y=+y.ip1, py=+py.ip1; plot,haxis=s,vaxis=betx,bety,colour=100; select, flag=aperture, column=name,n1,x,dy; aperture, range=mb.b14r1.b1/mb.a17r1.b1, spec=5.235; plot,table=aperture,noline,vmin=0,vmax=10,haxis=s,vaxis=n1,spec,on_elem,style=100;
The select command can be
used to choose which columns to print in the output file.
Column names:
name, n1, n1x_m, n1y_m, apertype,
aper_1, aper_2, aper_3, aper_4,
rtol, xtol, ytol,
s, betx, bety, dx, dy, x, y,
on_ap, on_elem, spec
n1 is the maximum beam size in sigma, while n1x_m and n1y_m is the n1 values in si-units in the x- and y-direction.
aper_# means for all apertypes but racetrack:
aper_1 = half width rectangle
aper_2 = half heigth rectangle
aper_3 = half horizontal axis ellipse (or radius if circle)
aper_4 = half vertical axis ellipse
For racetrack, the aperture parameters will have the same meaning as the tolerances:
aper_1 and xtol = horizontal displacement of radial part
aper_2 and ytol = vertical displacement of radial part
aper_3 and rtol = radius
aper_4 = not used
On_elem indicates whether the node is an element or a drift, and on_ap whether it has a valid aperture. The Twiss parameters are the interpolated values used for aperture computation.
When one wants to plot the aperture, the table=aperture parameter is necessary. The normal line of hardware symbols along the top is not compatible with the aperture table, so it is best to include noline. Plot instead the column on_elem along the vaxis to have a simple picture of the hardware. Spec can be used for giving a limit value for n1, to have something to compare with on the plot. This example provides a plot,
where we see the n1, beta functions and the hardware symbolized by on_elem.