source: MML/trunk/mml/at/mksrollmat.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: 1008 bytes
Line 
1function R = mksrollmat(PSI);
2%MKSROLLMAT - Rotation matrix around s-axis
3% M = MKSROLLMAT(PSI) makes a 6-by-6 coordinate transformation matrix
4% that transforms 6-by-1 phase space coordinate vector of the PARTICLE
5% to a new coord system.  PSI is in radians.
6%
7% The new system is rotated around the s-axis
8% with respect to the old system by an angle PSI
9% POSITIVE PSI corresponds to a CORKSCREW (right)
10% rotation of the ELEMENT.
11%
12% The matrix only transforms the transverse (X,PX,Y,PY) coordinates
13%
14% In AT, this matrix is used for R1,R2 field of the element
15% data structure in a lattice. Some pass-methods use them
16% along with T1 and T2 to includ ELEMENT misalignment
17% If a straight ELEMENT (such a quadrupole) is rotated
18% by a positive angle PSI (ANTICLOCKWISE)  then
19% R1 = mksrollmat(PSI)
20% R2 = mksrollmat(-PSI)
21% clockwise (corkscrew aligned with the reference orbit direction)
22
23C = cos(PSI);
24S = sin(PSI);
25R = diag([ C C C C 1  1 ]);
26R(1,3) = S;
27R(2,4) = S;
28R(3,1) = -S;
29R(4,2) = -S;
Note: See TracBrowser for help on using the repository browser.