Line | |
---|
1 | subroutine sextupole(zn) |
---|
2 | c----------------------------------------------------------------------- |
---|
3 | c |
---|
4 | include 'param_sz.h' |
---|
5 | include 'constcom.h' |
---|
6 | include 'pcordcom.h' |
---|
7 | include 'syscom.h' |
---|
8 | c |
---|
9 | c----------------------------------------------------------------------- |
---|
10 | ne=rne |
---|
11 | sl=zn-z |
---|
12 | xp=bgx/bgz |
---|
13 | yp=bgy/bgz |
---|
14 | con=1.+xp**2+yp**2 |
---|
15 | z=zn |
---|
16 | caysq=el(4,ne)/(brhof*bgz) |
---|
17 | caysqtsq=caysq*sl**2 |
---|
18 | xn=x+sl*xp-caysqtsq*(.5*x**2+x*xp*sl/3.+(xp*sl)**2/12. |
---|
19 | & -(.5*y**2+y*yp*sl/3.+(yp*sl)**2/12.)) |
---|
20 | xpn=xp-caysq*sl*(x**2+x*xp*sl+xp**2*sl**2/3. |
---|
21 | & -(y**2+y*yp*sl+yp**2*sl**2/3.)) |
---|
22 | yn=y+sl*yp+caysqtsq*(x*y+x*yp*sl/3.+xp*y*sl+xp*yp*sl**2/6.) |
---|
23 | ypn=yp+caysq*sl*(2.*x*y+(x*yp+xp*y)*sl+2.*xp*yp*sl**2/3.) |
---|
24 | x=xn |
---|
25 | y=yn |
---|
26 | bgx=xpn*bgz |
---|
27 | bgy=ypn*bgz |
---|
28 | bgz=bgz*sqrt(con/(1.+xp**2+yp**2)) |
---|
29 | return |
---|
30 | end |
---|
31 | c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* |
---|
Note: See
TracBrowser
for help on using the repository browser.