[4] | 1 | function bareLT1lattice |
---|
| 2 | % Lattice definition file |
---|
| 3 | % Lattice for LT1 |
---|
| 4 | % |
---|
| 5 | % Laurent S. Nadolski, SOLEIL, 03/04 |
---|
| 6 | % 17/01/06 Pass method for bend is obsolete in new AT |
---|
| 7 | |
---|
| 8 | global FAMLIST THERING GLOBVAL |
---|
| 9 | GLOBVAL.E0 = 100e6; |
---|
| 10 | GLOBVAL.LatticeFile = mfilename; |
---|
| 11 | FAMLIST = cell(0); |
---|
| 12 | disp(['** Loading lattice in ' mfilename]) |
---|
| 13 | |
---|
| 14 | %% markers |
---|
| 15 | %% Ecrans |
---|
| 16 | ECR0 = marker('BPM', 'IdentityPass'); |
---|
| 17 | ECR1 = marker('BPM', 'IdentityPass'); |
---|
| 18 | ECR2 = marker('BPM', 'IdentityPass'); |
---|
| 19 | ECR3 = marker('BPM', 'IdentityPass'); |
---|
| 20 | ECR4 = marker('BPM', 'IdentityPass'); |
---|
| 21 | %% Collimateur (fente d'analyse) |
---|
| 22 | COLL = marker('COLL', 'IdentityPass'); |
---|
| 23 | %% perturbateurs |
---|
| 24 | KICKQD = marker('KICKQD', 'IdentityPass'); |
---|
| 25 | PERTM = marker('PERTM', 'IdentityPass'); |
---|
| 26 | %% divers |
---|
| 27 | FIN = marker('FIN', 'IdentityPass'); |
---|
| 28 | DEBUT = marker('DEBUT', 'IdentityPass'); |
---|
| 29 | |
---|
| 30 | %% DRIFT SPACES |
---|
| 31 | SDL1 = drift('SDL1', 1.2892000, 'DriftPass'); |
---|
| 32 | SDL1A = drift('SDL1A', 0.379800, 'DriftPass'); |
---|
| 33 | SDL2 = drift('SDL2', 0.180000, 'DriftPass'); |
---|
| 34 | SDL2B = drift('SDL2B', 0.674150, 'DriftPass'); |
---|
| 35 | SDL3 = drift('SDL3', 0.180000, 'DriftPass'); |
---|
| 36 | SDL3B = drift('SDL3B', 2.220000, 'DriftPass'); |
---|
| 37 | SDL4 = drift('SDL4', 0.180000, 'DriftPass'); |
---|
| 38 | SDL4B = drift('SDL4B', 0.770000, 'DriftPass'); |
---|
| 39 | SDL5H1= drift('SDL5H1', 0.180000, 'DriftPass'); |
---|
| 40 | SDL5H2= drift('SDL5H2', 0.505260, 'DriftPass'); |
---|
| 41 | SDL5C = drift('SDL5C', 0.364740, 'DriftPass'); |
---|
| 42 | SDL6 = drift('SDL6', 2.49248, 'DriftPass'); |
---|
| 43 | SDL6T = drift('SDL6T', 0.221200, 'DriftPass'); |
---|
| 44 | SDL7 = drift('SDL7', 0.130000, 'DriftPass'); |
---|
| 45 | SDL7B = drift('SDL7B', 0.971910, 'DriftPass'); |
---|
| 46 | SDL8 = drift('SDL8', 0.180000, 'DriftPass'); |
---|
| 47 | SDL8B = drift('SDL8B', 0.300000, 'DriftPass'); |
---|
| 48 | SDL9 = drift('SDL9', 0.344540, 'DriftPass'); |
---|
| 49 | SDL9B = drift('SDL9B', 0.180000, 'DriftPass'); |
---|
| 50 | SDL0 = drift('SDL0', 0.198800, 'DriftPass'); |
---|
| 51 | SDL0B = drift('SDL0B', 0.583820, 'DriftPass'); |
---|
| 52 | SDL0B1= drift('SDL0B1', 0.500000, 'DriftPass'); |
---|
| 53 | SDL0C = drift('SDL0C', 2.309270, 'DriftPass'); |
---|
| 54 | SBOO1 = drift('SBOO1', 1.294100, 'DriftPass'); |
---|
| 55 | SBOO2 = drift('SBOO2', 0.764434, 'DriftPass'); |
---|
| 56 | SBOO3 = drift('SBOO3', 0.150000, 'DriftPass'); |
---|
| 57 | SBOO4 = drift('SBOO4', 2.000000, 'DriftPass'); |
---|
| 58 | PERTEBR = drift('PERTEBR', 0.130000, 'DriftPass'); |
---|
| 59 | PERTELM = drift('PERTELM', 0.30000, 'DriftPass'); |
---|
| 60 | PERTSLM = drift('PERTSLM', 0.30000, 'DriftPass'); |
---|
| 61 | PERTSBR = drift('PERTSBR', 0.130000, 'DriftPass'); |
---|
| 62 | |
---|
| 63 | %% QUADRUPOLES |
---|
| 64 | L= 0.15/2; |
---|
| 65 | QP1 = quadrupole('QP', L, 4.17582 , 'QuadLinearPass'); |
---|
| 66 | QP2 = quadrupole('QP', L, -2.78267 , 'QuadLinearPass'); |
---|
| 67 | QP3 = quadrupole('QP', L, -2.61001 , 'QuadLinearPass'); |
---|
| 68 | QP4 = quadrupole('QP', L, 4.29826 , 'QuadLinearPass'); |
---|
| 69 | QP5 = quadrupole('QP', L, 4.94250 , 'QuadLinearPass'); |
---|
| 70 | QP6 = quadrupole('QP', L, -4.94777 , 'QuadLinearPass'); |
---|
| 71 | QP7 = quadrupole('QP', L, 4.92238 , 'QuadLinearPass'); |
---|
| 72 | QDBOO= quadrupole('QDBOO', 0.2, -0.891375 , 'QuadLinearPass'); |
---|
| 73 | |
---|
| 74 | % Q1 = [QP1 QP1]; |
---|
| 75 | % Q2 = [QP2 QP2]; |
---|
| 76 | % Q3 = [QP3 QP3]; |
---|
| 77 | % Q4 = [QP4 QP4]; |
---|
| 78 | % Q5 = [QP5 QP5]; |
---|
| 79 | % Q6 = [QP6 QP6]; |
---|
| 80 | % Q7 = [QP7 QP7]; |
---|
| 81 | % EN attente d'elements coupes en deux |
---|
| 82 | L= 0.15; |
---|
| 83 | Q1 = quadrupole('QP', L, 4.17582, 'QuadLinearPass'); |
---|
| 84 | Q2 = quadrupole('QP', L, -2.78267, 'QuadLinearPass'); |
---|
| 85 | Q3 = quadrupole('QP', L, -2.61001, 'QuadLinearPass'); |
---|
| 86 | Q4 = quadrupole('QP', L, 4.29826, 'QuadLinearPass'); |
---|
| 87 | Q5 = quadrupole('QP', L, 4.94250, 'QuadLinearPass'); |
---|
| 88 | Q6 = quadrupole('QP', L, -4.94777, 'QuadLinearPass'); |
---|
| 89 | Q7 = quadrupole('QP', L, 4.92238, 'QuadLinearPass'); |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | %% Vertical Correctors |
---|
| 93 | CV = corrector('CV',0.0,[0 0],'CorrectorPass'); |
---|
| 94 | |
---|
| 95 | %% Horizontal Correctors |
---|
| 96 | CH = corrector('CH',0.0,[0 0],'CorrectorPass'); |
---|
| 97 | |
---|
| 98 | %% DIPOLES |
---|
| 99 | % {** 1.3815 factor to fit with BETA ??? strange **} |
---|
| 100 | theta = -15*pi/180; |
---|
| 101 | fullgap = 0.105*0.724*2/6*1.3815; |
---|
| 102 | % BEND = rbend2('BEND', 0.30, theta, theta/2, theta/2, 0.0, ... |
---|
| 103 | % fullgap,'BendLinearFringeTiltPass'); |
---|
| 104 | |
---|
| 105 | BEND = rbend2('BEND', 0.30, theta, theta/2, theta/2, 0.0, ... |
---|
| 106 | fullgap,'BendLinearPass'); |
---|
| 107 | |
---|
| 108 | %% {** septa booster **} |
---|
| 109 | % beta_gap=0.03/6; |
---|
| 110 | % tracy_gap=beta_gap*0.724*2; |
---|
| 111 | theta = -7.5*pi/180; |
---|
| 112 | fullgap= 0.03/6*0.724*2; %*1.3815; |
---|
| 113 | L = 0.30; |
---|
| 114 | SEP = rbend2('SEP', L, theta, theta/2, theta/2, 0.0, fullgap, 'BendLinearPass'); |
---|
| 115 | SEPup = rbend2('SEPup', L/2, theta/2, theta/2, 0.0, 0.0, fullgap, 'BendLinearPass'); |
---|
| 116 | SEPdown = rbend2('SEPdown', L/2, theta/2, 0.0, theta/2, 0.0, fullgap, 'BendLinearPass'); |
---|
| 117 | |
---|
| 118 | % SEP = rbend2('SEP', L, theta, theta/2, theta/2, 0.0, fullgap, 'BendLinearFringeTiltPass'); |
---|
| 119 | % SEPup = rbend2('SEPup', L/2, theta/2, theta/2, 0.0, 0.0, fullgap, 'BendLinearFringeTiltPass'); |
---|
| 120 | % SEPdown = rbend2('SEPdown', L/2, theta/2, 0.0, theta/2, 0.0, fullgap, 'BendLinearFringeTiltPass'); |
---|
| 121 | |
---|
| 122 | % Begin Lattice |
---|
| 123 | %% Superperiods |
---|
| 124 | LINE2 = [ ... |
---|
| 125 | SDL1 ECR0 SDL1A QP1 QP1 SDL2 CH ... |
---|
| 126 | SDL2B ... |
---|
| 127 | QP2 QP2 SDL3 CV SDL3B QP3 QP3 ... |
---|
| 128 | SDL4 SDL4B QP4 QP4 SDL5H1 CH SDL5H2 ... |
---|
| 129 | ECR1 SDL5C BEND SDL6 COLL ... |
---|
| 130 | SDL6T QP5 QP5 SDL7 CH SDL7B CV ... |
---|
| 131 | SDL8 QP6 QP6 SDL8B BEND SDL9 ECR2 ... |
---|
| 132 | SDL0 QP7 QP7 SDL9B SDL0C CV SDL0B1 ... |
---|
| 133 | ECR3 SDL0B SEPup SEPdown SBOO1 QDBOO ... |
---|
| 134 | KICKQD QDBOO ... |
---|
| 135 | SBOO2 SBOO3 PERTEBR PERTELM PERTM PERTSLM PERTSBR ... |
---|
| 136 | SBOO3 ECR4 SBOO4 |
---|
| 137 | ]; |
---|
| 138 | |
---|
| 139 | LINE = [ ... |
---|
| 140 | SDL1 ECR0 SDL1A Q1 SDL2 CH SDL2B ... |
---|
| 141 | Q2 SDL3 CV SDL3B Q3 ... |
---|
| 142 | SDL4 SDL4B Q4 SDL5H1 CH SDL5H2 ... |
---|
| 143 | ECR1 SDL5C BEND SDL6 COLL ... |
---|
| 144 | SDL6T Q5 SDL7 CH SDL7B CV ... |
---|
| 145 | SDL8 Q6 SDL8B BEND SDL9 ECR2 ... |
---|
| 146 | SDL0 Q7 SDL9B SDL0C CV SDL0B1 ... |
---|
| 147 | ECR3 SDL0B SEPup CH SEPdown SBOO1 QDBOO ... |
---|
| 148 | KICKQD QDBOO ... |
---|
| 149 | SBOO2 SBOO3 PERTEBR PERTELM PERTM PERTSLM PERTSBR ... |
---|
| 150 | SBOO3 ECR4 SBOO4 |
---|
| 151 | ]; |
---|
| 152 | |
---|
| 153 | ELIST = [DEBUT, LINE2, FIN]; |
---|
| 154 | |
---|
| 155 | buildlat(ELIST); |
---|
| 156 | |
---|
| 157 | % Set all magnets to same energy |
---|
| 158 | THERING = setcellstruct(THERING,'Energy',1:length(THERING),GLOBVAL.E0); |
---|
| 159 | |
---|
| 160 | disp('** Done **'); |
---|