source: MML/trunk/machine/SOLEIL/StorageRing/Lattices/solamor2lin.m_56corr @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 6.3 KB
Line 
1function soleilamor2lin
2%solamor2 - soleil lattice w/o ID
3% Lattice definition file
4% Lattice for SOLEIL: perfect lattice no magnetic errors
5% Compiled by Laurent Nadolski and Amor Nadji
6% 09/01/02, ALS
7% Controlroom : set linearpass for quad (closed orbit)
8
9global FAMLIST THERING GLOBVAL
10
11GLOBVAL.E0 = 2.75e9; % Ring energy
12GLOBVAL.LatticeFile = mfilename;
13FAMLIST = cell(0);
14
15disp(['** Loading SOLEIL magnet lattice ', mfilename]);
16
17L0 = 354.0967211999983;      % design length [m]
18C0 = 2.99792458e8;           % speed of light [m/s]
19HarmNumber = 416;
20
21%% Cavity
22%              NAME   L     U[V]       f[Hz]          h        method       
23CAV = rfcavity('RF' , 0 , 4.0e+6 , HarmNumber*C0/L0, ...
24               HarmNumber ,'ThinCavityPass');   
25
26%% Marker and apertures
27   SECT1  =  marker('SECT1', 'IdentityPass');
28   SECT2  =  marker('SECT2', 'IdentityPass');
29   SECT3  =  marker('SECT3', 'IdentityPass');
30   SECT4  =  marker('SECT4', 'IdentityPass');
31   DEBUT  =  marker('DEBUT', 'IdentityPass');
32   FIN    =  marker('FIN', 'IdentityPass');
33   
34   INJ = aperture('INJ',[-0.035 0.035 -0.04 0.04],'AperturePass');
35
36% BPM   
37   BPM    =  marker('BPM', 'IdentityPass');
38
39% DRIFT SPACES
40   SD13= drift('SD13', 3.48255, 'DriftPass');
41   SD1 = drift('SD1',  6.00000, 'DriftPass');
42   SD2 = drift('SD2',  0.39000, 'DriftPass');
43   SD3 = drift('SD3',  0.20000, 'DriftPass');
44   SD4 = drift('SD4',  0.39000, 'DriftPass');
45   SD14= drift('SD14', 0.59000, 'DriftPass');
46   SD5 = drift('SD5',  0.20000, 'DriftPass');
47   SD6 = drift('SD6',  0.79000, 'DriftPass');
48   SD7 = drift('SD7',  0.44000, 'DriftPass');
49   SD8 = drift('SD8',  0.20000, 'DriftPass');
50   SD9 = drift('SD9',  0.47634, 'DriftPass');
51   SD10= drift('SD10', 0.47000, 'DriftPass');
52   SD12= drift('SD12', 0.47000, 'DriftPass');
53   SDAC= drift('SDAC', 1.90468, 'DriftPass');
54   
55% QUADRUPOLES
56Q1   =  quadrupole('Q1' , 0.32,  -1.18610 , 'QuadLinearPass');
57Q2   =  quadrupole('Q2' , 0.46,   1.71132 , 'QuadLinearPass');
58Q3   =  quadrupole('Q3' , 0.32,  -0.71729 , 'QuadLinearPass');
59Q4   =  quadrupole('Q4' , 0.32,  -1.39423 , 'QuadLinearPass');
60Q5   =  quadrupole('Q5' , 0.32,   1.89119 , 'QuadLinearPass');
61Q6   =  quadrupole('Q6' , 0.32,  -1.11831 , 'QuadLinearPass');
62Q7   =  quadrupole('Q7' , 0.46,   2.21705 , 'QuadLinearPass');
63Q8   =  quadrupole('Q8' , 0.32,  -1.70205 , 'QuadLinearPass');
64Q9   =  quadrupole('Q9' , 0.32,  -1.68903 , 'QuadLinearPass');
65Q10  =  quadrupole('Q10', 0.32,   1.96186 , 'QuadLinearPass');
66
67
68% SEXTUPOLES for xix=0.4 and xi_y=1.4
69F = 1e8;
70Finv = 1/F;
71
72S1  =  sextupole('S1' , Finv,  1.71919*F, 'StrMPoleSymplectic4Pass');
73S2  =  sextupole('S2' , Finv, -4.10456*F, 'StrMPoleSymplectic4Pass');
74S3  =  sextupole('S3' , Finv, -2.16938*F, 'StrMPoleSymplectic4Pass');
75S4  =  sextupole('S4' , Finv,  3.60465*F, 'StrMPoleSymplectic4Pass');
76S5  =  sextupole('S5' , Finv, -3.69821*F, 'StrMPoleSymplectic4Pass');
77S6  =  sextupole('S6' , Finv,  3.24667*F, 'StrMPoleSymplectic4Pass');
78S7  =  sextupole('S7' , Finv, -5.00352*F, 'StrMPoleSymplectic4Pass');
79S8  =  sextupole('S8' , Finv,  4.19372*F, 'StrMPoleSymplectic4Pass');
80S9  =  sextupole('S9' , Finv, -2.97623*F, 'StrMPoleSymplectic4Pass');
81S10 =  sextupole('S10', Finv,  1.86108*F, 'StrMPoleSymplectic4Pass');
82
83% Slow feedback correctors
84HCOR =  corrector('HCOR',0.0,[0 0],'CorrectorPass');
85VCOR =  corrector('VCOR',0.0,[0 0],'CorrectorPass');
86
87% Fast feedback correctors
88FHCOR =  corrector('FHCOR',0.0,[0 0],'CorrectorPass');
89FVCOR =  corrector('FVCOR',0.0,[0 0],'CorrectorPass');
90
91% DIPOLES
92BEND  =  rbend('BEND'  , 1.05243,  ...
93            0.19635, 0.098175, 0.098175, 0.0,'BendLinearPass');
94
95% Begin Lattice
96
97%%  Superperiods 
98
99SUP  = [  ...
100 SD1     FHCOR  FVCOR   BPM     Q1     SD2     S1     HCOR    SD3     Q2  ...
101 BPM     SD14   Q3      SD5     S2     VCOR    SD6    BEND    SD7     Q4  ...
102 SD8     S3     BPM     SD9     Q5     SD12    S4     HCOR    VCOR    BPM  ...   
103 SD10    Q5     SD9     BPM     S3     SD8     Q4     SD7     BEND    SD7  ...
104 Q6      SD5    S5      VCOR    SD4    BPM     Q7     SD3     S6      HCOR ...
105 SD2     Q8     BPM     FHCOR   FVCOR  SD13    SD13   FHCOR   FVCOR   BPM  ... 
106 Q8      SD2    S8      HCOR    SD3    Q7      BPM    SD4     S7      VCOR ...
107 SD5     Q6     SD7     BEND    SD7    Q9      SD8    S9      VCOR    BPM  ...
108 SD9     Q10    SD8     S10     HCOR   BPM     FHCOR  FVCOR   SDAC    SDAC ... 
109 FHCOR   FVCOR  BPM     S10     HCOR   SD8     Q10    SD9     BPM     S9  ...
110 VCOR    SD8    Q9      SD7     BEND   SD7     Q6     SD5     S7      VCOR ...
111 SD4     BPM    Q7      SD3     S8     HCOR    SD2    Q8      BPM     FHCOR...
112 FVCOR   SD13   SD13    FHCOR   FVCOR  BPM     Q8     SD2     S8      HCOR ...
113 SD3     Q7     BPM     SD4     S7     VCOR    SD5    Q6      SD7     BEND...
114 SD7     Q9     SD8     S9      VCOR   BPM     SD9    Q10     SD8     S10 ...
115 HCOR    BPM    FHCOR   FVCOR   SDAC   SDAC    FHCOR  FVCOR   BPM     S10 ...
116 HCOR    SD8    Q10     SD9     BPM    S9      VCOR   SD8     Q9      SD7  ...
117 BEND    SD7    Q6      SD5     S7     SD4     VCOR   BPM     Q7      SD3  ...
118 S8      HCOR   SD2     Q8      BPM    FHCOR   FVCOR  SD13    SD13    FHCOR...
119 FVCOR   BPM    Q8      SD2     S6     HCOR    SD3    Q7      BPM     SD4  ...   
120 S5      VCOR   SD5     Q6      SD7    BEND    SD7    Q4      SD8     S3  ...
121 BPM     SD9    Q5      SD10    BPM    S4      HCOR   VCOR    SD12    Q5  ...
122 SD9     BPM    S3      SD8     Q4     SD7     BEND   SD6     S2      VCOR ...
123 SD5     Q3     SD14    BPM     Q2     SD3     S1     HCOR    SD2     Q1  ...
124 BPM     FHCOR  FVCOR   SD1  ];
125
126 
127ELIST = [DEBUT INJ SECT1 SUP SECT2 SUP SECT3 SUP SECT4 SUP CAV FIN];
128
129buildlat(ELIST);
130
131%% compute total length and RF frequency
132
133L0_tot=0;
134for i=1:length(THERING)
135   L0_tot=L0_tot+THERING{i}.Length;
136end
137
138fprintf('\nL0_tot=%f m (should be %f m) \nf_RF=%f Hz \n\n',L0_tot,L0,HarmNumber*C0/L0_tot)
139
140%% Compute initial tunes before loading errors
141[InitialTunes, InitialChro] = tunechrom(THERING,0,[18.25, 10.2],'chrom','coupling');
142
143% fprintf('A bit false since radiation and cavity on\n');
144fprintf('Tunes before loading lattice errors: nu_x=%g, nu_y=%g\n',InitialTunes(1),InitialTunes(2));
145fprintf('Chroma before loading lattice errors: xi_x=%g, xi_y=%g\n',InitialChro(1),InitialChro(2));
146
147evalin('caller','global THERING FAMLIST GLOBVAL');
148disp('** Finished loading lattice in Accelerator Toolbox');
Note: See TracBrowser for help on using the repository browser.