\section{g2_tracking}
The program {\tt g2_tracking} tracks muons through a model of the g-2injection channel and storage ring. Phase space coordinates $(x, p_x, y, p_y, z, p)$ and spin polarization($s_x, s_y, s_z)$
are propagated through the elements of the guide fields. The model of the injection channel and ring is assembled from 'bmad' style elements and defined by 'bmad' lattice files. The magnetic fields 
of the injection channel  and inflector are represented by field maps. The main dipole is also described by a field map. The electrostatic quadrupoles can be represented as field maps, or a variety
of multipole expansions. (An advantage of the field map is that it provides realistic values of electric fields, outside of the quad plates.) The quad fields can be ramped to imitate 'scraping'
and operated with an RF component.  The pulsed injection kicker is a 'custom' element. The kicker field is based on a 2D finite element model and the time depence of the fields on measurements.
Collimators limit apertures in the storage ring. Particles that hit the aperture are assumed lost.

The program can also be used to propagate twiss parameters, compute closed ring $\alpha, and $\beta$, betatron tunes, and chromaticities.

\subsection{Input}
The lattice files appropriate to study of the y-$\delta$ correlation are:
\begin{itemize}
\item  
{\tt /nfs/gm2/data2/dlr10/g-2/mytest/ydelta_correlation/example/mad_esquad_grid_split_dfree.} This file contains the ring layout and calls additional files to complete the description including: 
\begin{itemize}
 {\tt /home/dlr/development9_linux/g-2/files/walls_free.bmad} and {\tt /home/dlr/development9_linux/g-2/files/walls_quads2-4.bmad} - Define the quadrupole aperture
\item{\tt  /home/dlr/development9_linux/g-2/files/bmad_all_configs_fringe_inf_grid.} and {/home/dlr/development9_linux/g-2/files/bmad_grid_fringe_inf.bmad} - Field maps for injection line
fringe field and inflector field.
\item {\tt  /home/dlr/development9_linux/g-2/files/quad_curvilinear_single_plate/quads_combined_curvilinear.bmad} - quad field maps in curvilinear coordinates.
\item{\tt /home/dlr/development9_linux/g-2/files/quads/quad_plate_misalign.bmad}  - quad plate misalignment definition 
\item{\tt ln -s /home/dlr/development9_linux/g-2/files/kickermaps/kicker_custom.bmad} - kicker geometry
\end{itemize}
\item {\tt Input.dat} The {\tt input.dat} file holds the parameters for a specific study 
\item Additional fields provide kicker pulse shapes, field maps. field nonuniformity, etc. 


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/muons/particles_M4M5End_400_mod.txt
ln -s /home/dlr/development9_linux/g-2/files/muons/EndofM5_Valetov_withInit.dat
ln -s /home/dlr/development9_linux/g-2/files/muons/INJ_TO_RING_phase_space.dat
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/quad_curvilinear/
ln -s /home/dlr/development9_linux/g-2/files/quad_curvilinear_single_plate/ 
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/files/bmad_grid_fringe_inf_custom.bmad
ln -s /home/dlr/development9_linux/g-2/magneticfield/BrFourier2016.dat
ln -s /home/dlr/development9_linux/g-2/magneticfield/BzFourier20170721.dat
ln -s /home/dlr/development9_linux/g-2/magneticfield/BzFourier20170628_LogID983.dat
ln -s /home/dlr/development9_linux/g-2/files/g-2_FFT_04032015.lat
ln -s /home/dlr/development9_linux/g-2/files/g-2_FODO_04032015.lat
ln -s /home/dlr/development9_linux/g-2/files/parameters_g-2_03112015.lat
ln -s /home/dlr/development9_linux/g-2/field_maps/kicker1data.txt
ln -s /home/dlr/development9_linux/g-2/field_maps/kicker1data_halftail.txt
ln -s /home/dlr/development9_linux/g-2/field_maps/kicker1data_05_tail.txt
ln -s /home/dlr/development9_linux/g-2/field_maps/kicker1data_flattop.dat
ln -s /home/dlr/development9_linux/g-2/files/pulse_shapes/
ln -s /home/dlr/development9_linux/g-2/files/fiber_energy_loss/eloss.dat
ln -s /home/dlr/development9_linux/g-2/field_maps/v0/
ln -s /home/dlr/development9_linux/g-2/field_maps/run3b_run4_kicker_pulse/kicker_pulse_run3b4_4col.dat
ln -s /home/dlr/development9_linux/g-2/field_maps/KickerPulse_Run3b_Run4_25887/KickerPulse_Run3b_Run4_4col_Normalized.dat
ln -s  /home/dlr/development9_linux//g-2/field_maps/e821_kicker_pulse.dat
ln -s /home/dlr/development9_linux/g-2/files/pulse_shapes/avgBeamPulsePDF.txt
ln -s /home/dlr/development9_linux/g-2/files/kickermaps/
ln -s /home/dlr/development9_linux/g-2/files/integral_fit_parameters.dat
ln -s /home/dlr/development9_linux/g-2/files/spin_pitch_fit_parameters.dat
ln -s /home/dlr/development9_linux/g-2/files/quads/voltage/badHVs_recon_from_trackers_v2_HV_18300V_maps_measuredBrad2016_avg_0ppm_60h_yavglim_m0pt04mm_goodearlyfit.dat
ln -s /home/dlr/development9_linux/g-2/magneticfield/multipoles_run_07215.dat
ln -s  /home/dlr/development9_linux//g-2/files/ibms_lattice.
