<commit_before>
\chapter{General Input} \label{GenInp}

% ================================================================================================================================ %
\section{Program Version} \label{ProVer}

The \textit{Program Version} input block determines if all of the input will be in the input file \texttt{fort.3}, or if the geometry part of the machine (see~\ref{MaGe}) will be in a separate file: \texttt{fort.2}.\index{input block}\index{fort.2}\index{fort.3}
The latter option is useful if tracking parameters are changed, but the geometry part of the input is left as it is.
The geometry part can be produced directly from a MAD-X input file (see~\ref{MADT}).
Note that this line should not have a \texttt{NEXT} keyword after it.\index{NEXT}

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \textbf{Keyword}    & \texttt{FREE} or \texttt{GEOM} \index{FREE}\index{GEOM}\\
    \textbf{Data lines} & None \\
    \textbf{Format}     & \texttt{keyword comment title} \\
\end{tabular}

\paragraph{Format Description}~

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \texttt{keyword} & The first four characters of the first line of the \texttt{fort.3} input file are reserved for the keyword. \texttt{FREE} for free format input with all input in \texttt{fort.3}, and \texttt{GEOM} if the geometry part is in file  \texttt{fort.2}. \\
    \texttt{comment} & Following the first four characters, 8 characters are reserved for comments \\
    \texttt{title}   & The next 60 characters are interpreted as the title printed at the top of the output file \texttt{fort.6}.
\end{tabular}

% ================================================================================================================================ %
\section{Print Selection} \label{PriSel}

The \texttt{PRIN} flag is deprecated, and replaced by the \texttt{PRINT} flag in the \texttt{SETTINGS} block.\index{PRIN}

% ================================================================================================================================ %
\section{Settings} \label{STSett}

The \textit{Print Selection} input block available in earlier version has been replaced with the \texttt{SETTINGS} block.\index{SETT}
This was done to allow for more options related to what output SixTrack produces in \texttt{fort.6}.\index{fort.6}
The \texttt{PRIN} flag is available as one of several options in this block.\index{PRIN}
However, for backwards compatibility, the \texttt{PRIN} flag is still accepted.

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \textbf{Keyword}    & \texttt{SETT} \\
    \textbf{Data lines} & Variable
\end{tabular}

\paragraph{Format Description}~

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \texttt{PRINT} & This causes the printing of the input data to the output file \texttt{fort.6}. \\
    \texttt{DEBUG} & A global debug flag that causes the majority of the blocks to echo back the value read from the input file after parsing. It may also print out secondary values set based on input values read, or modification made to input values based on other dependencies and criteria.\index{DEBUG}\\
    \texttt{QUIET} & Followed by an integer specifying how ``quiet'' the output should be. A higher value causes less information to be printed back out. If the keyword is not present, the default value is 0, which means it is disabled. If it is present, but the integer value is omitted, it is set to be 1. This flag does not interfere with the \texttt{PRINT} flag.\index{QUIET}\\
    \texttt{PRINT\_DCUM} & This will cause the calculated s-coordinate of each structure element to be printed to \texttt{fort.6}. \\
    \texttt{PARTSUMMARY} & Enable or disable the printing of a particle summary after tracking. The flag takes an optional parameter to explicitly state whether it is ON or OFF. If omitted, it is assumed the user requests it to be ON. If the flag is omitted entirely, the default behaviour is determined by the particle count. If SixTrack is running with 64 particles or less, it is ON by default, otherwise OFF.\index{particle summary}\\
    \texttt{WRITEFORT12} & Enable or disable the writing of \texttt{fort.12} after tracking. The flag takes an optional parameter to explicitly state whether it is ON or OFF. If omitted, it is assumed the user requests it to be ON. If the flag is omitted entirely, the default behaviour is determined by the particle count. If SixTrack is running with 64 particles or less, it is ON by default, otherwise OFF.\index{fort.12}\\
    \texttt{INITIALSTATE} & Followed by either ``binary'' or ``text''. This will write a file before tracking containing the initial state of all particles to either a binary or a text file.\index{initial state} Adding ``ions'' as a second keyword will also dump the additional ion columns.\\
    \texttt{FINALSTATE} & Followed by either ``binary'' or ``text''. This will write a file after tracking containing the final state of all particles, including those lost during tracking, to either a binary or a text file.\index{final state} Adding ``ions'' as a second keyword will also dump the additional ion columns.\\
\end{tabular}


% ================================================================================================================================ %
\section{Comment Line} \label{ComLin}

An additional comment can be specified with the \textit{Comment} block.
The comment will be written to the binary data files (Appendix~\ref{Header}), and will appear in the post processing output as well.

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \textbf{Keyword}    & \texttt{COMM}\index{COMM}\index{comment} \\
    \textbf{Data lines} & 1 \\
    \textbf{Format}     & A string of up to 80 characters.
\end{tabular}

% ================================================================================================================================ %
\section{Iteration Errors} \label{IteErr}

For the processing procedures, the number of iterations and the precision to which the processing is to be performed are chosen with the \textit{Iteration Errors} input block.\index{iteration errors}<commit_msg>Added refernce to HIONS block for INITIALSTATE/FINALSTATE in manual<commit_after>
\chapter{General Input} \label{GenInp}

% ================================================================================================================================ %
\section{Program Version} \label{ProVer}

