\section{Output}
On execution, the program {\it g2\_tracking} creates a new subdirectory. The name of the subdirectory is the date and time (yearmmdd\_hhmmss). All of the
output is written to this subdirectory. For reference the input parameter file {\tt input.dat} and the lattice file
(i.e. {\tt bmad\_esquad\_grid.}), are copied into the subdirectory. The output depends of course on the choice 
of input parameters. All output is written as text files. Available output includes (but is not limited to):
\begin{enumerate}
\item Phase space. 
The complete set of phase space coordinates for each muon in the distribution at a particular location is written to
a file named as $\vev{\tt \rm LOCATION}${\tt\_phase\_space.dat}. For example, the file {\tt INJ\_TO\_RING\_phase\_space.dat} is a list
of the phase space coordinates of the particles transported through the injection channel to the end of the inflector, just before transitioning into the ring. 
\item Beam moments of the distribution. 
\begin{enumerate}
\item {\tt Beam\_moments\_tbt.dat} lists the first and second moments (averages and widths) of the phase space of the distribution at the instant of time when the 
reference particle (magic momentum particle with zero betatron amplitude) arrives at the 'end' of the ring on each revolution. (The 'end' is the last element in
the 'lattice line'). Note that all particles in the distribution
do not arrive at the end of the ring at the same time.  A real detector measures the position of particles
in a detector (location) at a particular time.
The moments are computed for the entire distribution independent of arrival time. 
The average arrival time is also included.
\item 
{\tt Beam\_moments\_by\_element.dat} lists the moments at the end of each element
in the lattice file.
\end{enumerate}
\item Time binned moments. {\tt Time\_Dep\_Moments\_at\_END.dat} lists the moments of the distribution of particles that arrive at the 'end' of the ring within a time bin. The width of
the time bin {\it time\_bin}, is specified in the {\tt input.dat} file. Typically {\it time\_bin} is set to 10 ns.  Then the moments correspond to what a real (ideal) detector would measure in
each 10 ns time bin.   
\item Single particle trajectories. If the number of muons ({\it nmuons} in the input file) is set to 1, then the phase space coordinates of the single particle
trajectory are recorded, at the end of each turn in {\tt single\_particle\_tbt.dat} and at the end of each element in the lattice file {\tt single\_particle\_by\_element.dat}
\end{enumerate}


