\chapter{Data Analysis} In the first section of this chapter, the measurement of the HRRL emittance and Twiss parameters using the quadrupole scanning method is described. The current in the first quadrupole, Q1, was changed incrementally and the electron beam shapes were observed using the OTR screen located at the end of the 0 degree beamline. The emittance and Twiss parameters are obtained by fitting a parabolic function to the plot $\sigma_{x,y}^2$ vs K$_1$L (K$_1$ is quadrupole strength and L is the quadrupole effective length). The second section describes the energy distribution measurement of the HRRL when it was tuned to generate an electron beam with its peak at 12~MeV. A Faraday cup, FC2, was placed at the end of the 45 degree beamline to measure the electron beam current when D1 was on and D2 was off. The energy scan data and the MATLAB script used for data analysis are given in the appendix A. Last section is about the positron produced using the HRRL located in the Beam Lab of Physics Department at Idaho State University. The electron beam from the HRRL with 12~MeV peak incident on the tungsten production target (T1) produced positrons downstream and positrons were transported to annihilation target (T2), where they annihilate and crated back to back scattered 511~keV photon pairs. Two NaI detectors, their shielding, placement, and operation modes are described. The different methods to count positron rates are discussed. The electron beam current of the HRRL during the positron production was monitored by a scintillator. The calibration of the scintillator using a Faraday cup and oscilloscope is described. At last, the ratios of positrons detected using NaI detectors in coincidence mode to the electrons impinging on T1 are given for 1$\sim$5~MeV positron beam. \section{Emittance Measurement} The HRRL beam emittance was measured by using an optical transition radiation (OTR) screen. This transition radiation was theoretically predicted by Ginzburg and Frank~\cite{Ginzburg-Frank} in 1946 to occur when a charged particle passes the boundary of two media. An OTR based viewer (31.75~mm in diameter and 10~$\mu$m thick aluminum) was installed to observe the electron beam size at 37.2~mA (higher currents might saturate the camera) electron peak currents, available using the HRRL at $15\pm1.5$~MeV with 200~ns macro pulse width. The visible light is produced when a relativistic electron beam crosses the boundary of two media (aluminum and air) with different dielectric constants. Light is emitted in a conical shape at backward angles with the peak intensity at an apex angle of $\theta = 1/\gamma$ ($\gamma$ is relativistic factor) with respect to the incident electron's angle of reflection. A 15 MeV electron accelerated by the HRRL would emit light at $\theta = 2^\circ$. Orienting the OTR target at 45${^\circ}$ with respect to the incident electron beam will result in the high intensity photons being observed at an angle of 90${^\circ}$ with respect to the incident beam, see Figure~\ref{q-scan-layout}. These backward-emitted photons are observed using a digital camera and can be used to measure the shape and the intensity of the electron beam. Although an emittance measurement can be performed in several ways~\cite{emit-ways, sole-scan-Kim}, the quadrupole scanning method~\cite{quad-scan} was used to measure the emittance and Twiss parameters in this work. \subsection{Emittance Measurement Using Quadrupole Scanning Method} Fig.~\ref{q-scan-layout} illustrates the beamline components used to measure the emittance for the quadrupole scanning method. A quadrupole is positioned at the exit of the linac to focus or de-focus the beam as observed on the OTR view screen. The 3.1~m distance between the quadrupole and the screen was chosen in order to minimize chromatic effects and to satisfy the thin lens approximation. %The quadrupole and the screen are located far away to minimize chromatic effects and to increase the veracity of the thin lens approximation used to calculate beam optics. \begin{figure}[htbp] \centering \includegraphics[scale=0.65]{1-Introduction/Figures/quad_scan_setup2.eps} \caption{Apparatus used to measure the beam emittance.} \label{q-scan-layout} \end{figure} Assuming the thin lens approximation, $\sqrt{k_1}L << 1$, is satisfied, the horizontal transfer matrix of a quadrupole magnet may be expressed as % thin lens approximation (sqrt{k1}*L << 1). In our case sqrt{k1}*L =0.07 \begin{equation} \label{quad-trans-matrix} \mathrm{\mathbf{Q}}=\Bigl(\begin{array}{cc} 1 & 0\\ -k_{1}L & 1 \end{array}\Bigr)=\Bigl(\begin{array}{cc} 1 & 0\\ -\frac{1}{f} & 1 \end{array}\Bigr), \end{equation} where $L$ is the length of quadrupole and $f$ is the focal length. $k_{1}$ is the quadrupole strength given by \begin{equation} \label{eq:k1} k_1 = 0.2998 \frac{g\text{(T/m)}}{p\text{(GeV/c)}} = 0.2998 \frac{ \frac{ B(I(\text{A})) }{ R_{\text{q}} } }{p\text{(GeV/c)}}, \end{equation} where $g$ is the gradient of the quadrupole with the Bore aperture radius $R_q$ at a given coil current $I$ and $p$ is the momentum of the electron beam. A matrix representing the drift space between the quadrupole and screen is given by \begin{equation} \label{drift-trans-matrix} \mathbf{\mathbf{S}}=\Bigl(\begin{array}{cc} 1 & l\\ 0 & 1 \end{array}\Bigr), \end{equation} where $l$ is the distance between the scanning quadrupole and the screen. The transfer matrix $\mathbf{M}$ of the scanning region is given by the matrix product $\mathbf{SQ}$. In the horizontal plane, the beam matrix at the screen ($\mathbf{\sigma_{s}}$) is related to the beam matrix of the quadrupole ($\mathbf{\sigma_{q}}$) using the similarity transformation \begin{equation} \mathbf{\mathbf{\sigma_{s}=M\mathrm{\mathbf{\mathbf{\sigma_{q}}}}}M}^{\mathrm{T}}. \end{equation} where the $\mathbf{\sigma_{s}}$ and $\mathbf{\sigma_{q}}$ are defined as~\cite{SYLee} \begin{equation} \mathbf{\mathbf{\sigma_{s,\mathnormal{x}}=}}\Bigl(\begin{array}{cc} \sigma_{\textnormal{s},x}^{2} & \sigma_{\textnormal{s},xx'} \\ \sigma_{\textnormal{s},xx'} & \sigma_{\textnormal{s},x'}^{2} \end{array}\Bigr) ,\; \mathbf{\mathbf{\sigma_{q,\mathnormal{x}}}}=\Bigl(\begin{array}{cc} \sigma_{\textnormal{q},x}^{2} & \sigma_{\textnormal{q},xx'}\\ \sigma_{\textnormal{q},xx'} & \sigma_{\textnormal{q},x'}^{2} \end{array}\Bigr). \end{equation} \noindent %By defining the new parameters~\cite{quad-scan}, $A \equiv \sigma_{11},~B \equiv \frac{\sigma_{12}}{\sigma_{11}},~C \equiv\frac{\epsilon_{x}^{2}}{\sigma_{11}}$ By defining the new parameters~\cite{quad-scan} \begin{equation} A \equiv l^2\sigma_{\textnormal{q},x}^{2},~B \equiv \frac{1}{l} + \frac{\sigma_{\textnormal{q},xx'}}{\sigma_{\textnormal{q},x}^{2}},~\text{and}~C \equiv l^2\frac{\epsilon_{x}^{2}}{\sigma_{\textnormal{q},x}^{2}}, \end{equation} the matrix element $\sigma_{\textnormal{s},x}^{2}$, the square of the beam size's rms at the screen, may be expressed as a parabolic function of the product of $k_1$ and $L$ \begin{equation} \sigma_{\textnormal{s},x}^{2}=A(k_{1}L)^{2}-2AB(k_{1}L)+(C+AB^{2}). \label{par_fit} \end{equation} The emittance measurement was performed by changing the quadrupole current, which changes $k_{1}L$, and measuring the corresponding beam image size on the view screen. The measured two-dimensional beam image was projected along the image's abscissa and ordinate axes. A super Gaussian fitting function is used on each projection to determine the rms value, $\sigma_{\textnormal{s}}$ in Eq.~(\ref{par_fit}). Measurements of $\sigma_{\textnormal{s}}$ for several quadrupole currents ($k_{1}L$) are then fit using the parabolic function in Eq.~(\ref{par_fit}) to determine the constants $A$, $B$, and $C$. The unnormalized projected rms emittance ($\epsilon$) and the Twiss parameters ($\alpha$ and $\beta$) can be found using Eq.~(\ref{emit-relation}) \begin{equation} \epsilon=\frac{\sqrt{AC}}{l^2},~\beta=\sqrt{\frac{A}{C}},~\alpha=\sqrt{\frac{A}{C}}(B+\frac{1}{l}). \label{emit-relation} \end{equation} \subsection{HRRL Emittance Measurement Experiment} A quadrupole scanning method was used to measure the accelerator's emittance. The quadrupole current is changed to alter the strength and direction of the quadrupole magnetic field such that a measurable change in the beam shape is seen by the OTR system. Initially, the beam was steered by the quadrupole indicating that the beam was not entering along the quadrupole's central axis. Several magnetic elements upstream of this quadrupole were adjusted to align the incident electron beam with the quadrupole's central axis. First, the beam current observed by a Faraday cup located at the end of beam line was maximized using upstream steering coils within the linac nearest the gun. Second, the first solenoid nearest the linac gun was used to focus the electron beam on the OTR screen. Steering coils were adjusted to maximize the beam current to the Faraday cup and minimize the deflection of the beam by the quadrupole. A second solenoid and the last steering magnet shown in Figure~\ref{fig:app-hrrl-cavity}, both near the exit of the linac, were used in the final step to optimize the beam spot size on the OTR target and maximize the Faraday cup current. A configuration was found that minimized the electron beam deflection when the quadrupole current was altered during the emittance measurements. The emittance measurement was performed using an electron beam energy of 15~MeV and a 200~ns long macro pulse of 40~mA electron current. The current in the first quadrupole after the exit of the linac was changed from $-$~5~A to $+$~5~A with an increment of 0.2~A. Seven measurements were taken at each current step in order to determine the average beam width and the variance. Background measurements were taken by turning the linac's electron gun off while keep the RF on. OTR images of the beam is shown in Figure~\ref{fig:eBeam}. The digitized OTR images before and after background subtraction are shown in Figure~\ref{bg}. A small dark current is visible in Figure~\ref{bg} (b) that is known to be generated when electrons are pulled off the cavity wall and accelerated. \begin{figure}[htbp] \centering \includegraphics[scale=0.6]{4-Experiment/Figures/ElectronBeam26} \caption{The 15~MeV electron beam observed using the OTR screen when dipole coil current was at 0. The macro pulse was 200~ns and the electron peak current was 40~mA .} \label{fig:eBeam} \end{figure} \begin{figure}[htbp] \begin{tabular}{ccc} \centerline{\scalebox{0.42} [0.42]{\includegraphics{4-Experiment/Figures/MOPPR087f4.eps}}} \\ (a)\\ \centerline{\scalebox{0.42} [0.42]{\includegraphics{4-Experiment/Figures/MOPPR087f5.eps}}}\\ (b)\\ \centerline{\scalebox{0.42} [0.42]{\includegraphics{4-Experiment/Figures/MOPPR087f6.eps}}}\\ (c) \end{tabular} \caption{Digital image from the OTR screen; (a) an image taken with the beam on, (b) a background image taken with the RF on but the electron gun off, (c) The background subtracted beam image ((a)-(b)).} \label{bg} \end{figure} The electron beam energy was measured using a dipole magnet downstream of the quadrupole used for the emittance measurements. Prior to energizing the dipole, the electron micro-pulse bunch charge passing through the dipole was measured using a Faraday cup located approximately 50~cm downstream of the OTR screen. The dipole current was adjusted until a maximum beam current was observed on another Faraday cup located just after the 45 degree exit port of the dipole. A magnetic field map of the dipole indicates that the electron beam energy was 15~$\pm$~1.6~MeV. %\subsection{Data Analysis and Results} Images from the JAI camera were calibrated using the OTR target frame. An LED was used to illuminate the OTR aluminum frame that has a known inner diameter of 31.75~mm. Image processing software was used to inscribe a circle on the image to measure the circular OTR inner frame in units of pixels. The scaling factor can be obtained by dividing this length with the number of pixels observed. The result is a horizontal scaling factor of 0.04327~$\pm$~0.00016 mm/pixel and vertical scaling factor of 0.04204~$\pm$~0.00018 mm/pixel. Digital images from the JAI camera were extracted in a matrix format in order to take projections on both axes and perform a Gaussian fit. The observed image profiles were not well described by a single Gaussian distribution. The profiles may be described using a Lorentzian distribution, however, the rms of the Lorentzian function is not defined. A super Gaussian distribution was used~\cite{sup-Gau}, because it has a sharper distribution than Gaussian and, unlike Lorentzian, the rms values may be directly extracted. The super Gaussian reduced the Chi-square per degree of freedom by a factor of ten compared to a typical Gaussian fit. The beam spot, beam projections, and fits are shown in Figure~\ref{Gau-SupGaus-fits}. In a typical Gaussian distribution, $\phi(x)=\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^2}$, the independent variable $x$ is raised to the 2nd power while in the super Gaussian it is raised to a power smaller than 2. For example, the beam projections shown in Figure~\ref{Gau-SupGaus-fits} were fitted with the super Gaussian distributions. The variable $x$ on the exponent was raised to $0.9053$ ($x$-projection) and $1.0427$ ($y$-projection). \begin{figure}[htbp] \begin{tabular}{lr} {\scalebox{0.38} [0.38]{\includegraphics{4-Experiment/Figures/Gau_SupGau/Gau_ChiSqaure.eps}}} {\scalebox{0.38} [0.38]{\includegraphics{4-Experiment/Figures/Gau_SupGau/SupGau_ChiSqaure.eps}}} \end{tabular} \caption{Gaussian and super Gaussian fits for beam projections. The beam images is background subtracted image and taken when quadrupole magnets are turned off. Left image is Gaussian fit and right image is super Gaussian fit.} \label{Gau-SupGaus-fits} \end{figure} Figure~\ref{fig:par-fit} shows the square of the rms ($\sigma^2_{\textnormal{s}}$) $vs$ $k_1L$ for $x$ (horizontal) and $y$ (vertical) beam projections along with the parabolic fits using Eq.~\ref{fig:par-fit}. The emittance and Twiss parameters from these fits are summarized in Table~\ref{tab:results}. The MATLAB~\cite{MATLAB} scripts used to calculate emittance and Twiss parameters are given in appendix B. \begin{figure}[htbp] \begin{tabular}{lr} {\scalebox{0.27} [0.27]{\includegraphics{4-Experiment/Figures/par_fit_x.eps}}} {\scalebox{0.27} [0.27]{\includegraphics{4-Experiment/Figures/par_fit_y.eps}}} \end{tabular} \caption{Square of rms values and parabolic fittings. As the quadrupole current changes, so does quadrupole strength times quadrupole legnth, k$_1$L, and the square of the beam rms changes accordingly.} \label{fig:par-fit} \end{figure} \begin{table} \centering \caption{Emittance Measurement Results} \begin{tabular}{lcc} \toprule {Parameter} & {Unit} & {Value} \\ \midrule unpolarized projected emittance $\epsilon_x$ & $\mu$m & $0.37 \pm 0.02$ \\ unpolarized projected emittance $\epsilon_y$ & $\mu$m & $0.30 \pm 0.04$ \\ % normalized \footnote{normalization procedure assumes appropriate beam chromaticity.} emittance $\epsilon_{n,x}$ & $\mu$m & $10.10 \pm 0.51$ \\ %normalized emittance $\epsilon_{n,y}$ & $\mu$m & $8.06 \pm 1.1$ \\ $\beta_x$-function & m & $1.40 \pm 0.06$ \\ $\beta_y$-function & m & $1.17 \pm 0.13$ \\ $\alpha_x$-function & rad & $0.97 \pm 0.06$ \\ $\alpha_y$-function & rad & $0.24 \pm 0.07$ \\ micro-pulse charge & pC & 11 \\ micro-pulse length & ps & 35 \\ energy of the beam $E$ & MeV & 15 $\pm$ 1.6 \\ relative energy spread $\Delta E/E$ & \% & 10.4 \\ \bottomrule \end{tabular} \label{tab:results} \end{table} \section{Measurement of HRRL Electron Beam \\Energy Spread at 12~MeV} The HRRL energy profile was measured when it was tuned to accelerate electrons to 12~MeV peak energy. A Faraday cup, FC2, was placed at the end of the 45 degree beamline to measure the electron beam current when D1 was on and D2 was off. The dipole coil current for D1 was changed in 1~A increments. As the dipole coil current was changed, the energy of the electrons transported to the Faraday cup would change as described in Appendix A. Figure~\ref{fig:En-Scan} illustrates a measurement of the 12~MeV peak illustrating the observed low energy tail. The HRRL energy profile can be described by overlapping two skewed Gaussian fits~\cite{sup-Gau}. The fit function is given by \begin{equation} G(En)=A_{1}e^{\frac{-\left(En-\mu_{1}\right)^{2}}{2\left\{ \sigma_{1}\left[1+sgn\left(En-\mu_{1}\right)\right]\right\} ^{2}}}+A_{2}e^{\frac{-\left(En-\mu_{2}\right)^{2}}{2\left\{ \sigma_{2}\left[1+sgn\left(En-\mu_{2}\right)\right]\right\} ^{2}}}, \label{eq:skew-Gau} \end{equation} where $sgn$ is the sign function, that is defined as $$ sgn=\left\{ \begin{array}{ll} \mbox -1\ & {(x<0)} \\ \mbox 0 \ & {(x=0)} \\ \mbox 1 \ & {(x>0)}.\\ \end{array}\right. $$ The other variables are defined as $\sigma_{1}=\frac{\sigma_{r,1}+\sigma_{l,1}}{2}$, $\sigma_{2}=\frac{\sigma_{r,2}+\sigma_{l,2}}{2}$, $E_{1}=\frac{\sigma_{r,1}-\sigma_{l,1}}{\sigma_{r,1}+\sigma_{l,1}}$, and $E_{2}=\frac{\sigma_{r,2}-\sigma_{l,2}}{\sigma_{r,2}+\sigma_{l,2}}$. The measurement results and fits are shown in Figure~\ref{fig:En-Scan} and in Table~\ref{tab:En-Scan_resluts}. \begin{figure}[htbp] \centering \includegraphics[scale=0.5]{4-Experiment/Figures/En_Fit_Assym_Gau.eps} \caption{HRRL energy scan (dots) and fit (line) with two skewed Gaussian distribution.} \label{fig:En-Scan} \end{figure} \begin{table} \centering \caption{Fit Parameters for Two Skewed Gaussian.} \begin{tabular}{lclcc} \toprule {Parameter} & Notation & Unit & {First Gaussian} & {Second Gaussian} \\ \midrule amplitude & A & mA & ~2.14 & 10.88 \\ mean & $\mu$ & MeV & 12.07 & 12.32 \\ sigma left & $\sigma_L$ & MeV & ~4.47 & ~0.70 \\ sigma right & $\sigma_R$ & MeV & ~1.20 & ~0.45 \\ \bottomrule \end{tabular} \label{tab:En-Scan_resluts} \end{table} % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % \section{Positron Production Experiment} Positron produced using the HRRL located in the Beam Lab of Physics Department at Idaho State University. The electron beam of the HRRL was incident on T1, positron production target, and the positrons produced downstream of T1 was transported to T2, annihilation target, where they annihilate and crated back to back scattered 511~keV photon pairs. Two NaI detectors, shielded with Pb bricks, were placed horizontally and operated in coincidence with electron electron gun pulse to detect 511~keV photon pairs came out of T2. The electron beam current of the HRRL was monitored by a scintillator was placed between Q9 and Q10. The ROOT script used to calculate number/charge of positrons/electrons and the ratio of the two is given in the appendix. %Positrons transported to the scintillator located at the end of 90 degree the beamline. \subsection{The Electron Beam Current Measurement} A scintillator was placed between Q9 and Q10, as shown in Figure~\ref{fig:Scint_e-}, to monitor the electron beam current. The electron beam current was changed incrementally to measure the correlation between the scintillator and the accelerated electron beam. The beam current was measured using FC1 and the output was integrated using an oscilloscope. The scintillator output was integrated using an ADC (CAEN Mod. V792). As the electron beam current was decreased, the signal observed on the oscilloscope decreased and the ADC measured less charge from the scintillator as shown in Figure~\ref{fig:ADC-CH9}. A linear fit to data resulted a linear relation \begin{equation} Q_{\text{e}^-}(i) = (0.0186 \pm 0.0028)i + 2.79 \pm 0.08~\text{C}, \end{equation} where $i$ is ADC channel number and $Q$ is the accelerated electron beam charge. The fit is shown in Figure~\ref{fig:calb-fit}. \begin{figure}[htbp] \centering \includegraphics[scale=0.4]{4-Experiment/Figures/HRRL_line.eps} \caption{The electron beam monitor.} \label{fig:Scint_e-} \end{figure} \begin{figure}[htbp] \centering \includegraphics[scale=0.76]{4-Experiment/Figures/ScintilatorCalibration/ADC_CHAN4.eps} \caption{The photon flux detected using scintillator. The mean of the ADC channel decreased linearly as the electron beam current was decreased. The electron beam current was measured using the Faraday cup at the end of the 0 degree beamline, FC1, and integrated using oscilloscope.} \label{fig:ADC-CH9} \end{figure} \begin{figure}[htbp] \centering \includegraphics[scale=0.70]{4-Experiment/Figures/ScintilatorCalibration/calb.eps} \caption{Fit for accelerator beam current $v.s.$ the ADC channel.} \label{fig:calb-fit} \end{figure} \begin{table} \centering \caption{Scintillator Calibration Data.} \begin{tabular}{lll} \toprule {Run Number} & {Faraday Cup} & {Mean of ADC} \\ { } & {Charge Area (nVs)} & {Channel 9} \\ \midrule 3703 & $1201 \pm 10$ & $1126 \pm 0.8$ \\ 3705 & $777 \pm 110$ & $791.8 \pm 0.6$ \\ 3706 & $367.7 \pm 2.3$ & $242.1 \pm 0.3$ \\ \bottomrule \end{tabular} \label{tab:scint_calb} \end{table} When running in coincidence mode, the electron beam current is sampled by the scintillator only when a coincidence event occurs causing a trigger that gates the ADC and measures the scintillator output for that positron coincidence event. The charge measured by the ADC is the total charge of the electron pulses that created the positron events. The number of beam pulses are counted using a scaler. The total charge on T1 for the entire run is estimated using \begin{equation} Q_{\text{C}} = \left ( \overset{N}{\underset{i}{\sum}} 0.0186i\times(\text{bin~content}[i]) + 2.79 \right ) \times \frac{\text{(\# of beam pulses)}}{\text{(\# of events)}}. \label{eq:q_calc1} \end{equation} \noindent \subsection{NaI Detectors} The NaI detectors were calibrated using radioactive sources as mention in the Chapter 2. However, in the positron production experiment conducted using HRRL, the photon peak observed by the NaI detector was not at the channels corresponding the 511~keV energy region (according to the calibration with sources). To determine the peak observed is the 511~keV peak, the Na-22 source was placed between two NaI detectors to measure the spectrum when the RF was on, represented by dotted line (no electrons were fired from accelerator gun), and off, represented by dashed line in Fig~\ref{fig:NaI-peak-shift}. The solid line in Fig~\ref{fig:NaI-peak-shift} represents the photon spectrum created by 3~MeV positrons impinging on T2. When the RF was on, no difference was observed for photon peaks created by the 3~MeV positrons and the 511~keV photon peak from Na-22 source. However, when the RF was off, the 511~keV photon peak from Na-22 source occupied at different channels. It seems the 511~keV peak would shift when the RF is turned on. The 511 keV peak in the right NaI detector was shifted to the right side of the spectrum by 17 channels when the RF was on as shown in Figure~\ref{fig:NaI-peak-shift} (a) while in the left NaI detector the peak shifted to the left by 28 channels as shown if Figure~\ref{fig:NaI-peak-shift} (b). \begin{figure}[htbp] \begin{tabular}{ccc} \centerline{\scalebox{0.6} [0.6]{\includegraphics{4-Experiment/Figures/RunDec2012/PeakShiftNaIL9.eps}}}\\ (a) Left NaI detector. \\ \\ \\ \centerline{\scalebox{0.6} [0.6]{\includegraphics{4-Experiment/Figures/RunDec2012/PeakShiftNaIR9.eps}}} \\ (b) Right NaI detector.\\ \end{tabular} \caption{The 511~keV peak observed using NaI detectors shifted when accelerator RF was on. The spectrum were taken with RF on (dotted line) and with RF off (dashed line). The solid line represents the photon spectrum created by 3~MeV positrons impinging on T2.} \label{fig:NaI-peak-shift} \end{figure} \subsection{Positron Rate Estimation in AND Mode} The background subtracted and normalized photon energy spectra observed using two NaI detectors for $3.00 \pm 0.07$~MeV positrons are shown in Figure~\ref{fig:pos_NaILR}. Figure~\ref{fig:pos_NaILR} (a) and (b) are the background subtracted spectrum with no coincidence or energy cut (OR mode). In OR mode, no coincidence between two detectors are required. Figure~\ref{fig:pos_NaILR} (c) and (d) illustrate events observed in coincidence and within a energy window of $511\pm75$~keV for both detectors (AND or coincidence mode). The measured positron rate using NaI detectors in AND mode was 0.25~Hz for $3.00 \pm 0.07$~MeV positrons when HRRL was operated at 300~Hz repetition rate, 100~mA peak current, and 300~ns (FWHM) macro pulse length. %The uncertainty of the power supplies used for dipoles is 0.1~A which creates 0.06~MeV uncertainty in energy of the beam bent by dipoles. \begin{figure}[htbp] \centering \begin{tabular}{cc} {\scalebox{0.74} [0.74]{\includegraphics[scale=0.40]{4-Experiment/Figures/subtract/whole/NaI_L/r3735_sub_r3736.png}}} & {\scalebox{0.74} [0.74]{\includegraphics[scale=0.40]{4-Experiment/Figures/subtract/whole/NaI_R/r3735_sub_r3736.png}}} \\ (a) & (b) \\ & \\ & \\ {\scalebox{0.74} [0.74]{\includegraphics[scale=0.40]{4-Experiment/Figures/subtract/511_peak/NaI_L/r3735_sub_r3736.png}}} & {\scalebox{0.74} [0.74]{\includegraphics[scale=0.40]{4-Experiment/Figures/subtract/511_peak/NaI_R/r3735_sub_r3736.png}}} \\ (c) & (d) \\ & \\ \end{tabular} \caption{Photon spectrum of NaI detectors after background subtraction created by 3~MeV positrons incident on T2. (a) and (b) are spectrum after background subtractions. (c) and (d) are the spectrum of events coincident in both detectors in 511~keV peaks.} \label{fig:pos_NaILR} \end{figure} %The electron beam was transported to a phosphorous screen at the end of the 90 degree beamline to find the errors on the positron beam energy. The positron beam current was too low to be observed on phosphorous screen. %The beam centered on the phosphorous screen and then steered to the edge by changing current of D2 by 0.1~A. %The phosphorous screen is twice as large as T2 in horizantal direction. \subsection{The Positron Production Runs} The annihilation target T2 is insertable into the beamline and placed inside a 6-way cross that has horizontal sides vacuum sealed with 1~mil stainless steel windows. Positrons intercepting T2 thermalise, annihilate, and produce 511~keV photon pairs back-to-back. These photons are detected by two NaI detectors facing T2 and shielded with Pb bricks as shown in Figure~\ref{fig:HRRL-En-Scan}. The background was measured by retracting T2 thereby allowing positrons to exit the beamline and be absorbed by the beam dump. \begin{figure}[htbp] \centering \includegraphics[scale=0.58]{4-Experiment/Figures/PositronDetection/NaI_Setup4.png} \caption{Positron detection using T2 and NaI detectors.} \label{fig:HRRL-En-Scan} \end{figure} As shown in Figure~\ref{fig:Dipole-in}, a 511~keV peak was observed (solid line) when T2 was in. A permanent dipole magnet was placed on the beamline after Q10 to deflect charged particles on the accelerator side preventing them from entering the shielded cell. The peak was not observed (dashed line) when T2 was in and the permanent magnet was used. The peak was also not observed (doted dashed line) when T2 and the permanent magnet were removed. Thus, one may argue that the observed peak is due to positrons annihilating in T2. \begin{figure}[htbp] \centering \begin{tabular}{cc} {\scalebox{0.319} [0.319]{\includegraphics{4-Experiment/Figures/SweepingDipole/LNaI3.png}}} & {\scalebox{0.319} [0.319]{\includegraphics{4-Experiment/Figures/SweepingDipole/RNaI3.png}}} \\ (a) Original spectrum on left NaI. & (b) Original spectrum on right NaI.\\ \end{tabular} \caption{Photon spectrum when a permanent dipole magnet is inserted along with T2 (dashed line), dipole out and T2 in (solid line), and dipole removed and T2 out (dotted dashed line). The positron energy incident on the T2 was $2.15\pm0.06$~MeV.} \label{fig:Dipole-in} \end{figure} The normalized photon energy spectra observed by two NaI detectors are shown in Figure~\ref{fig:in-out-runs} when T2 was both in (signal) and out (background) of the beamline. Figure~\ref{fig:in-out-runs} (c) and (d) illustrate the events observed when 511~keV photons were required in both detectors. The signal is indicated by the solid line and background by dashed line. \begin{figure}[htbp] \centering \begin{tabular}{ll} {\scalebox{0.29} [0.29]{\includegraphics{4-Experiment/Figures/NaI_L1/r3735_sub_r3736_2.png}}} & {\scalebox{0.29} [0.29]{\includegraphics{4-Experiment/Figures/NaI_R1/r3735_sub_r3736_2.png}}} \\ (a) Original spectrum on left NaI. & (b) Original spectrum on right NaI.\\ & \\ & \\ {\scalebox{0.28} [0.28]{\includegraphics{4-Experiment/Figures/NaI_L2/r3735_sub_r3736_2.png}}} & {\scalebox{0.28} [0.28]{\includegraphics{4-Experiment/Figures/NaI_R2/r3735_sub_r3736_2.png}}} \\ (c) Spectrum with cut on left NaI. & (d) Spectrum with cut on right NaI.\\ & \\ \end{tabular} \caption{The time normalized spectra of photons created by 3~MeV positrons incident on T2. In the top row are original spectrum and in the bottom row are spectrum of incidents happened in the 511~keV peak coincidently in both detectors. The positron beam energy incident on the T2 was $3.00\pm0.06$~MeV.} \label{fig:in-out-runs} \end{figure} %\begin{table} %\centering %\caption{Run Parameters of The Run No. 3735.} %\begin{tabular}{lll} %\toprule %{Parameter} & {Unit} & {Value} \\ %\midrule %run number & & 3735 \\ %repetition rate & Hz & 300 \\ %run time & s & 1002 \\ %pulses & & 301462 \\ %events & & 9045 \\ %e$^+$ Counts on NaI Detectors & & 256 $\pm$ 16\\ %\bottomrule %\end{tabular} %\label{tab:run3735} %\end{table} \subsection{Positron to Electron Ratio in AND Mode} Gaussian distributions were fit to 511~keV photon peaks observed on NaI detectors as shown in Figure~\ref{fig:511Fit} and the fits result in $\sigma_{NaI, 511} = 37.5 \pm 3.0$~keV. Events in the experiment was observed within a 2$\sigma_{NaI, 511}$ energy window (436$-$586~keV) for both detectors. The ratios of positrons, detected using NaI detectors in coincidence mode, to the electrons impinging on T1 at different energies are given in Table~\ref{tab:e+2e-} and the errors on the ratio are statistical. The systematic errors are discussed in the nest section and results are plotted in Figure~\ref{fig:e+2e-}. %error on total counts = sqt(total counts). Rate = Counts/time. Error on rates = sqrt(d(rate)/d(counts)^2*(error on the counts)^2)=sqrt((error on the counts)^2/time^2)=sqrt(counts/time^2)=sqrt(rate/time). \begin{figure}[htbp] \centering \begin{tabular}{cc} {\scalebox{0.76} [0.76]{\includegraphics[scale=0.48]{4-Experiment/Figures/systimatics/NaI_L/3MeV_511Fit_r3735_sub_r3736L.eps}}} & {\scalebox{0.76} [0.76]{\includegraphics[scale=0.48]{4-Experiment/Figures/systimatics/NaI_R/3MeV_511Fit_r3737_sub_r3736R.eps}}} \\ (a) Left NaI detector.& (b) Right NaI detector.\\ & \\ \end{tabular} \caption{} \label{fig:511Fit} \end{figure} \begin{table} \centering \caption{Positron to Electron Rate Ratio.} \begin{tabular}{cc} \toprule {Energy} & {Positron to Electron Ratio} \\ \midrule $1.02 \pm 0.03$ & $(1.7 \pm 0.6)\times10^{-16}$ \\ $2.15 \pm 0.06$ & $(8.6 \pm 1.5) \times10^{-16}$ \\ $3.00 \pm 0.07$ & $(8.52 \pm 0.54)\times10^{-15}$ \\ $4.02 \pm 0.07$ & $(3.11 \pm 0.31)\times10^{-15}$ \\ $5.00 \pm 0.06$ & $(3.32 \pm 0.89)\times10^{-15}$ \\ \bottomrule \end{tabular} \label{tab:e+2e-} \end{table} \subsection{Positron Rate Estimation in Software OR Mode} The ratio of 511~keV photons counted in software OR mode to the electrons incident on T1 are given in Table~\ref{tab:OrMode_e+/e-}. In these runs listed in the table, NaI detectors were operated in triple coincidence between NaI detectors and gun pulse. In the software of OR mode, there is no software coincidence are required between two NaI detectors. In OR mode, left and right NaI detectors observe different 511~keV photon rates (see section 4.4 of Chapter 4 for the detailed analysis on the count asymmetry in NaI detectors). In the experiment, the upstream side of the T2 was facing right NaI detector and right NaI detected more 511~keV photons. The asymmetry is defined as \begin{equation} \text{Asymmetry} = \frac{N_{r}-N_{l}}{N_{r}+N_{l}}\times 100\%, \end{equation} where $N_{r}$ and $N_{l}$ are the number of 511~keV photons detected by right and left NaI detectors respectively. The 511~keV photons are counted in 1, 2, and 3 $\sigma_{NaI, 511}$ ($\sigma_{NaI, 511} = 37.5 \pm 3.0$~keV) energy windows. \begin{table} \centering \caption{The Ratio of 511~keV Photons Measured in OR Mode to the Electrons Incident on T1 Measured in Different $\sigma_{NaI, 511}$ Energy Windows.} \begin{tabular}{cccc} \toprule 1 $\sigma_{NaI, 511}$ Cut \\ \midrule {Energy (MeV)} & {e$^{+}$/e$^{-}$ on NaI Right} & {e$^{+}$/e$^{-}$ on NaI Left} & {Asymmetry} \\ \midrule $1.02 \pm 0.03$ & $( 2.5 \pm 0.3 ) \times10^{-15}$ & $( 0.0 \pm 0.0 ) \times10^{-15}$ & $ 96.0 \pm 2.8 \%$ \\ $2.15 \pm 0.06$ & $( 8.5 \pm 0.6 ) \times10^{-15}$ & $( 1.0 \pm 0.2 ) \times10^{-15}$ & $ 79.2 \pm 4.0 \%$ \\ $3.00 \pm 0.07$ & $( 75.1\pm 1.5 ) \times10^{-15}$ & $( 14.2\pm 0.6 ) \times10^{-15}$ & $ 68.2 \pm 1.3 \%$ \\ $4.02 \pm 0.07$ & $( 42.0\pm 1.2 ) \times10^{-15}$ & $( 6.0 \pm 0.4 ) \times10^{-15}$ & $ 75.1 \pm 1.7 \%$ \\ $5.00 \pm 0.06$ & $( 21.5\pm 2.3 ) \times10^{-15}$ & $( 4.0 \pm 1.0 ) \times10^{-15}$ & $ 68.5 \pm 7.0 \%$ \\ \midrule 2 $\sigma_{NaI, 511}$ Cut \\ \midrule {Energy (MeV)} & {e$^{+}$/e$^{-}$ on NaI Right} & {e$^{+}$/e$^{-}$ on NaI Left} & {Asymmetry} \\ \midrule $1.02 \pm 0.03$ & $( 2.9 \pm 0.3 ) \times10^{-15}$ & $( 0.3 \pm 0.1 ) \times10^{-15}$ & $ 81.5 \pm 5.2 \%$ \\ $2.15 \pm 0.06$ & $( 11.8 \pm 0.7 ) \times10^{-15}$ & $( 1.4 \pm 0.2 ) \times10^{-15}$ & $ 79.0 \pm 3.4 \%$ \\ $3.00 \pm 0.07$ & $( 98.0 \pm 1.7 ) \times10^{-15}$ & $( 19.0 \pm 0.7 ) \times10^{-15}$ & $ 67.6 \pm 1.2 \%$ \\ $4.02 \pm 0.07$ & $( 53.9 \pm 1.3 ) \times10^{-15}$ & $( 8.1 \pm 0.5 ) \times10^{-15}$ & $ 73.9 \pm 1.5 \%$ \\ $5.00 \pm 0.06$ & $( 28.6 \pm 2.6 ) \times10^{-15}$ & $( 5.5 \pm 1.1 ) \times10^{-15}$ & $ 67.6 \pm 6.1 \%$ \\ \midrule 3 $\sigma_{NaI, 511}$ Cut \\ \midrule {Energy (MeV)} & {e$^{+}$/e$^{-}$ on NaI Right} & {e$^{+}$/e$^{-}$ on NaI Left} & {Asymmetry} \\ \midrule $1.02 \pm 0.03$ & $( 3.4 \pm 0.3 ) \times10^{-15}$ & $( 0.4 \pm 0.1 ) \times10^{-15}$ & $ 78.4 \pm 5.1 \%$ \\ $2.15 \pm 0.06$ & $( 13.4\pm 0.7 ) \times10^{-15}$ & $( 1.5 \pm 0.2 ) \times10^{-15}$ & $ 79.3 \pm 3.1 \%$ \\ $3.00 \pm 0.07$ & $( 106.3\pm1.8 ) \times10^{-15}$ & $( 21.4\pm 0.8 ) \times10^{-15}$ & $ 66.5 \pm 1.1 \%$ \\ $4.02 \pm 0.07$ & $( 58.9\pm 1.4 ) \times10^{-15}$ & $( 9.4 \pm 0.5 ) \times10^{-15}$ & $ 72.5 \pm 1.5 \%$ \\ $5.00 \pm 0.06$ & $( 16.4\pm 1.4 ) \times10^{-15}$ & $( 2.9 \pm 0.6 ) \times10^{-15}$ & $ 70.0 \pm 5.6 \%$ \\ \bottomrule \end{tabular} \label{tab:OrMode_e+/e-} \end{table} The errors given in Table~\ref{tab:OrMode_e+/e-} are statistical. Counting positrons in AND mode underestimates the positron rates by factor of 10 approximately compared to the OR mode. The asymmetry tends to decrease as the positron energy increases. The average ratios are given in Table~\ref{tab:SysOrMode_e+/e-}. In the table, the first error on ratios are systematic and second ones are statistical. \begin{sidewaystable} \centering \caption{The Ratio of 511~keV Photons Measured in OR Mode to the Electrons Incident on T1.} \begin{tabular}{cccc} \toprule {Energy (MeV)} & {e$^{+}$/e$^{-}$ on NaI Right} & {e$^{+}$/e$^{-}$ on NaI Left} & {Asymmetry} \\ \midrule $1.02 \pm 0.03$ & $(2.9\pm 0.5 \pm0.3) \times10^{-15}$ & $(0.3 \pm 0.2 \pm 0.1) \times10^{-15}$ & $85.3\pm 9.4\pm5.2\%$ \\ $2.15 \pm 0.06$ & $(11.2\pm2.5 \pm0.7) \times10^{-15}$ & $(1.3 \pm 0.3 \pm 0.2) \times10^{-15}$ & $79.2\pm 0.2\pm3.4\%$ \\ $3.00 \pm 0.07$ & $(93.1\pm16\pm1.7) \times10^{-15}$ & $(18.2\pm 3.7 \pm 0.7) \times10^{-15}$ & $67.4\pm 0.9\pm1.2\%$ \\ $4.02 \pm 0.07$ & $(51.6\pm8.7 \pm1.3) \times10^{-15}$ & $(7.8 \pm 1.7 \pm 0.5) \times10^{-15}$ & $73.8\pm 1.3\pm1.5\%$ \\ $5.00 \pm 0.06$ & $(22.2\pm6.1 \pm2.6) \times10^{-15}$ & $(4.1 \pm 1.3 \pm 1.1) \times10^{-15}$ & $68.7\pm 1.2\pm6.1\%$ \\ \bottomrule \end{tabular} \label{tab:SysOrMode_e+/e-} \end{sidewaystable} \subsection{Positron Rate Estimation in Hardware OR Mode} The positron rate was also measured by running NaI detectors in OR mode and the photon spectrum are shown in Figure~\ref{fig:Or-mode} for $2.15 \pm 0.06$~MeV positrons incident on T2. Two NaI detectors were operated in hardware OR mode in these runs. The rate was $0.21$~Hz for left and $0.35$~Hz right NaI detectors in OR mode. However, when the software coincidence are required between two detectors by only drawing the events happened in 511~keV peaks of both detectors, the rate dropped $0.028$~Hz. \begin{figure}[htbp] \centering \begin{tabular}{cc} {\scalebox{0.76} [0.76]{\includegraphics[scale=0.40]{4-Experiment/Figures/NaIOrMode/r3679_sub_r3680_NaI_L.png}}} & {\scalebox{0.76} [0.76]{\includegraphics[scale=0.40]{4-Experiment/Figures/NaIOrMode/r3679_sub_r3680_NaI_R.png}}} \\ (a) Left NaI detector.& (b) Right NaI detector.\\ & \\ \end{tabular} \caption{The photon rates for $2.15 \pm 0.06$~MeV incident positrons measured by running NaI detectors in OR mode. The rate was $0.21$~Hz for left and $0.35$~Hz right NaI detectors in OR mode while the rate in coincidence (AND) mode was $0.028$~Hz.} \label{fig:Or-mode} \end{figure} \section{Systematic Error Analysis for AND Mode Rate} The systematic errors in the positron production experiment could be introduced by the uncertainty in the magnetic fields and misalignment of the quadrupoles. These systematic errors are discussed in section 6 of Chapter 4.%The uncertainty of the emittances and Twiss parameters of the electron beam would also create systematic error as well. The positron and electron rates are normalized by time which can introduce systematic error as well. However, the uncertainty in run duration time is very small (0.1$-$0.2$\%$) and can be ignored (the duration of positron production runs are around 500$\sim$1000 seconds and the uncertainty is about 1 second). The uncertainty in the 511~keV peaks detected by the NaI detectors would also contribute to the systematic error. %\subsection{Systematic Error Introduced by the Uncertainty of The 511~keV Peak} Gaussian distributions were fit to the 511~keV photon peaks observed on NaI detectors as shown in Figure~\ref{fig:511Fit} and the fits result in $\sigma_{NaI, 511} = 37.5 \pm 3.0$~keV. Events in the experiment was observed in coincidence and within a 2$\sigma_{NaI, 511}$ energy window (436$-$586~keV) for both detectors. The systematic error of the 511~keV photon counts introduced by the uncertainty in the 511~keV peak is studied by counting the photons with 1$\sigma_{NaI, 511}$ (473.5$-$548.5~keV) and 3$\sigma_{NaI, 511}$ (398.5$-$623.5~keV) energy windows. The positron to electron rate ratio for different energy windows are given in Table~\ref{tab:sys2}. The results are plotted in Figure~\ref{fig:e+2e-}. \begin{sidewaystable} \centering \caption{Positron to Electron Rate Ratio: Systematic Error Introduced by The Uncertainty of The 511~keV Peak.} \begin{tabular}{llll} \toprule {Energy} & {Positron to Electron Ratio} & {Positron to Electron Ratio} & {Positron to Electron Ratio} \\ {(MeV)} & {Energy Window: 2$\sigma_{NaI, 511}$} & {Energy Window: 3$\sigma_{NaI, 511}$} & {Energy Window: 1$\sigma_{NaI, 511}$} \\ \midrule $1.02 \pm 0.03$ & $(1.7 \pm 0.6) \times10^{-16}$ & $(1.7 \pm 0.6) \times10^{-16}$ & $(0.5 \pm 0.4) \times10^{-16}$ \\ $2.15 \pm 0.06$ & $(8.6 \pm 1.5) \times10^{-16}$ & $(9.2 \pm 2.0) \times10^{-16}$ & $(3.0 \pm 0.9) \times10^{-16}$ \\ $3.00 \pm 0.07$ & $(8.52 \pm 0.54)\times10^{-15}$ & $(9.90 \pm 0.58)\times10^{-15}$ & $(4.20 \pm 0.35)\times10^{-15}$ \\ $4.02 \pm 0.07$ & $(3.11 \pm 0.31)\times10^{-15}$ & $(3.66 \pm 0.34)\times10^{-15}$ & $(2.07 \pm 0.26)\times10^{-15}$ \\ $5.00 \pm 0.06$ & $(3.32 \pm 0.89)\times10^{-15}$ & $(3.55 \pm 0.92)\times10^{-15}$ & $(1.66 \pm 0.63)\times10^{-15}$ \\ \bottomrule \end{tabular} \label{tab:sys2} \end{sidewaystable} \begin{figure}[htbp] \centering \includegraphics[scale=0.84]{4-Experiment/Figures/Ratio/R.eps} \caption{The ratios of positrons detected by NaI detectors in coincidence mode to the electrons impinging T1. The solid error bars statistical and the dashed ones are systematic.} \label{fig:e+2e-} \end{figure}