1 | %% In Tracy or AT for rotation, the beam is rotated and not the element |
---|
2 | % This is not equivalent to rotating elements |
---|
3 | % For zero closed orbit, there is no effect on closed orbit of |
---|
4 | % 1. rotation around s-axis |
---|
5 | % One way is just to rotate the element ie the component of the multipole |
---|
6 | % But special attention has to be watch for 2n poles |
---|
7 | % 2. s-displacement --> in reality it is equivalent to a orbit kick |
---|
8 | |
---|
9 | global THERING; |
---|
10 | |
---|
11 | ATind = atindex(THERING); |
---|
12 | |
---|
13 | % Dipoles |
---|
14 | sigmaDs = 500e-6; % meter |
---|
15 | sigmaDx = 500e-6; % meter |
---|
16 | sigmaDz = 000e-6; % meter |
---|
17 | sigmaRs = 200e-6; % meter |
---|
18 | |
---|
19 | Index = ATind.BEND; |
---|
20 | |
---|
21 | sigmaDx = sigmaDx*randn(size(Index)); |
---|
22 | sigmaDz = sigmaDz*randn(size(Index)); |
---|
23 | sigmaDs = sigmaDs*randn(size(Index)); |
---|
24 | sigmaRs = sigmaRs*randn(size(Index)); |
---|
25 | |
---|
26 | mvelem(Index,sigmaDs); |
---|
27 | setshift(Index, sigmaDx, sigmaDz); |
---|
28 | |
---|
29 | %settilt(Index, sigmaRs); |
---|
30 | % Rotation of the dipole fields |
---|
31 | Theta = THERING{Index(1)}.BendingAngle*/getbrho; |
---|
32 | |
---|
33 | % for ik = 1:length(Index) |
---|
34 | % THERING{Index(ik)}.PolynomeA(1) = sin(sigmaRs(ik))* |
---|
35 | % end |
---|
36 | |
---|
37 | % Quadrupoles |
---|
38 | |
---|
39 | sigmaDx = 100e-6; % meter |
---|
40 | sigmaDz = 100e-6; % meter |
---|
41 | |
---|
42 | Index = [ATind.Q1, ATind.Q2, ATind.Q3, ATind.Q4, ATind.Q5 ... |
---|
43 | ATind.Q6, ATind.Q7, ATind.Q8, ATind.Q9, ATind.Q10]; |
---|
44 | |
---|
45 | sigmaDx = sigmaDx*randn(size(Index)); |
---|
46 | sigmaDz = sigmaDz*randn(size(Index)); |
---|
47 | |
---|
48 | |
---|
49 | setshift(Index, sigmaDx, sigmaDz); |
---|
50 | |
---|
51 | % Sextupoles |
---|