Medical Gantry Optical Design

Medical Gantry Optical Design of type M.Daum et al.Medical Gantry Optical Design
COSY INFINITY procedure

The listing displayed below represents the procedure GANTRY of the input file DEMO.FOX for the beam optics program COSY INFINITY [1].

[1] M. Berz, COSY INFINITY, an arbitrary order beam dynamics simulation and analysis code, downloadable via the web from the Department of Physics and Astronomy at the Michigan State University.

PROCEDURE GANTRY ;
VARIABLE OBJ 1 ; VARIABLE CURV1 1 ; VARIABLE CURV2 1;
VARIABLE ALFA 1 ; VARIABLE BETA 1 ;
VARIABLE Q1 1 ; VARIABLE Q2 1 ; VARIABLE Q3 1 ; VARIABLE Q4 1 ;
VARIABLE Q5 1 ; VARIABLE Q6 1 ; VARIABLE Q7 1 ; VARIABLE Q8 1 ;

CURV1 := -0.000 ; CURV2 := 0.000 ; ALFA := 0. ; BETA := 0. ;
Q1 := -0.41048 ; Q2 := 0.44087 ; Q3 := -0.53188 ; Q4 := 0.59743 ;
Q5 := -0.38012 ; Q6 := 0.42632 ; Q7 := -0.57027 ; Q8 := 0.56137 ;

{FIT ALFA BETA CURV1 CURV2 Q5 Q6 Q7 Q8 ;}
{FIT Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 ;}
FIT Q7 Q8 ;
{FIT ALFA BETA CURV1 CURV2;}
OV 4 3 0 ; {order=4, phase space dimension=3}
FR 2 ;
RPP 230.0 ; {proton energy=230 MeV}
{PTY 0.0 ;} {reference trajectory as straight line}
PTY 20. ;
SB 3.0E-3 5.0E-3 0.0  3.0E-3 10.0E-3 0.0  0.1 0.005 0 0 0 ; {set beam}
CR ; {clear rays}
ER 2 3  2 3  1 2  1 1 ; {define ensemble of rays}
UM ; {set unity map}
BP ; {begin picture}
PS 0.01 ; {poincare section}
DL 0.5 ;
DL 0.9 ;
MQ 0.3 Q1 0.038 ;
DL 0.2 ;
MQ 0.3 Q2 0.038 ;
DL 0.35 ;
CB ;
DI 1.6552 45.0 0.035 22.5 0 22.5 0 ;
CB ;
DL 0.4 ;
MQ 0.3 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ITE 10 'SIGMA(4,4) =' SIGMA(4,4) ; 
WRITE 10 'SIGMA(4,3) =' SIGMA(4,3) ; 
WRITE 10 'R(1,1) =' ME(1,1) ;  
WRITE 10 'R(1,2) =' ME(1,2) ;  
WRITE 10 'R(2,1) =' ME(2,1) ;  
WRITE 10 'R(2,2) =' ME(2,2) ;  
WRITE 10 'R(3,3) =' ME(3,3) ;  
WRITE 10 'R(3,4) =' ME(3,4) ;  
WRITE 10 'R(4,3) =' ME(4,3) ;  
WRITE 10 'R(4,4) =' ME(4,4) ;  
ENDPROCEDURE ;

Medical Gantry Optical DesignMedical Gantry Optical Design Back to:Medical Gantry Optical DesignMedical Gantry Optical Design
Medical Gantry Optical DesignMedical Gantry Optical Design Last updated by Urs Rohrer on 12-Feb-2007