source: MML/trunk/machine/SOLEIL/Booster/Lattices/boosterbasic.m @ 4

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

Initial import--MML version from SOLEIL@2013

File size: 4.6 KB
Line 
1
2function boosterlin
3% Booster soleil lattice w/o ID
4% Lattice definition file
5% Perfect lattice no magnetic errors
6% Compiled by Laurent Nadolski and Amor Nadji
7% 09/01/02, ALS
8% Controlroom : set linearpass for quad (closed orbit)
9
10global FAMLIST THERING GLOBVAL
11
12GLOBVAL.E0 = 2.75e9; % Ring energy
13GLOBVAL.LatticeFile = mfilename;
14FAMLIST = cell(0);
15
16disp(['** Loading SOLEIL booster magnet lattice ', mfilename]);
17
18L0 = 156.620;                % design length [m]
19C0 = 2.99792458e8;           % speed of light [m/s]
20HarmNumber = 184;
21
22%% Cavity
23%              NAME   L     U[V]       f[Hz]          h        method       
24CAV = rfcavity('RF' , 0 , 0.8e+6 , HarmNumber*C0/L0, ...
25               HarmNumber ,'ThinCavityPass');   
26
27%% Marker and apertures
28   SECT1  =  marker('SECT1', 'IdentityPass');
29   SECT2  =  marker('SECT2', 'IdentityPass');
30   DEBUT  =  marker('DEBUT', 'IdentityPass');
31   FIN    =  marker('FIN', 'IdentityPass');
32   
33   INJ = aperture('INJ',[-0.035 0.035 -0.0125 0.0125],'AperturePass');
34   INJ = aperture('INJ',[-0.035 0.035 -0.125 0.125],'AperturePass');
35
36% BPM   
37   BPM    =  marker('BPM', 'IdentityPass');
38
39% DRIFT SPACES
40   SD1 = drift('SD1', 3.15955 , 'DriftPass');
41   SD2 = drift('SD2',.408000  , 'DriftPass');
42   SD3 = drift('SD3',.591550  , 'DriftPass');
43   
44% QUADRUPOLES
45   QPD  =  quadrupole('QPD' , 0.40, -.8913750 , 'QuadLinearPass');
46   QPF  =  quadrupole('QPF' , 0.40,  1.12364 , 'QuadLinearPass');
47
48% SEXTUPOLES for xix=0.4 and xi_y=1.4
49F = 1e8;
50Finv = 1/F;
51S1  =  sextupole('S1' , Finv,  1.71919*F, 'StrMPoleSymplectic4Pass');
52S2  =  sextupole('S2' , Finv, -4.10456*F, 'StrMPoleSymplectic4Pass');
53
54
55% Slow feedback correctors
56% HCOR =  corrector('HCOR',0.0,[0 0],'CorrectorPass');
57% VCOR =  corrector('VCOR',0.0,[0 0],'CorrectorPass');
58% COR = [HCOR VCOR];
59COR =  corrector('COR',0.0,[0 0],'CorrectorPass');
60
61
62% DIPOLES
63BEND  =  rbend('BEND'  , 2.160,  ...
64            0.174533, 0.0872665, 0.0872665 , 0.0,'BendLinearPass');
65
66% Begin Lattice
67
68%%  Superperiods 
69
70SUP1  = [ QPD        SD1        QPF        SD3        BEND       SD2  ...     
71 QPD        SD1        QPF        SD2        BEND       SD3  ...     
72 QPD        SD2        BEND       SD3        QPF        SD2 ...     
73 BEND       SD3        QPD        SD2        BEND       SD3  ...     
74 QPF        SD2        BEND       SD3        QPD        SD2  ...     
75 BEND       SD3        QPF        SD2        BEND       SD3  ...     
76 QPD        SD2        BEND       SD3        QPF        SD3  ...     
77 BEND       SD2        QPD        SD3        BEND       SD2  ...     
78 QPF        SD3        BEND       SD2        QPD        SD3  ...     
79 BEND       SD2        QPF        SD3        BEND       SD2  ...     
80 QPD        SD3        BEND       SD2        QPF        SD3 ...     
81 BEND       SD2        QPD        SD3        BEND       SD2  ...     
82 QPF        SD1        QPD        SD2        BEND       SD3  ...     
83 QPF        SD1         ];
84
85SUP2  = [ QPD        SD1        QPF        SD3        BEND       SD2  ...     
86 QPD        SD1        QPF        SD2        BEND       SD3  ...     
87 QPD        SD2        BEND       SD3        QPF        SD2 ...     
88 BEND       SD3        QPD        SD2        BEND       SD3  ...     
89 QPF        SD2        BEND       SD3        QPD        SD2  ...     
90 BEND       SD3        QPF        SD2        BEND       SD3  ...     
91 QPD        SD2        BEND       SD3        QPF        SD3  ...     
92 BEND       SD2        QPD        SD3        BEND       SD2  ...     
93 QPF        SD3        BEND       SD2        QPD        SD3  ...     
94 BEND       SD2        QPF        SD3        BEND       SD2  ...     
95 QPD        SD3        BEND       SD2        QPF        SD3 ...     
96 BEND       SD2        QPD        SD3        BEND       SD2  ...     
97 QPF        SD1        QPD        SD2        BEND       SD3  ...     
98 QPF        SD1         ];
99
100ELIST = [DEBUT INJ SECT1 SUP1 SECT2 SUP2 FIN];
101
102buildlat(ELIST);
103
104
105
106
107
108
109%% compute total length and RF frequency
110
111L0_tot=0;
112for i=1:length(THERING)
113   L0_tot=L0_tot+THERING{i}.Length;
114end
115
116fprintf('\nL0_tot=%f m (should be %f m) \nf_RF=%f Hz \n\n', L0_tot, ...
117    L0,HarmNumber*C0/L0_tot)
118
119%% Compute initial tunes before loading errors
120[InitialTunes, InitialChro] = tunechrom(THERING,0,[6.4, 4.4],'chrom','coupling');
121
122% fprintf('A bit false since radiation and cavity on\n');
123fprintf('Tunes before loading lattice errors: nu_x=%g, nu_z=%g\n', ...
124    InitialTunes(1),InitialTunes(2));
125fprintf('Chroma before loading lattice errors: xi_x=%g, xi_z=%g\n', ...
126    InitialChro(1)/InitialTunes(1),InitialChro(2)/InitialTunes(2));
127
128evalin('caller','global THERING FAMLIST GLOBVAL');
129disp('** Finished loading lattice in Accelerator Toolbox');
Note: See TracBrowser for help on using the repository browser.