The \textit{Program Version} input block determines if all of the input will be in the input file \texttt{fort.3}, or if the geometry part of the machine (see~\ref{MaGe}) will be in a separate file: \texttt{fort.2}.\index{input block}\index{fort.2}\index{fort.3}
The latter option is useful if tracking parameters are changed, but the geometry part of the input is left as it is.
The geometry part can be produced directly from a MAD-X input file (see~\ref{MADT}).
Note that this line should not have a \texttt{NEXT} keyword after it.\index{NEXT}

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \textbf{Keyword}    & \texttt{FREE} or \texttt{GEOM} \index{FREE}\index{GEOM}\\
    \textbf{Data lines} & None \\
    \textbf{Format}     & \texttt{keyword comment title} \\
\end{tabular}

\paragraph{Format Description}~

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \texttt{keyword} & The first four characters of the first line of the \texttt{fort.3} input file are reserved for the keyword. \texttt{FREE} for free format input with all input in \texttt{fort.3}, and \texttt{GEOM} if the geometry part is in file  \texttt{fort.2}. \\
    \texttt{comment} & Following the first four characters, 8 characters are reserved for comments \\
    \texttt{title}   & The next 60 characters are interpreted as the title printed at the top of the output file \texttt{fort.6}.
\end{tabular}

% ================================================================================================================================ %
\section{Print Selection} \label{PriSel}

The \texttt{PRIN} flag is deprecated, and replaced by the \texttt{PRINT} flag in the \texttt{SETTINGS} block.\index{PRIN}

% ================================================================================================================================ %
\section{Settings} \label{STSett}

The \textit{Print Selection} input block available in earlier version has been replaced with the \texttt{SETTINGS} block.\index{SETT}
This was done to allow for more options related to what output SixTrack produces in \texttt{fort.6}.\index{fort.6}
The \texttt{PRIN} flag is available as one of several options in this block.\index{PRIN}
However, for backwards compatibility, the \texttt{PRIN} flag is still accepted.

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \textbf{Keyword}    & \texttt{SETT} \\
    \textbf{Data lines} & Variable
\end{tabular}

\paragraph{Format Description}~

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \texttt{PRINT} & This causes the printing of the input data to the output file \texttt{fort.6}. \\
    \texttt{DEBUG} & A global debug flag that causes the majority of the blocks to echo back the value read from the input file after parsing. It may also print out secondary values set based on input values read, or modification made to input values based on other dependencies and criteria.\index{DEBUG}\\
    \texttt{QUIET} & Followed by an integer specifying how ``quiet'' the output should be. A higher value causes less information to be printed back out. If the keyword is not present, the default value is 0, which means it is disabled. If it is present, but the integer value is omitted, it is set to be 1. This flag does not interfere with the \texttt{PRINT} flag.\index{QUIET}\\
    \texttt{PRINT\_DCUM} & This will cause the calculated s-coordinate of each structure element to be printed to \texttt{fort.6}. \\
    \texttt{PARTSUMMARY} & Enable or disable the printing of a particle summary after tracking. The flag takes an optional parameter to explicitly state whether it is ON or OFF. If omitted, it is assumed the user requests it to be ON. If the flag is omitted entirely, the default behaviour is determined by the particle count. If SixTrack is running with 64 particles or less, it is ON by default, otherwise OFF.\index{particle summary}\\
    \texttt{WRITEFORT12} & Enable or disable the writing of \texttt{fort.12} after tracking. The flag takes an optional parameter to explicitly state whether it is ON or OFF. If omitted, it is assumed the user requests it to be ON. If the flag is omitted entirely, the default behaviour is determined by the particle count. If SixTrack is running with 64 particles or less, it is ON by default, otherwise OFF.\index{fort.12}\\
    \texttt{INITIALSTATE} & Followed by either ``binary'' or ``text''. This will write a file before tracking containing the initial state of all particles to either a binary or a text file.\index{initial state} Adding ``ions'' as a second keyword will also dump the additional ion columns (see Section~\ref{hions}).\\
    \texttt{FINALSTATE} & Followed by either ``binary'' or ``text''. This will write a file after tracking containing the final state of all particles, including those lost during tracking, to either a binary or a text file.\index{final state} Adding ``ions'' as a second keyword will also dump the additional ion columns (see Section~\ref{hions}).\\
\end{tabular}


% ================================================================================================================================ %
\section{Comment Line} \label{ComLin}

An additional comment can be specified with the \textit{Comment} block.
The comment will be written to the binary data files (Appendix~\ref{Header}), and will appear in the post processing output as well.

\bigskip
\begin{tabular}{@{}lp{0.8\linewidth}}
    \textbf{Keyword}    & \texttt{COMM}\index{COMM}\index{comment} \\
    \textbf{Data lines} & 1 \\
    \textbf{Format}     & A string of up to 80 characters.
\end{tabular}

% ================================================================================================================================ %
\section{Iteration Errors} \label{IteErr}

For the processing procedures, the number of iterations and the precision to which the processing is to be performed are chosen with the \textit{Iteration Errors} input block.\index{iteration errors}
{'fraction_non_alphanumeric': 0.18809562267808108, 'fraction_numerical': 0.006460991762235503, 'mean_word_length': 4.711715867158672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2250865', 'n_tokens_mistral': 3154, 'n_tokens_neox': 3015, 'n_words': 1453}