Index of /~dlr/g-2/g2/examples/example8

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]list.dat2017-07-08 09:14 117  
[   ]input.dat2017-07-17 12:11 19K 
[   ]bmad_all_configs_fringe_inf_grid_fm.2017-07-19 10:13 10K 
[   ]bmad_all_configs_fringe_inf_grid_fh.2017-07-17 12:10 10K 

g2_tracking example input files                  July 7, 2017

Example8
   g-2/examples/example8 - Start of tracking is in the ring. (That is, backleg, fringe, and inflector are skipped) 

FILE1: Copy this file <input.dat> to your working directory
FILE2: Copy the lattice file  <bmad_all_configs_fringe_inf_grid_fh.> to your working directory
OTHER FILES:  The command </home/dlr10/development9_linux/g-2/softlink> executed in your working directory will create soft links to all neccessary data files

The lattice file is 'bmad_all_configs_fringe_inf_grid_fh.'   Fiber harps are included. Calorimenters can be turned on or off by commenting/uncommenting calls

!call, file = calorimeter_lattice.
call, file = fiber_monitor_lattice.

The calorimeter_lattice file adds the 24 calorimeters to the lattice. And if decay positrons hit any of the
calorimeters, the info will be written to 'calo_hits'. 
The fiber_monitor_lattice file adds the 4 harps to the lattice. Hits in fiber harps are written to 'harp_plane_hits.dat'

! <lat_file_name> :character string -  BMAD format lattice file
  lat_file_name = 'bmad_all_configs_fringe_inf_grid.' (this file calls various quad models that can be used by selective commenting of calls)


A new distribution of 100 muons is created
The transverse phase space is determined by

! <epsx> : horizontal emittance at inflector assuming no losses in injection channel (m-rad)
  epsx      = 14.e-6                                         
! <epsy> : vertical emittance at inflector assuming no losses in injection channel (m-rad)
  epsy      = 14.e-6                                         

and the twiss parameters

! <twiss> :12-real - betax, betay, alphax, alphay, etax, etapx, etay, etapy, phix, phiy, gammax, gammay at inflector 
  twiss     = 2.0, 10.0, 0., 0.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.  


The distribution can be defined at the end of the inflector (<twiss_ref = 'end'>) or half way through (<twiss_ref = 'center').
Here the end of the inflector is chosen

! <twiss_ref> : Reference point within inflector for twiss parameters specified in previous line. 'end' = at inflector exit. 'center' = halfway through inflector
  twiss_ref = 'end' 

Tracking begins at the start of the injection channel (hole in the magnet iron) or in the ring the end of the inflector
Here tracking it will start in the ring. This is handy if you do not want to deal with all of the losses in the injection channel, inflector, etc. 
!<start_tracking_at_inflector_exit>: logical - if true then start tracking the distribution at the inflector exit, if false, start tracking at end of M5 line
  start_tracking_at_inflector_exit = T

After the distribution is created it can be offset in each of the phase space coordinates
Since we are starting tracking in the ring, initial_offsets = 0 places the center of the distribution on the magic radius
! <initial_offsets> :real - x, y, z, x-angle, y-angle, deltaE/E 
!   - offset of beam at entrance into the hole in the ring iron, with respect to the tangent through the center of the inflector 
!    initial_offsets = -4.7671E-02  0. 0. 2.2134E-02 0. 0.  !these are the offsets you need if starting at the hole in the iron
    initial_offsets = 0.  0. 0. 0. 0. 0. 

Since the distribution is initialized so that its average  displacement (x,y) and transverse momenta (px,py) are zero, 
the kickers are set to zero since the particles start on the magic radii orbit
!<kicker_params%kicker_field> : 3 reals - Bfield (T) for the three kicker mangets
    kicker_params%kicker_field      =   0.   0.  0. ! Kick strength (Tesla) for 989 kick 1.27m kickers

In order that there is muon decay and positron tracking (or not) we need to set

!<spin_tracking_on>: logical - if true then include spin tracking of muons. Default = true
 spin_tracking_on = F
!<muon_decay>: logical - if true then include muon decay. Default = true
 muon_decay_on = F


For all the details see the input.dat file

 
Here is the complete set of data files.
Create soft links to all necessary files with the command  

    </home/dlr/development9_linux/g-2/softlink>


ln -s /home/dlr/development9_linux/g-2/files/pulse_127cm.dat
ln -s /home/dlr/development9_linux/g-2/magneticfield/ring_inject_bfield3d_wuzheng_extended.dat 
ln -s /home/dlr/development9_linux/g-2/magneticfield/inf_field_alone.dat 
ln -s /home/dlr/development9_linux/g-2/files/muons/VDstop_DS_436_12000.dat 
ln -s /home/dlr/development9_linux/g-2/files/muons/particles_endm4m5_100.txt
ln -s /home/dlr/development9_linux/g-2/files/KICKER_E989_NoRolledEdges.dat 
ln -s /home/dlr/development9_linux/g-2/files/quads/
ln -s /home/dlr/development9_linux/g-2/files/calorimeter_lattice.
ln -s /home/dlr/development9_linux/g-2/files/fiber_monitor_lattice.
ln -s /home/dlr/development9_linux/g-2/files/walls_free.bmad
ln -s /home/dlr/development9_linux/g-2/files/walls_quads2-4.bmad
ln -s /home/dlr/development9_linux/g-2/files/backleg/
ln -s /home/dlr/development9_linux/g-2/files/bmad_all_configs_fringe_inf_grid.
ln -s /home/dlr/development9_linux/g-2/files/bmad_grid_fringe_inf.bmad
ln -s /home/dlr/development9_linux/g-2/magneticfield/BrFourier2016.dat
ln -s /home/dlr/development9_linux/g-2/magneticfield/BzFourier20170628_LogID983.dat