-
Notifications
You must be signed in to change notification settings - Fork 16
/
submodule_04e_correction.madx
62 lines (51 loc) · 2.35 KB
/
submodule_04e_correction.madx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
print, text="";
print, text="";
print, text=" --- Submodule 4e: correction";
print, text=" ----------------------------";
print, text="";
print, text="";
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! correction of field errors in MB (compatible with V6.503 & SLHC)
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
call, file="modules/submodule_04e_s1_synthesize_knobs.madx";
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! correction of triplet and D1 (only in collision, not compatible V6.503)
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if (ver_hllhc_optics > 0 && NRJ>5000.0000){
option, echo, warn, -info;
select, flag=error, clear;
select, flag=error, pattern=MQX, class=multipole;
select, flag=error, pattern=MBX, class=multipole;
!select, flag=error, pattern=MBRC, class=multipole;
if (correct_for_D2==1){
select, flag=error, pattern=MBRD, class=multipole;
};
if (correct_for_MCBX==1){
select, flag=error, pattern=MCBXF, class=multipole;
};
esave, file="temp/tripD1D2.errors";
system, "errors/HL-LHC/corr_tripD1_v6";
call, file="temp/MCX_setting.mad";
kcsx3.l2 :=0;kcsx3.r2 :=0;kcsx3.l8 :=0;kcsx3.r8 :=0; !switch off b3 correction in IR2 and IR8
kcox3.l2 :=0;kcox3.r2 :=0;kcox3.l8 :=0;kcox3.r8 :=0; !switch off b4 correction in IR2 and IR8
kctx3.l2 :=0;kctx3.r2 :=0;kctx3.l8 :=0;kctx3.r8 :=0; !switch off b6 correction in IR2 and IR8
kqsx3.l2 :=0;kqsx3.r2 :=0;kqsx3.l8 :=0;kqsx3.r8 :=0; !switch off a2 correction in IR2 and IR8
kcssx3.l2:=0;kcssx3.r2:=0;kcssx3.l8:=0;kcssx3.r8:=0; !switch off a3 correction in IR2 and IR8
kcosx3.l2:=0;kcosx3.r2:=0;kcosx3.l8:=0;kcosx3.r8:=0; !switch off a4 correction in IR2 and IR8
option, -echo;
};
! If the (averages of the) D2 errors were corrected: remove the average errors and assign the real errors of D2
if (ver_hllhc_optics > 0 && correct_for_D2==1){
if (on_errors_D2==1){
use_average_errors_MBRD=0;
call, file="errors/HL-LHC/D2_errortable_v5";
eoption,add=false;
eoption,seed=myseed+103;
call, file="errors/HL-LHC/Efcomp_MBRD.madx";
eoption,add=true;
};
};
! Add errors for the corrector magnets
if (ver_hllhc_optics > 0 && on_errors_NLC==1){
eoption,seed=myseed+200;call, file="errors/HL-LHC/Efcomp_NLC.madx";
};