\subsubsection{The {\tt NXT:} tracking module}\label{sect:NXTData}

The {\tt NXT:} module provides an implementation of the collision probability (PIJ) method or of the method of characteristics (MOC).
The calling specification for this module is:

\begin{DataStructure}{Structure \dstr{NXT:}}
$[$ \dusa{TRKFIL} $]$ \dusa{TRKNAM}
\moc{:=} \moc{NXT:} $[$ \dusa{TRKNAM} $]~[$ \dusa{GEONAM} $]$ \moc{::} \dstr{desctrack} \dstr{descnxt}
\end{DataStructure}

\noindent  where
\begin{ListeDeDescription}{mmmmmmm}

\item[\dusa{TRKNAM}] {\tt character*12} name of the \dds{tracking} data
structure that will contain region volume and surface area vectors in
addition to region identification pointers and other tracking information.
If \dusa{TRKNAM} also appears on the RHS, the previous tracking 
parameters will be applied by default on the current geometry.

\item[\dusa{TRKFIL}] {\tt character*12} name of the sequential binary tracking
file  used to store the tracks lengths. If \dusa{TRKFIL} does not appear, the keyword
\moc{XCLL} is set automatically. If the user wants to use a tracking file,
\dusa{TRKFIL} is required.

\item[\dusa{GEONAM}] {\tt character*12} name of the \dds{geometry} data
structure.

\item[\dstr{desctrack}] structure describing the general tracking data (see
\Sect{TRKData})

\item[\dstr{descnxt}] structure describing the transport tracking data
specific to \moc{NXT:}.

\end{ListeDeDescription}

\vskip 0.15cm

The \moc{NXT:} specific tracking data in \dstr{descnxt} is defined as

