Medical Gantry Optical Design

Medical Gantry Optical Design of type IBA-GAMedical 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 ; VARIABLE Q9 1 ;

CURV1 := -0.000034 ; CURV2 := 0.00012 ; ALFA := 33.7 ; BETA := 15.25 ;
Q1 := -0.04348 ; Q2 := 0.16704 ; Q3 := -0.28831 ; Q4 := 0.20066 ;
Q5 := 0.37891 ; Q6 := -0.29835 ; Q7 := 0.66430 ; Q8 := -0.44542 ;
Q9 := 0.56882 ;

{FIT ALFA BETA CURV1 CURV2 Q5 Q6 Q7 Q8 Q9 ;}
{FIT Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ;}
{FIT Q1 Q2 Q3 Q4 ;}
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 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 0.5 ;
MQ 0.25 Q1 0.038 ;
DL 0.45 ;
MQ 0.25 Q2 0.038 ;
DL 1.0 ;
MQ 0.25 Q3 0.038 ;
DL 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1) =' SIGMA(2,1) ; 
WRITE 10 'SIGMA(3,3) =' SIGMA(3,3) ; 
WRITE 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