\section{Data analysis}
\subsection{Digital pulse processing}
\label{sub:digital_pulse_processing}
Since we recorded all detector outputs using digitizers, offline digital pulse
processing is needed to extract energy and timing information. Typical output
pulses from HPGe and \ce{LaBr3} detectors are shown in
\cref{fig:typical_pulses}. 

\begin{center}
  \begin{figure}[tbp]
    \centering
    \includegraphics[width=1.0\textwidth]{figs/typical_pulses}
    \caption{Typical output pulses of HPGe and \ce{LaBr3} detectors: energy
      output HPGe high gain (top left), energy output HPGe low gain (top
      right), timing output HPGe (bottom left), and \ce{LaBr3} (bottom right).
      Each clock tick corresponds to \SI{10}{\ns} and \SI{2}{\ns} for top and
      bottom plots, respectively.}
    \label{fig:typical_pulses}
  \end{figure}
\end{center}

The timing pulses from the HPGe detector were not used in this analysis because
they are too long and noisy (see bottom left \cref{fig:typical_pulses}).
Energy of the HPGe detector is taken as amplitude of spectroscopy amplifier
outputs, its timing is determined by the clock tick where the trace passes
\SI{30}{\percent} of the amplitude. The timing resolution is \SI{235}{\ns}
using this method.

\subsection{Calibrations}
\label{sub:calibrations}
The HPGe detector energy scales and acceptance were calibrated
using \ce{^{152}Eu}, \ce{^{60}Co}, \ce{^{88}Y} sources placed at the target
position. There was a separate run for background radiation.

Energy resolutions are better than \SI{3.2}{\keV} for all calibrated peaks.
\begin{center}
  \begin{figure}[htbp]
    \centering
    \includegraphics[width=1.0\textwidth]{figs/hpge_ecal}
    \caption{Energy calibration spectra for the HPGe detector.}
  \label{fig:hpge_ecal}
  \end{figure}
\end{center}

The detector acceptance above \SI{200}{\kilo\eV} were fitted using an empirical
function:
\begin{equation}
  A = c_1 \times E ^ {c_2},
\end{equation}
where $c_1 = 0.1631$, $c_2 = -0.9257$, and $E$ is photon energy in \si{\keV}.
Interpolation gives detector acceptance at the peaks of interest as shown in
\cref{tab:hpge_acceptance}.

\begin{center}
  \begin{figure}[htbp]
    \centering
    \includegraphics[width=1.0\textwidth]{figs/hpge_higain_acceptance}
    \caption{Acceptance of the HPGe as a function of photon energy.}
  \label{fig:hpge_higain_acceptance}
  \end{figure}
\end{center}

\begin{table}[tbp]
\centering
\caption{HPGe acceptance for photons of interest}
\label{tab:hpge_acceptance}
\begin{tabular}{@{}cccc@{}}
\toprule
\multicolumn{2}{c}{\textbf{\begin{tabular}[c]{@{}c@{}}Photon energy\\ {[}keV{]}\end{tabular}}} & \textbf{Acceptance} & \textbf{Error} \\
\midrule
$2p-1s$   & 346.8      & \num{8.75E-4}          &\num{4.0e-5}  \\
\ce{^{27}Mg}    & 843.7      & \num{3.40E-4}          &\num{0.9e-5}  \\
        % & 1014.4     & \num{2.69e-4}          &\num{1.07e-5}  \\
\ce{^{nat}Ti}   & 931.96     & \num{3.06E-4}          &\num{0.8e-5}  \\
\ce{^{26}Mg}*   & 1088.7     & \num{1.51e-4}          &\num{0.7e-5}  \\
% 0 	346.828 	0.000875 	0.000040
% 1 	399.268 	0.000753 	0.000030
% 2 	400.177 	0.000751 	0.000030
% 3 	476.800 	0.000624 	0.000022
% 4 	843.740 	0.000340 	0.000009
% 5 	930.000 	0.000306 	0.000008
% 6 	931.000 	0.000306 	0.000008
% 7 	932.000 	0.000306 	0.000008
% 8 	1014.420 	0.000279 	0.000008
% 9 	1808.660 	0.000151 	0.000007
\bottomrule
\end{tabular}
\end{table}