\begin{DataStructure}{Structure \dstr{descnxt}}
$[$ \moc{ANIS} \dusa{nanis} $]$ \\
$[~\{$  \moc{ONEG} $|$ \moc{ALLG} $[$ \moc{BATCH} \dusa{nbatch} $]~|$ \moc{XCLL} $\}~]$ \\
$[~[$ \moc{QUAB} \dusa{iquab} $]~[~\{$ \moc{SAPO} $|$ \moc{HEBE} $|$ \moc{SLSI} $[$ \dusa{frtm} $]~\}~]~]$ \\
$[~\{$ \moc{PISO} $|$ \moc{PSPC} $[$ \moc{CUT} \dusa{pcut} $]$ $\}~]$ \\
$[$ $\{$ \moc{SYMM} \dusa{isymm} $|$ \moc{NOSY} $]$ \\
$[$ $\{$ \moc{GAUS}  $|$ \moc{CACA} $|$ \moc{CACB} $|$ \moc{LCMD} $|$ \moc{OPP1} $|$ \moc{OGAU} $\}~[$ \dusa{nmu} $]~]$ \\
$\{$ \moc{TISO} $[~\{$ \moc{EQW} $|$ \moc{GAUS} $|$ \moc{PNTN} $|$ \moc{SMS} $|$ \moc{LSN} $|$ \moc{QRN} $\}~]$ \dusa{nangl} \dusa{dens} $[$ \moc{CORN} 
\dusa{pcorn} $]$ \\
$~~~~~|$ \moc{TSPC} $[~\{$ \moc{EQW} $|$ \moc{MEDI} $|$ \moc{EQW2} $\}~]$ \dusa{nangl} \dusa{dens} $\}$ \\
$[~\{$ \moc{NOTR} $|$ \moc{MC} $\}~]$\\
$[$ \moc{NBSLIN} \dusa{nbslin} $]$ \\
$[$ \moc{MERGMIX} $]$\\
$[$ \moc{LONG} $]$\\
$[$ \moc{PRIZ} \dusa{denspr} $]$ \\
{\tt ;}
\end{DataStructure}

\noindent
where

\begin{ListeDeDescription}{mmmmmmmm}

\item[\moc{ANIS}] keyword to specify the order of scattering anisotropy. 

\item[\dusa{nanis}] order of anisotropy in transport calculation.
A default value of 1 represents isotropic (or transport-corrected) scattering while a value of 2
correspond to linearly anisotropic scattering. When anisotropic scattering is considered, user should pay attention to the following points:
\begin{itemize}
\item the usage of \moc{DIAG}, \moc{SYME}, \moc{SSYM} keywords in the definition of the geometry is forbidden. Indeed, in \moc{EXCELT:}/\moc{NXT:} tracking procedures, the geometry is ``unfolded'' according to these symmetries : this is incompatible with the integration of the anisotropic moments of the flux; \\
\item an angular dependent normalization of the track lengths should be requested in the tracking procedure (\moc{REND} keyword) in order to ensure the particle conservation; \\
\item the angular quadratures should be selected paying attention to the restrictions mentioned in this manual in order to ensure the particle conservation.
\end{itemize}

\item[\moc{ONEG}] keyword to specify that the tracking is read before computing each group-dependent collision
probability or algebraic collapsing matrix (default value if \dusa{TRKFIL} is set). The tracking file is
read in each energy group if the method of characteristics (MOC) is used.

\item[\moc{ALLG}] keyword to specify that the tracking is read once and the collision
probability or algebraic collapsing matrices are computed in many energy groups.  The tracking file is
read once if the method of characteristics (MOC) is used.
 
\item[\moc{XCLL}] keyword to specify that the tracking is computed {\sl on-demand} (it is not stored on a file) and the
collision probability matrices are computed in many energy groups. The tracking
file \dusa{TRKFIL} should {\sl not} be provided (default value if \dusa{TRKFIL} is not set).

\item[\moc{BATCH}] keyword to specify the number of tracks processed by each core for each energy group. OpenMP parallelization is processing each energy group on a different core. The default value is \dusa{nbatch} $=1$.

\item[\dusa{nbatch}] the number of tracks processed by each core. Usually, a value \dusa{nbatch} $\ge 100$ is recommended.

\item[\moc{QUAB}] keyword to specify the number of basis point for the
numerical integration of each micro-structure in cases involving double
heterogeneity (Bihet).

\item[\dusa{iquab}] the number of basis point for the numerical integration of
the collision probabilities in the micro-volumes using the Gauss-Jacobi
formula. The values permitted are: 1 to 20, 24, 28, 32 or 64. The default value
is \dusa{iquab} = 5. If \dusa{iquab} is negative, its absolute value will be used in the She-Liu-Shi approach to determine the
split level in the tracking used to compute the probability collisions.

\item[\moc{SAPO}] use the Sanchez-Pomraning double-heterogeneity model.\cite{sapo}

\item[\moc{HEBE}] use the Hebert double-heterogeneity model (default option).\cite{BIHET}

\item[\moc{SLSI}] use the She-Liu-Shi double-heterogeneity model without shadow effect.\cite{She2017}

\item[\dusa{frtm}] the minimum microstructure volume fraction used to compute the size of the equivalent cylinder in She-Liu-Shi approach. The default value is \dusa{frtm} $=0.05$.

\item[\moc{PISO}] keyword to specify that a collision probability calculation with isotropic reflection boundary 
conditions is required. It is the default option if a \moc{TISO} type integration is chosen. To obtain accurate
transmission probabilities for the isotropic case it is recommended that the normalization 
options in the \moc{ASM:} module be used. 

\item[\moc{PSPC}] keyword to specify that a collision probability calculation with mirror like reflection or periodic 
boundary conditions is required; this is the default option if a \moc{TSPC} type integration is chosen. 
This calculation is only possible if the file was initially constructed using the \moc{TSPC} option. 

\item[\moc{CUT}] keyword to specify the input of cutting parameters for the specular collision probability
of characteristic integration. 

\item[\dusa{pcut}] real value representing the maximum error allowed on the exponential function used
for specular collision probability calculations. Tracks will be cut at a length such that the error in the 
probabilities resulting from this reduced track will be of the order of pcut. By default, the tracks 
are extended to infinity and \dusa{pcut} = 0.0. If this option is used in an entirely reflected case, it is 
recommended to use the \moc{NORM} command in the \moc{ASM:} module. 

\item[\moc{SYMM}] keyword to specify the level to which the tracking will respect the symmetry of the geometry. 

\item[\dusa{isymm}]  level to which the tracking will respect the symmetry of the geometry. For 2-D and 3-D Cartesian geometries it must takes the form \dusa{isymm}=$2 S_{x}+4S_{y}+16 S_{z}$ where
\begin{itemize}
\item $S_{x}=1$ if the $X$ symmetry is to be considered and $S_{x}=0$ otherwise.   
\item $S_{y}=1$ if the $Y$ symmetry is to be considered and $S_{y}=0$ otherwise.   
\item $S_{z}=1$ if the $Z$ symmetry is to be considered and $S_{z}=0$ otherwise.   
\end{itemize}

\item[\moc{NOSY}] keyword to specify the full tracking will take place irrespective of the symmetry of the geometry. This is equivalent to specifying \dusa{isymm}=0.

\item[\moc{GAUS}] keyword to specify that Gauss-Legendre polar integration angles are to be selected for the polar quadrature when a prismatic tracking is considered. The conservation is ensured up to $P_{\dusa{nmu}-1}$ scattering.

\item[\moc{CACA}] keyword to specify that CACTUS type equal weight polar integration angles are to be
selected for the polar quadrature when a prismatic tracking is considered.\cite{CACTUS} The conservation is ensured only for isotropic scattering.

\item[\moc{CACB}] keyword to specify that CACTUS type uniformly distributed integration polar angles
are to be selected for the polar quadrature when a prismatic tracking is considered.\cite{CACTUS} The conservation is ensured only for isotropic scattering.

\item[\moc{LCMD}] keyword to specify that optimized (McDaniel--type) polar integration angles are to be
selected for the polar quadrature when a prismatic tracking is considered.\cite{LCMD} This is the default option. The conservation is ensured only for isotropic scattering.

\item[\moc{OPP1}] keyword to specify that $P_1$ constrained optimized (McDaniel--type) polar integration angles are to be selected for the polar quadrature when a prismatic tracking is considered.\cite{LeTellierpa} The conservation is ensured only for isotropic and linearly anisotropic scattering.

\item[\moc{OGAU}] keyword to specify that Optimized Gauss polar integration angles are to be
selected for the method of characteristics.\cite{LCMD,LeTellierpa} The conservation is ensured up to $P_{\dusa{nmu}-1}$ scattering.

\item[\dusa{nmu}]  user-defined number of polar angles. By default, a value consistent with \dusa{nangl} is computed by the code. For \moc{LCMD}, \moc{OPP1}, \moc{OGAU} quadratures, \dusa{nmu} is limited to 2, 3 or 4.

\item[\moc{TISO}] keyword to specify that isotropic tracking parameters will be supplied. This is the
default tracking option for cluster geometries. 

\item[\moc{TSPC}] keyword to specify that specular tracking parameters will be supplied.

\item[\moc{EQW}] keyword to specify the use of equal weight quadrature.\cite{eqn} The conservation is ensured up to $P_{\dusa{nangl}/2}$ scattering.

\item[\moc{GAUS}] (after \moc{TISO} keyword) keyword to specify the use of the Gauss-Legendre quadrature. This option is valid only if an 
hexagonal geometry is considered.

\item[\moc{PNTN}] keyword to specify that Legendre-Techbychev quadrature quadrature will be selected.\cite{pntn} The conservation is ensured only for isotropic and linearly anisotropic scattering.

\item[\moc{SMS}] keyword to specify that Legendre-trapezoidal quadrature quadrature will be selected.\cite{sms} The conservation is ensured up to $P_{\dusa{nangl}-1}$ scattering.

\item[\moc{LSN}] keyword to specify the use of the $\mu_1$--optimized level-symmetric quadrature. The conservation is ensured up to $P_{\dusa{nangl}/2}$ scattering.

\item[\moc{QRN}] keyword to specify the use of the quadrupole range (QR) quadrature.\cite{quadrupole}

\item[\moc{MEDI}] keyword to specify the use of a median angle quadrature in \moc{TSPC} cases. Instead of
selecting the angles located at the end of each angular interval, the angles located in the middle of
these intervals are selected. This is particularly useful if one wants to avoid
tracking angles that are parallel to the $X-$ or $Y-$axis as its is the case
when the external region of a \moc{CARCEL} geometry is voided.

\item[\moc{EQW2}] keyword to eliminate angles $\phi=0$ and $\phi=\pi/2$ from the \moc{EQW} quadrature in \moc{TSPC} cases.

\item[\dusa{nangl}] angular quadrature parameter. For a 3-D \moc{EQW} option, the choices are \dusa{nangl} = 2, 4, 8, 10, 12, 14 
or 16. For a 3-D \moc{PNTN} or \moc{SMS} option, \dusa{nangl} is an even number smaller than 46.\cite{ige260} For 2-D 
isotropic applications, any value of \dusa{nangl} may be used, equidistant angles will be selected.

For 2-D specular applications the input value must be of the form $p + 1$ where $p$ is a prime number, as proposed
in Ref.~\citen{DragonPIJS3}. In this case, the choice of \dusa{nangl} = 2, 8, 12, 14, 18, 20, 24, or 30 are allowed. For
a rectangular Cartesian domain of size $X \times Y$, the azimuthal angles in $(0,\pi/2)$ interval are obtained from formula
\begin{align*}
\phi_k=\begin{cases}
\arctan\left(\frac{kY}{(p-k)X}\right)  \, , \ \ k=0,\, 1,\, 2,\, \dots, \, p & \text{if {\tt EWQ} (default)}\\
\arctan\left(\frac{kY}{(2p+2-k)X}\right) \, , \ \ k=1,\, 3,\, 5, \, \dots, \, 2p+1 & \text{if {\tt MEDI}} \\
\arctan\left(\frac{kY}{(p+2-k)X}\right) \, , \ \ k=1,\, 2,\, 3, \, \dots, \, p+1 &\text{if {\tt EQW2}.}\\
\end{cases}
\end{align*}

\item[\dusa{dens}] real value representing the density of the integration lines (in cm$^{-1}$ for 2-D Cartesian cases and 
3-D hexagonal cases and cm$^{-2}$ for 3-D cases Cartesian cases). This choice of density along the 
plan perpendicular to each angle depends on the geometry of the cell to be analyzed. If there 
are zones of very small volume, a high line density is essential. This value will be readjusted by 
\moc{NXT:}.

\item[\moc{CORN}] keyword to specify that the input of the parameters used to treat the corners for the isotropic 
integration. 

\item[\dusa{pcorn}] maximum distance (cm) between a line and the intersection of $n\ge 2$ external surfaces where 
track redistributing will take place. Track redistribution will take place if a line comes close to 
the intersection of $n \ge 2$ external surfaces. In this case the line will be replicated $n$ times, each 
of these lines being associated with a different external surface, while its weight is reduced by 
a factor of $1/n$. This allows for a better distribution of tracks which are relatively close to $n$ 
external surfaces. By default, there is no treatment of the corners and \dusa{pcorn} = 0.0.

\item[\moc{NOTR}] keyword to specify that the geometry will not be tracked. This is useful for 2-D geometries 
to generate a tracking data structure that can be used by the \moc{PSP:} module (see \Sect{PSPData}). 
One can then verify visually if the geometry is adequate before the tracking process as such is 
undertaken.

\item[\moc{MC}] keyword to specify that the geometry will not be tracked and that object \dusa{TRKNAM} will be used with the
Monte-Carlo method. This option is similar to \moc{NOTR} with additional information being added into \dusa{TRKNAM}.

\item[\moc{NBSLIN}] keyword to set the maximum number of segments in a single tracking line.

\item[\dusa{nbsl}] integer value representing the maximum number of segments in a single tracking line. The default value is \dusa{nbsl} = 100000.

\item[\moc{MERGMIX}] keyword to specify that all regions belonging to the same mixture will be merged together. This option should only be used as an attempt to reduce CPU costs in resonance self-shielding calculations.

\item[\moc{LONG}] keyword to specify that a ``long'' tracking file will be generated. This option is required if the tracking file is to be used by the \moc{TLM:} module (see \Sect{TLMData}).

\item[\moc{PRIZ}] keyword to specify that a prismatic tracking is considered for a 3D geometry invariant along the $z-$ axis. In this case, the 3D geometry is projected in the $x-y$ plane and a 2D tracking on the projected geometry is performed. This capability is limited to the non-cyclic method of characteristics solver for the time being and a subsequent call to \moc{MCCGT:} is mandatory.

\item[\dusa{denspr}] real value representing the linear track density (in cm$^{-1}$) to be used for the inline contruction of 3D tracks from 2D tracking when a prismatic tracking is considered.

\end{ListeDeDescription}
\clearpage
