Medical Gantry Optical Design

Medical Gantry Optical Design of type PSIMedical 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 ;

CURV1 := -0.017 ; CURV2 := -0.185 ; ALFA := 0.0 ; BETA := 23.5 ;
Q1 := -0.55769 ; Q2 := 0.52316 ; Q3 := -0.29961 ; Q4 := 0.44911 ;
Q5 := -0.16632 ; Q6 := 0.36536 ; Q7 := -0.20093 ;

{FIT D1 D2 ALFA BETA CURV1 CURV2 Q5 Q6 Q7 ;}
FIT Q1 Q2 Q3 Q4 Q5 Q6 Q7 ;
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 10.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 1.77 ;
MQ 0.35 Q1 0.05 ;
DL 0.05 ;
MQ 0.35 Q2 0.05 ;
DL 0.3 ;
CB ;
DI 1.5708 60.0 0.035 0 0 0 0 ;
CB ;
DL 0.200 ;
DL 0.180 ;
MQ 0.34 Q3 0.04 ;
DL 0.06 ;
MQ 0.34 Q4 0.04 ;
DL 0.380 ;
DI 1.5708 60.0 0.035 0 0 0 0 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) ; 
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