source: PSPA/madxPSPA/tests/test-cororbit-2/test-cororbit-2.madx @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 5.6 KB
Line 
1Option,  warn,info,echo;
2Title, "LHC 6.503 with errors and two beam orbit correction using MADX";
3
4// CALL IN SELECTION, SEQUENCE and OPTICS FILES;
5Option, -echo,-warn,-info;
6
7call, file = "../share/LHC/LHCRing/V6.503/V6.5.seq";
8call, file = "../share/LHC/LHCRing/V6.503/V6.5.coll.str";
9
10option,warn,echo;
11
12Beam, particle=proton, sequence=lhcb1, energy=7000.0, NPART=1.05E11, sige=4.5e-4;
13Beam, particle=proton, sequence=lhcb2, energy=7000.0, NPART=1.05E11, sige=4.5e-4, bv=-1;
14! the 'bv' parameter indicates that beam2 rotates counter-clockwise
15
16// Removing classes of correctors
17select, flag=seqedit, clear;
18select, flag=seqedit, class=MU;
19select, flag=seqedit, class=MKI;
20select, flag=seqedit, class=MKI__192;
21select, flag=seqedit, class=MKI__193;
22select, flag=seqedit, class=MKA;
23select, flag=seqedit, class=MKD;
24select, flag=seqedit, class=MKQ;
25select, flag=seqedit, class=MKQA;
26select, flag=seqedit, class=MSDA;
27select, flag=seqedit, class=MSDB;
28select, flag=seqedit, class=MSDB2;
29select, flag=seqedit, class=MSDC;
30select, flag=seqedit, class=MSIA;
31select, flag=seqedit, class=MSIB;
32select, flag=seqedit, class=MCBV;
33select, flag=seqedit, class=MCBH;
34select, flag=seqedit, class=MCBCA;
35select, flag=seqedit, class=MCBCB;
36select, flag=seqedit, class=MCBCC;
37select, flag=seqedit, class=MCBCD;
38select, flag=seqedit, class=MCBCH;
39select, flag=seqedit, class=MCBCV;
40select, flag=seqedit, class=MCBYA;
41select, flag=seqedit, class=MCBYB;
42select, flag=seqedit, class=MCBYH;
43select, flag=seqedit, class=MCBYV;
44select, flag=seqedit, class=MCBWH;
45select, flag=seqedit, class=MCBWV;
46seqedit, sequence=lhcb1;
47remove, element=selected;
48seqedit, sequence=lhcb2;
49remove, element=selected;
50endedit;
51
52select, flag=seqedit, clear;
53select, flag=seqedit, class=MBXWH;
54select, flag=seqedit, class=MBXWS;
55select, flag=seqedit, class=MBXWT;
56select, flag=seqedit, class=MBAW;
57select, flag=seqedit, class=MBLW;
58select, flag=seqedit, class=MBWMD;
59seqedit, sequence=lhcb1;
60remove, element=selected;
61seqedit, sequence=lhcb1;
62remove, element=selected;
63seqedit, sequence=lhcb2;
64remove, element=selected;
65seqedit, sequence=lhcb2;
66remove, element=selected;
67endedit;
68
69// assign alignment errors in ring 1 and ring 2 at Q1
70Use, period=lhcb2;
71Select, flag=ERROR, clear;
72Select, flag=ERROR, range=MQXA.1L1;
73ealign, dy:=0.100e-3, dx:=0.070e-3;
74Select, flag=ERROR, clear;
75Select, flag=ERROR, range=MQXA.1R5;
76ealign, dy:=0.050e-3, dx:=0.035e-3;
77Use, period=lhcb1;
78Select, flag=ERROR, clear;
79Select, flag=ERROR, range=MQXA.1L1;
80ealign, dy:=0.100e-3, dx:=0.070e-3;
81Select, flag=ERROR, clear;
82Select, flag=ERROR, range=MQXA.1R5;
83ealign, dy:=0.050e-3, dx:=0.035e-3;
84
85// enable only MCBX at Q1
86 USEKICK,CLASS=mcbx, status=OFF;
87 USEKICK,CLASS=mcbxv, status=OFF;
88 USEKICK,CLASS=mcbxh, status=OFF;
89 USEKICK,CLASS=mcbxa, status=OFF;
90 USEKICK,class=mbxws, status=OFF;
91 USEKICK,class=mbxwt, status=OFF;
92 USEKICK,class=mbaw, status=OFF;
93 USEKICK,class=mbwmd, status=OFF;
94!USEKICK,RANGE=mcbx.3l1, status=ON;
95!USEKICK,RANGE=mcbx.3r1, status=ON;
96!USEKICK,RANGE=mcbx.3l5, status=ON;
97!USEKICK,RANGE=mcbx.3r5, status=ON;
98!USEKICK,RANGE=mcbx.2l1, status=ON;
99!USEKICK,RANGE=mcbx.2r1, status=ON;
100!USEKICK,RANGE=mcbx.2l5, status=ON;
101!USEKICK,RANGE=mcbx.2r5, status=ON;
102!USEKICK,RANGE=mcbx.1l1, status=ON;
103!USEKICK,RANGE=mcbx.1r1, status=ON;
104!USEKICK,RANGE=mcbx.1l5, status=ON;
105!USEKICK,RANGE=mcbx.1r5, status=ON;
106 USEKICK,RANGE=mcbxv.3l1, status=ON;
107 USEKICK,RANGE=mcbxv.3r1, status=ON;
108 USEKICK,RANGE=mcbxv.2l1, status=ON;
109 USEKICK,RANGE=mcbxv.2r1, status=ON;
110 USEKICK,RANGE=mcbxv.1l1, status=ON;
111 USEKICK,RANGE=mcbxv.1r1, status=ON;
112 USEKICK,RANGE=mcbxv.3l5, status=ON;
113 USEKICK,RANGE=mcbxv.2l5, status=ON;
114 USEKICK,RANGE=mcbxv.1l5, status=ON;
115 USEKICK,RANGE=mcbxv.1r5, status=ON;
116 USEKICK,RANGE=mcbxh.3l1, status=ON;
117 USEKICK,RANGE=mcbxh.3r1, status=ON;
118 USEKICK,RANGE=mcbxh.2l1, status=ON;
119 USEKICK,RANGE=mcbxh.2r1, status=ON;
120 USEKICK,RANGE=mcbxh.1l1, status=ON;
121 USEKICK,RANGE=mcbxh.1r1, status=ON;
122 USEKICK,RANGE=mcbxh.3l5, status=ON;
123 USEKICK,RANGE=mcbxh.2l5, status=ON;
124 USEKICK,RANGE=mcbxh.1l5, status=ON;
125 USEKICK,RANGE=mcbxh.1r5, status=ON;
126
127// calculate TWISS table for correction, beam 1
128on_x1 = 0.0;
129on_x2 = 0.0;
130on_x5 = 0.0;
131on_x8 = 0.0;
132on_sep1 = 0.0;
133on_sep2 = 0.0;
134on_sep5 = 0.0;
135on_sep8 = 0.0;
136on_alice = 0.0;
137on_lhcb = 0.0;
138select, flag=twiss, clear;
139select, flag=twiss, column=name,s,x,px,y,py,betx,bety,alfx,alfy;
140TWISS,table=twb1,sequence=lhcb1;
141!plot,table=twb1,title="Orbit ..L1..before",vmin=-0.005,vmax=0.005,noline=true,haxis=s,vaxis=x;
142
143coption,print=1;
144!CORRECT, FLAG=ring,
145!         MODE=micado,cond=0,NCORR=  1,ERROR=1E-6,PLANE=y,
146!         mlist='my1.tab',clist='cy1.tab', RESOUT=1,corzero=1;
147
148USEKICK,RANGE=mcbxv.1l5, status=ON;
149
150// calculate TWISS table for correction, beam 2
151on_x1 = 0.0;
152on_x2 = 0.0;
153on_x5 = 0.0;
154on_x8 = 0.0;
155on_sep1 = 0.0;
156on_sep2 = 0.0;
157on_sep5 = 0.0;
158on_sep8 = 0.0;
159on_alice = 0.0;
160on_lhcb = 0.0;
161select, flag=twiss, clear;
162select, flag=twiss, column=name,s,x,px,y,py,betx,bety,alfx,alfy;
163TWISS,table=twb2,sequence=lhcb2;
164!plot,table=twb2,title="Orbit ..L2..before",vmin=-0.005,vmax=0.005,noline=true,haxis=s,vaxis=x;
165
166CORRECT, FLAG=ring,
167         tworing,beam1tab=twb1,beam2tab=twb2,
168         MODE=micado,cond=0,NCORR=  4,ERROR=1E-6,PLANE=x,
169         mlist='mx12.tab',clist='cx12.tab', RESOUT=1,corzero=1;
170
171select, flag=twiss, clear;
172select, flag=twiss, column=name,s,x,px,y,py,betx,bety,alfx,alfy;
173TWISS,sequence=lhcb1;
174!plot,title="Orbit ..L1..after",vmin=-0.005,vmax=0.005,noline=true,haxis=s,vaxis=x;
175
176select, flag=twiss, clear;
177select, flag=twiss, column=name,s,x,px,y,py,betx,bety,alfx,alfy;
178TWISS,sequence=lhcb2;
179!plot,title="Orbit ..L2..after",vmin=-0.005,vmax=0.005,noline=true,haxis=s,vaxis=x;
180
Note: See TracBrowser for help on using the repository browser.