Index of /~dlr/g-2/g2/mytest/gridfield_quad

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]gnu_input.dat2016-09-06 10:27 712  
[   ]input_data.dat2016-09-06 10:27 5.1K 
[   ]bmad_short_kickers.2016-09-06 14:29 13K 
[DIR]20160909_163842/2016-09-09 16:38 -  
[DIR]20160909_163856/2016-09-09 16:39 -  
[DIR]20160909_171204/2016-09-09 17:12 -  
[DIR]20160909_172708/2016-09-09 17:27 -  
[DIR]20160909_172938/2016-09-09 17:29 -  
[   ]bmad_quad_grids_short_kickers.2016-09-09 17:31 13K 
[DIR]20160909_173149/2016-09-09 17:31 -  
[   ]input.dat2016-09-09 20:36 12K 
[DIR]20160906_122849/2017-12-11 11:10 -  
[DIR]20160906_123451/2017-12-11 11:10 -  
[DIR]20160909_163701/2017-12-11 11:10 -  
[DIR]20160909_172957/2017-12-11 11:10 -  
[DIR]20160909_203633/2017-12-11 11:10 -  
[DIR]20160906_084752/2017-12-11 11:10 -  
[DIR]20160906_103623/2017-12-11 11:10 -  
[DIR]20160906_123906/2017-12-11 11:10 -  
[DIR]20160906_124810/2017-12-11 11:10 -  
[DIR]20160906_130916/2017-12-11 11:10 -  
[DIR]20160906_132603/2017-12-11 11:10 -  
[DIR]20160906_135035/2017-12-11 11:10 -  
[DIR]20160906_142931/2017-12-11 11:10 -  
[DIR]20160909_191652/2017-12-11 11:10 -  
[DIR]20160909_192152/2017-12-11 11:10 -  
[DIR]20160909_203641/2017-12-11 11:10 -  
[   ]VDstop_DS_436_12000.dat2019-04-08 09:26 1.1M 
[TXT]particles_endm4m5_100.txt2019-04-08 09:26 12M 
[   ]KICKER_E989_NoRolledEdges.dat2019-04-08 09:26 829K 
[   ]pulse_127cm.dat2019-04-08 09:26 480  
[   ]ring_inject_bfield3d_wuzheng_extended.dat2019-04-08 09:27 35M 
[   ]inf_field_alone.dat2019-04-08 09:27 12M 
[DIR]quads/2025-02-11 10:46 -  

g2_tracking example input files                  October 24, 2015

Example3
   g-2/examples/example3 - Start of tracking is at the hole in the iron.
   Muon decay and spin tracking are off
   Muons are tracked until they hit an aperture (mostly defined in lattice file, but occasionally hard coded) 

The lattice file is bmad_short_kickers. Calorimeters can be included but are commented out in the lattice file.

! <lat_file_name> :character string -  BMAD format lattice file
  lat_file_name = 'bmad_short_kickers.'

The muon distribution is read from a file
! <muon_file> : If you choose to read an existing distribution, here is where the name is written. 
  muon_file = 'VDstop_DS_436_12000.dat'       ! read the phase space distribution off the target from this file. If blank, use freshly created distribution

The distribution assumes some twiss parameters.
We extract the twiss parameters from the moments of the distribution.
And then rewrite the distribuion so that when it gets to the end of the inflector (or the center)
it will have the specified 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 at the hole. 
!<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 = F

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


The strengths of the three kickers are chosen to steer the muons onto the magic radius.
!<kicker_params%kicker_field> : 3 reals - Bfield (T) for the three kicker mangets
    kicker_params%kicker_field      =   326.6e-4   304.8e-4  240.2e-4 ! Kick strength (Tesla) for 989 kick 1.27m kickers

Muon spin tracking and decay are off

!<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

Some output is controlled by the following logicals.
!<write_phase_space>: logical - if true write phase space coordinates of each muon to a file at each element on first turn 
write_phase_space_file = T

The average and rms of each of the phase space coordinates computed on each turn is written to 'Beam_moments_tbt.dat'
If you want to see how the distribution changes going around the ring, set <save_element_by_element_info = T>
Then the average and rms, computed at the end of each element, are written to 'Beam_moments_by_element.dat' 
!<save_element_by_element_info> - if true allocate array muon_ele(:,:) to save distribution at each element. To reduce memory requirements - false
save_element_by_element_info = F


For all the details see the input.dat file

 
Files:
  input.dat
  bmad_short_kickers_trackers.

Also
  /g-2/files/pulse_127cm.dat
  /g-2/magneticfield/ring_inject_bfield3d_wuzheng_extended.dat 
  /g-2/magneticfield/inf_field_alone.dat 
  /g-2/files/KICKER_E989_NoRolledEdges.dat 
  /g-2/files/muons/VDstop_DS_436_12000.dat