MOCADI37 for ESR injection
****************************************************
* file with correct apertures of ESR with injection
* vacuum chambers from MIRKO file, additional 
* restrictions taken from technical drawings 
* (septum, kicker, pick ups, rest gas monitor, 
*  TOF detector)
* use "LOOP <n>" for n half turns 
*           Helmut Weick, 29 Jan 2007
****************************************************
* pickups + rest gas monitor still missing !!!
*
atima-1.0
option listmode cwn
EPAX 2.0
*
BEAM
20000                         *number of particles
406.8, 0, 196.967, 79.0
4
5.0, 12.5.0 ,0,0,0
*0.01, 0.01, 0,0,0
4
2.0, 10.0, 0,0,0  
*2.01, 0.01, 0,0,0
2
2.0,   0,   0,
*
MATRIXFILE
/u/weick/gicosy/frs/esr/mocadi/
*
* make beam with B. Schillingers Twiss parameters
* at P. Spillers take over point
* MATRIX
* FRS-to-TOP-Schillinger.MAT
* 196.967, 79.0, 406.8         
* 1, 1     
*
ERWARTUNGSWERTE   'at TOP'
SAVE              'at TOP'
*
*-------- Spillers take over point ---------
*
 DRIFT
 197.1
*
 MATRIX
 SCHILLINGER.MAT
 196.967, 79.0, 406.8               
 1, 1    
*
 DRIFT
   74.89
*  75.89   old value
*
 COLL
 1, 0, 0,  4.850 ,   2.600, 0
 MATRIX                (length=1.2m)
 SEPTUM.MAT   
 196.967, 79.0, 406.8               
 3, 3    
 COLL
 1, 0, 0,  2.600,   2.750, 0
*
* --------------- exit of septum -----------------------
*
SHIFT
11.7, 0, 0, 7.0, 0, 0
*
SAVE             'SEPTUM'
ERWARTUNGSWERTE  'SEPTUM'
*
* don't forget to shift also in Brho !
* dp/p = x in kicker / dispersion in kicker 
*----------- end of septum (iron edge)------------
 DRIFT 
    24.27
*    20.9 old value
 DRIFT
    9.500000
 MATRIX
 ESRSTD038.MAT      ------
 196.967, 79.0, 400.0               
 1, 1  
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD039.MAT      ------           E01QS8F
 196.967, 79.0, 400.0               
 1, 1                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD040.MAT      ------
 196.967, 79.0, 400.0               
 1, 1                                    
 DRIFT
    9.500000
 DRIFT
   32.540001
 DRIFT
    9.500000
 MATRIX 
 ESRSTD041.MAT      ------
 196.967, 79.0, 400.0               
 1, 1                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD042.MAT      ------           E01QS9D
 196.967, 79.0, 400.0               
 1, 1                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD043.MAT      ------
 196.967, 79.0, 400.0               
 1, 1                                
 DRIFT
    9.500000
 DRIFT
   20.500000
 DRIFT
   53.670 
*-----------------------------
SAVE              'ECEDG1GS'
ERWARTUNGSWERTE   'ECEDG1GS'
*-----------------------------
 DRIFT
   26.100
* Solenoid      
 DRIFT
   60.00000
 COLL
 1, 0, 0, 11.50 , 3.00 , 0
 DRIFT
   29.500
 DRIFT
   87.80000
* Solenoid    
 DRIFT
  210.000
* END
*------------ center of e-cooler ------
 COLL
 1, 0, 0, 11.50 , 3.00 , 0
* Solenoid
 DRIFT
  210.000
 DRIFT
   87.80000
 DRIFT
   29.500
 COLL
 1, 0, 0, 11.50 , 3.00 , 0
* Solenoid
 DRIFT
   60.00000
 DRIFT
   79.769997
 DRIFT
   20.500000
 DRIFT
    9.500000
 MATRIX
 ESRSTD044.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD045.MAT      ------              E02QS0D
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD046.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.540001
 DRIFT
    9.500000
 MATRIX
 ESRSTD047.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD048.MAT      ------              E02QS1F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD049.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   96.270004
 DRIFT
  108.000008
 DRIFT
    2.000000
 MATRIX
 ESRSTD050.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD051.MAT      ------               E02MU1
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD052.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    2.000000
 DRIFT
   59.270000
 DRIFT
    9.500000
 MATRIX
 ESRSTD053.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD054.MAT      ------              E02QS2F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD055.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
    2.100000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                               E02KS1
 ESRSTD056.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
    2.100000
 DRIFT
    9.500000
 MATRIX
 ESRSTD057.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                              E02QS3D
 ESRSTD058.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD059.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.600002
 DRIFT
    9.500000
 MATRIX
 ESRSTD060.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                              E02QS4F
 ESRSTD061.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD062.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                               E02KS2
 ESRSTD063.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
   27.570000
 DRIFT
  184.252304
 COLL
 1, 0, 0,  11.300 ,   2.500, 0
*------------------------------
 SHIFT                                kicker
 0, 0, 0, -5.0, 0, 0
*
ERWARTUNGSWERTE        'Kicker'
SAVE                   'Kicker' 
*------------------------------
 DRIFT
   78.000000
 DRIFT
    2.000000
 MATRIX
 ESRSTD064.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD065.MAT      ------               E02MU2
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD066.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    2.000000
*-----------------------------
 DRIFT
   51.900000
SAVE                'E02DG3GS'
ERWARTUNGSWERTE     'E02DG3GS' 
 DRIFT
  -51.9000000