\subsection{Number of stopped muons}
% TODO: justification for taking just number from muon counter

The number of stopped muons are taken as number of muons seen by the muon
counter, since we used thick targets the muon beam is believed to stop
completely at the middle of the targets. This assumption is verified for the
aluminum target where count from muon counter was consistent with number of
stopped muons calculated from number of $(2p-1s)$ X-rays.

\subsection{Muonic X-ray spectra}
We use the HPGe spectra to look for characteristic muonic X-rays from elements
of interest. Energies of these muonic X-rays are listed
in~\cref{tab:hpge_acceptance}. 

\subsubsection{Titanium}
We are looking at X-rays from $(2p-1s)$ transitions in titanium. Natural
titanium has 5 stable isotopes: \ce{^{46}Ti}, \ce{^{47}Ti}, \ce{^{48}Ti},
\ce{^{49}Ti}, and \ce{^{50}Ti}, with the \ce{^{48}Ti} being the
most abundant at 73.72\%. The fine splitting between muonic $2p_{3/2}
$ and $2p_{1/2}$ levels in these stable isotopes are about
\SI{2}{keV}~\cite{Wohlfahrt1981}, comparable to the resolution of our HPGe
detector. The $(2p-1s)$ X-rays therefore show up as a broad, asymmetric peak
with a longer tail on the low energy side. The peak is fitted as two
Gaussian peaks on top of a first-order polynomial. 

\subsection{Fraction of muon captured by a nucleus}
An atomic captured muon at the 1S state has only two choices, either to decay
in orbit or to be captured on the nucleus. The total disappearance rate for
negative muon, $\Lambda_{tot}$, is given by: 
\begin{equation}
  \Lambda_{tot} = \Lambda_{cap} + Q \Lambda_{free},
  \label{eq:mu_total_capture_rate}
\end{equation}
where $\Lambda_{cap}$ and $\Lambda_{free}$ are nuclear capture rate and free
decay rate, respectively, and $Q$ is the Huff factor, which is corrects for the
fact that muon decay rate in a bound state is reduced because of the binding
energy reduces the available energy.

Using mean lifetime measured by Suzuki et.al.~\cite{SuzukiMeasday.etal.1987}
and fractions of muons captured by element of interest are calculated and
listed in~\cref{tab:capture_frac}.
\begin{table}[tbp]
  \centering
  \caption{Nuclear capture probabilities calculated from mean lifetimes taken
    from measurements of Suzuki et.al.~\cite{SuzukiMeasday.etal.1987}}
  \label{tab:capture_frac}
  \begin{tabular}{cccc}
    \toprule
    Element & Mean lifetime & Huff factor & Nuclear capture\\ 
            & [\si{ns}]     &             & probability [\%]\\ 
    \midrule
    \ce{^{nat}Al}   & \num{864.0 \pm 1.0}   & \num{0.993} &\num{60.95(5)}  \\
    \ce{^{nat}Ti}   & \num{329.3 \pm 1.3}   & \num{0.981} &\num{85.29(6)}  \\
    \ce{^{nat}W}    & \num{78.4 \pm 1.5}    & \num{0.860} &\num{96.93(6)}  \\
    \bottomrule
  \end{tabular}
\end{table}

Number of stopped and captured muons in our targets are:
\begin{table}[tbp]
  \centering
  \caption{Number of muons stopped and captured}
  \label{}
  \begin{tabular}{ccc}
    Target & Number of muons stopped & Number of muons captured \\
    \midrule
    \ce{^{nat}Al} & $(2.96002\pm 0.00017) \times 10^8$ & $(1.8041\pm 0.0015) \times 10^8$\\
    \ce{^{nat}Ti} & $(2.17237\pm 0.00015) \times 10^8$ & $(1.8530\pm 0.0013) \times 10^8$\\
    \ce{^{nat}W} &   & \\
  \end{tabular}
\end{table}
