forked from lhcopt/lhcmask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
submodule_04d_efcomp.madx
96 lines (86 loc) · 3.15 KB
/
submodule_04d_efcomp.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
print, text="";
print, text="";
print, text=" --- Submodule 4d: efcomp";
print, text=" ------------------------";
print, text="";
print, text="";
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! apply field errors to MB magnets
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if (on_errors_LHC==1){
call, file="errors/LHC/Efcomp_MB.madx" ;
};
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! correct orbit distortion resulting from MB magnets
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(on_errors_LHC==1 && (ON_A1S)^2+(ON_A1r)^2+(ON_B1S)^2+(ON_B1r)^2 >0){
exec, initial_micado(4);
exec, initial_micado(4);
};
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! apply field errors to all other magnets
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! Nominal LHC magnets
! Separation Dipoles
if (on_errors_LHC==1){
call, file="errors/LHC/Efcomp_MBRB.madx";
call, file="errors/LHC/Efcomp_MBRC.madx";
call, file="errors/LHC/Efcomp_MBRS.madx";
call, file="errors/LHC/Efcomp_MBX.madx" ;
call, file="errors/LHC/Efcomp_MBW.madx" ;
};
! Quadrupoles
if (on_errors_LHC==1){
ON_B2Saux=on_B2S;on_B2S=0;
call, file="errors/LHC/Efcomp_MQW.madx" ;
call, file="errors/LHC/Efcomp_MQTL.madx";
call, file="errors/LHC/Efcomp_MQMC.madx";
call, file="errors/LHC/Efcomp_MQX.madx" ;
if (off_errors_Q4_inIP15==1){
call, file="errors/LHC/Efcomp_MQY_noIP15.madx" ;
} else {
call, file="errors/LHC/Efcomp_MQY.madx" ;
};
call, file="errors/LHC/Efcomp_MQM.madx" ;
if (off_errors_Q5_inIP15==1){
call, file="errors/LHC/Efcomp_MQML_noIP15.madx";
} else {
call, file="errors/LHC/Efcomp_MQML.madx";
};
call, file="errors/LHC/Efcomp_MQ.madx" ;
on_B2S=ON_B2Saux;
};
if (on_errors_LHC==1){
call, file="errors/LHC/Set_alignment_errors.madx";
};
! New HL-LHC magnets
if (ver_hllhc_optics > 0 && on_errors_IT==1){
eoption,seed=myseed+101;
call, file="errors/HL-LHC/Efcomp_MQXFbody.madx"; ! new IT in IR1/5
call, file="errors/HL-LHC/Efcomp_MQXFends.madx";
};
if (ver_hllhc_optics > 0 && on_errors_D1==1){
eoption,seed=myseed+102;call, file="errors/HL-LHC/Efcomp_MBXAB.madx"; ! new D1 in IR1/5
};
if (ver_hllhc_optics > 0 && on_errors_D2==1){
if (correct_for_D2==1){
use_average_errors_MBRD=1; ! using average errors for correction algorithm
};
eoption,seed=myseed+103;call, file="errors/HL-LHC/Efcomp_MBRD.madx"; ! new D2 in IR1/5
};
if (ver_hllhc_optics > 0 && on_errors_Q4==1){
if (off_errors_Q4_inIP15==0){
call, file="errors/HL-LHC/Efcomp_MQY.madx"; ! old Q4 in IR1/5, but switched places around IP1-5
};
};
if (ver_hllhc_optics > 0 && on_errors_MCBXF==1){
eoption,seed=myseed+106;call, file="errors/HL-LHC/Efcomp_MCBXFAB.madx"; ! new triplet correctors in IR1/5
};
if (ver_hllhc_optics > 0 && on_errors_MBH==1){
ON_B2saux=on_B2s;on_B2s=0; ON_B2raux=on_B2r;on_B2r=0;
eoption,seed=myseed+107;call, file="errors/HL-LHC/Efcomp_MBH.madx";
on_B2s=ON_B2saux; on_B2r=ON_B2raux;
};
if (ver_hllhc_optics > 0 && on_errors_MCBRD==1){
eoption,seed=myseed+108;call, file="errors/HL-LHC/Efcomp_MCBRD.madx";
};