1 | title,'LHC Cell APERTURE exemple, BJ Aug2009'; |
---|
2 | |
---|
3 | REAL CONST ANGLE.MB = TWOPI/8/(23*6+2*2*4); |
---|
4 | |
---|
5 | REAL CONST l.MB = 14.30; |
---|
6 | REAL CONST l.MQ = 3.10; |
---|
7 | |
---|
8 | REAL CONST drift1 = 3.67; |
---|
9 | REAL CONST drift2 = 1.02; |
---|
10 | REAL CONST drift3 = 1.74; |
---|
11 | |
---|
12 | len_half_cell = l.MQ+drift1+3*l.MB+2*drift2+drift3; |
---|
13 | value, len_half_cell; |
---|
14 | |
---|
15 | !!!! apertures |
---|
16 | a=0.022; b=0.018; h=0.022; v=0.022; |
---|
17 | !!!! tolerances |
---|
18 | th=0.001; tv=0.0005; tr=0.001; |
---|
19 | |
---|
20 | MB: SBEND, L := l.MB, angle = ANGLE.MB; |
---|
21 | MQ: QUADRUPOLE, L := l.MQ, apertype=rectellipse,aperture = {a,b,h,v}, aper_tol = {th,tv,tr}; |
---|
22 | |
---|
23 | kqf = 0.008703550815; |
---|
24 | kqd = -0.008705002933; |
---|
25 | |
---|
26 | LHCCELL: SEQUENCE, refer = ENTRY, L = 2*len_half_cell; |
---|
27 | |
---|
28 | MQ1: MQ, k1:= kqf, at= 0.; |
---|
29 | |
---|
30 | MB1: MB, at= l.MQ+drift1 , |
---|
31 | apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr}; |
---|
32 | MB2: MB, at= l.MQ+drift1+l.mb+drift2, |
---|
33 | apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr}; |
---|
34 | MB3: MB, at= l.MQ+drift1+2*(l.mb+drift2), |
---|
35 | apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr}; |
---|
36 | |
---|
37 | MQ2: MQ, k1 := kqd, at= len_half_cell; |
---|
38 | |
---|
39 | MB4: MB, at= len_half_cell + l.MQ+drift1 , |
---|
40 | apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr}; |
---|
41 | MB5: MB, at= len_half_cell + l.MQ+drift1+l.mb+drift2, |
---|
42 | apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr}; |
---|
43 | MB6: MB, at= len_half_cell + l.MQ+drift1+2*(l.mb+drift2), |
---|
44 | apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr}; |
---|
45 | |
---|
46 | endsequence; |
---|
47 | |
---|
48 | beam,particle=proton,energy=450.0; |
---|
49 | |
---|
50 | set, format="9.5f"; |
---|
51 | use,period=LHCCELL; |
---|
52 | select, flag=twiss, clear; |
---|
53 | select, flag=twiss, column=name,s,l,betx,bety,alfx,alfy,dx,dpx,mux,muy,n1; |
---|
54 | twiss, sequence=LHCCELL; |
---|
55 | |
---|
56 | !!! uses default beam and halo data (lhc at injection) |
---|
57 | select, flag=aperture, clear; |
---|
58 | select, flag=aperture, column=name,s,betx,bety,dx,x,y,n1,apertype,xtol,ytol,rtol; |
---|
59 | aperture,offsetelem="offset.tfs",file="ap.tfs"; |
---|