*-----------------------------
 DRIFT
   78.000000
 DRIFT
  184.252304
 DRIFT
   27.570000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                                E02KS3
 ESRSTD067.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
    9.500000
 MATRIX
 ESRSTD068.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                               E02QS5F
 ESRSTD069.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD070.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.600002
 DRIFT
    9.500000
 MATRIX
 ESRSTD071.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                              E02QS6D
 ESRSTD072.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD073.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
    2.100000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                               E02KS4
 ESRSTD074.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
    2.100000
 DRIFT
    9.500000
 MATRIX
 ESRSTD075.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                              E02QS7F
 ESRSTD076.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD077.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   59.270000
 DRIFT
    2.000000
 MATRIX
 ESRSTD078.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD079.MAT      ------               E02MU3
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD080.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    2.000000
 DRIFT
  108.000008
 DRIFT
   96.270004
 DRIFT
    9.500000
 MATRIX
 ESRSTD081.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD082.MAT      ------             E02QS8F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD083.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.540001
 DRIFT
    9.500000
 MATRIX
 ESRSTD084.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                             E02QS9D
 ESRSTD085.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD086.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   20.500000
 DRIFT
  297.569916
*
/*
 COLL
 3 ,0 ,0 ,4, 4
* 
 MATTER         TOF detector
 27, 13, 2700
 3, 0.04,0,0,0
 0, 0, 0
 0, 0, 0
 1, 1
 0, 0, 0, 0
*/
 DRIFT
  169.500
*
SAVE
ERWARTUNGSWERTE
*END 
*--------------- gas target ----------------
 LOOP 7 
*--------
 DRIFT
  467.069916
 DRIFT
   20.500000
 DRIFT
    9.500000
 MATRIX
 ESRSTD001.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                             E01QS0D
 ESRSTD002.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                    
 ESRSTD003.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.540001
 DRIFT
    9.500000
 MATRIX
 ESRSTD004.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD005.MAT      ------            E01QS1F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD006.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   96.270004
 DRIFT
  108.000008
 DRIFT
    2.000000
 MATRIX
 ESRSTD007.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD008.MAT      ------             E01MU1
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD009.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    2.000000
 DRIFT
   59.270000
 DRIFT
    9.500000
 MATRIX
 ESRSTD010.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                            E01QS2F
 ESRSTD011.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD012.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
    2.100000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                            E01KS1
 ESRSTD013.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
    2.100000
 DRIFT
    9.500000
 MATRIX
 ESRSTD014.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                            E01QS2F
 ESRSTD015.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD016.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.600002
 DRIFT
    9.500000
 MATRIX
 ESRSTD017.MAT      ------            
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD018.MAT      ------            E01QS4F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                             
 ESRSTD019.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                            E01KS2 
 ESRSTD020.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
   27.570000
 DRIFT
  184.252304
 DRIFT
   78.000000
 DRIFT
    2.000000
 MATRIX                           
 ESRSTD021.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX                            E01MU2
 ESRSTD022.MAT      ------       
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD023.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    2.000000
*-----------------------------
 DRIFT
  -52.3   
*SAVE                'E01DG3GS'
*ERWARTUNGSWERTE     'E01DG3GS' 
 DRIFT  
   52.3 ;
*-----------------------------
 DRIFT
   78.000000
 DRIFT
  184.252304
 DRIFT
   27.570000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD024.MAT      ------            E01KS3
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
    9.500000
 MATRIX
 ESRSTD025.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD026.MAT      ------           E01QS5F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD027.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.600002
 DRIFT
    9.500000
 MATRIX
 ESRSTD028.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD029.MAT      ------            E01QS6D
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD030.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
    2.100000
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX                             E01KS4
 ESRSTD031.MAT      ------           
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 DRIFT
    2.100000
 DRIFT
    9.500000
 MATRIX
 ESRSTD032.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD033.MAT      ------           E01QS7F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD034.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   59.270000
 DRIFT
    2.000000
 MATRIX
 ESRSTD035.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD036.MAT      ------             E01MU3
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  11.000 ,   3.500, 0
 MATRIX
 ESRSTD037.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    2.000000
*entrance of septum collimator, off center
 COLL
 1, 2.000, 0,   9.000,   4.900, 0
 DRIFT
  108.000008
*exit of septum collimator, off center
 COLL
 1, 3.400, 0,  10.400,   4.900, 0
 DRIFT
   96.270004
 DRIFT
    9.500000
 MATRIX
 ESRSTD038.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD039.MAT      ------           E01QS8F
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD040.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   32.540001
 DRIFT
    9.500000
 MATRIX
 ESRSTD041.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD042.MAT      ------           E01QS9D
 196.967, 79.0, 400.0               
 3, 3                                    
 COLL
 1, 0, 0,  15.000 ,   9.000, 0
 MATRIX
 ESRSTD043.MAT      ------
 196.967, 79.0, 400.0               
 3, 3                                    
 DRIFT
    9.500000
 DRIFT
   20.500000
 DRIFT
   79.769997
* Solenoid
 DRIFT
   60.000004
 COLL
 1, 0, 0, 11.50 , 3.00 , 0
 DRIFT
   29.499998
 DRIFT
   87.800003
* Solenoid
 DRIFT
  209.999985
*----------------------------------
ENDLOOP
*-----------------------------------
ERWARTUNGSWERTE  'e-cooler' 
SAVE             'e-cooler'
*                                   
END
