\documentclass[twocolumn,showpacs,superscriptaddress,prl]{revtex4}
\usepackage[dvips]{color}
\usepackage{epsfig}
\usepackage{amsmath}
\def\red#1{\color{red}{#1}} % defining a red color.
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
\begin{document} 
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
\title{A Scaler-Based Data Acquisition System for Measuring Parity Violation in Deep Inelastic Scattering}
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
\include{author_list}
%%%%%%%%%%%%%%%%
\begin{abstract}
%%%%%%%%%%%%%%
An experiment measuring parity violation in deep inelastic scattering using the high resolution spectrometers (HRSs) in Hall A at the Thomas Jefferson National Accelerator Facility (JLab) has a goal of measuring a combination of the axial hadronic couplings of a electron to a quark with a factor of six improvement in precisioin over world data. To achieve this, the experiment has measured a $10^{-4}$ level asymmetry. A highly specialized data acquisition (DAQ) system with intrinsic particle identification was developed and utilized. The DAQ system of this experiment is discussed with an emphasis on the capability of measuring deadtime, pileup effects, and small asymmetry.


%Parity violating deep inelastic scattering experiment in Hall A at Thomas Jefferson National Accelerator Facility (Jefferson Lab) has a goal of measuring a combination of the axial hadronic couplings of the electron with a factor of six improvement in precision over world data. Precise data for the couplings are essential to search for physics beyond the Standard Model.  The experiment has measured a $10^{-4}$ level asymmetry using polarized electron scattering from deuterium with a beam energy of 6 GeV.  A highly specialized data acquisition (DAQ) system with inherent particle identification  was developed and utilized. The DAQ of this experiment is discussed with an emphasis on the capability of measuring deadtime, pileup effects, and small asymmetry.
%%%%%%%%%%%%%%%%
\end{abstract}
%%%%%%%%%%%%%%%%
\pacs{21.10.Hw, 25.30.-c}
%%%%%%%%%%%%%%%%
\maketitle
%%%%%%%%%%%%%%%%
\bibliographystyle{apsrev}
%%%%%%%%%%%%%%%%
\subsection {Introduction}
%%%%%%%%%%%%%%%%
Parity violating deep inelastic scattering (PVDIS) experiment E08-011 finished collecting data the the end of 2009. The goal of the this experiment~\cite{Proposal, Zheng, Subedi} is to measure precisely the asymmetry in parity violating deep inelastic scattering of a polarized electron on an unpolarized liquid deuterium target. This asymmetry is sensitive to the effective vector electron axial quark and axial electron  vector quark couplings, the former of which is extremely poorly constrained by experimental data.
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%
The electromagnetic interaction is parity conserving, as it is insensitive to the spin flip of the incoming electron beam. Only the weak interaction violates parity. Taking the difference of the left-handed and right-handed electron scattering cross-sections, one can isolate the parity violating contribution of the weak interactions. That means, if we measure the two mirror-image scattering processes in the same experimental conditions, the difference between the two counting rates can isolate the weak contribution due to the Z-boson exchange. With $\sigma_{+}$ and $\sigma_{-}$ as the left-handed and right-handed electron cross-sections, respectively, and $Q^2$ as the negative of the square of the four-momentum transfer, the parity violating asymmetry, $A_{pv}$, can be written as
%%%%%%%%%%%%%%%%
\begin {eqnarray}
\scriptsize{A_{pv}  = \frac{\sigma_{+} - \sigma_{-}}{\sigma_{+} + \sigma_{-}} \cong Q^2 ~[100 ~\mathrm{ppm/GeV}^2]}~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nonumber\\
\scriptsize{=(\frac{3G_FQ^2}{\pi \alpha^2 \sqrt{2}})(\frac{1}{5+R_S(x)+4R_C(x)})~~~~~~~~~ ~~~~~~~~~~~~~~~~~~}\nonumber\\
\scriptsize{ [2C_{1u}[1+R_C(x)]-C_{1d}[1+R_S(x)]+}~~~~~~~~~~~~~~~~~~~\nonumber\\
\scriptsize{Y({\red{2C_{2u}-C_{2d}}})R_V(x)}].~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nonumber
\end{eqnarray}
%%%%%%%%%%%%%%%%
%\begin{equation} 
%  \scriptsize{A_{pv} = \frac{\sigma_{+} - \sigma_{-}}{\sigma_{+} + \sigma_{-}} \cong Q^2 ~[100 ~\mathrm{ppm/GeV}^2].}\\ \nonumber
%\end{equation}
Here $G_F$ is the Fermi weak coupling constant,$\alpha$ is the fine structure constant, $Y$ is a kinematic factor, $R_s$ and $R_v$ are sea- and valence-quark distribution functions,  $C_{iq}$ are effective coupling constants, and $x$ is the Bjorken variable (see for details in ref. \cite{Proposal}).
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
%\begin {widetext}% this makes the equation spread in two columns.
%\begin {equation}
%\scriptsize{A_{PV}=(\frac{3G_FQ^2}{\pi \alpha^2 \sqrt{2}})\frac{2C_{1u}[1+R_C(x)]-C_{1d}[1+R_S(x)]+Y({\red{2C_{2u}-C_{2d}}})R_V(x)}{5+R_S(x)+4R_C(x)}}.
%\label{asymeqn}
%\end{equation}
%\end{widetext}
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
Within the context of the Standard Model, the effective coupling constants, $C_{iq}$ are
%Taking effective coupling constants $C_{iq}$ in the context of the Standard Model as
\begin{eqnarray}
 \scriptsize{C_{1u} = {g^e}_a~{g^u}_v= -\frac{1}{2} + \frac{3}{4} \sin{^2}(\theta_{W}),}\nonumber\\
 \scriptsize{C_{2u} = {g^e}_v~{g^u}_a= - \frac{1}{2} + 2 \sin{^2}(\theta_{W}),~}\nonumber\\
 \scriptsize{C_{1d} = {g^e}_a~{g^d}_v= \frac{1}{2} - \frac{2}{3} \sin{^2}(\theta_{W}),~~~}\nonumber\\
 \scriptsize{C_{2d} = {g^e}_v~{g^d}_a=  \frac{1}{2} - 2 \sin{^2}(\theta_{W}).~~~~}\nonumber
\end{eqnarray}
This experiment will extract an effective coupling constant combination $(2C_{2u} - C_{2d})$ with a high precision. %There are two $Q^2$ data points taken in this experiment so as to extract the experimental result for the hadronic correction, $c(x)$, due to higher-twist (HT) effects
%\begin{equation}
% \scriptsize{A_{pv}(x, Q^2) = A_{pv}(x)(1 + c(x)/Q^2),}\nonumber
%\end{equation}
%whose value is believed to be impossible to get from the first principles~\cite{KK}. The plan was to find asymmetry at low $Q^2$ point and extract HT there. Next, use that HT while measuring asymmetry at the high $Q^2$ point.
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%
%The experiment was performed in Hall A using two standard spectrometer setups~\cite{hallA} at two $Q^2$ points: the first $Q^2$ point being $1.1$~(GeV/c)$^2$ with incident electron energy $E~=~6.0$~GeV, scattered electron energy $E^\prime~=~3.66$~GeV, Bjorken $x~=~0.25$, and scattered electron angle $\theta~=~12.9^\circ$, and the second  $Q^2$ point being $1.9$~(GeV/c)$^2$ with $E~=~6.0$~GeV, $E^\prime~=~2.63$~GeV, $x = 0.30$, and $\theta~=~20.0^\circ$. The both $Q^2$  points used about $89\%$ polarized electron beam of $100~\mu$A on a $20$~cm long deuterium target.
The experiment used the JLab Hall A High Resolution Spcetrometers (HRS)~\cite{hallA}. For this measurement, the primary events depended only on the preshower and shower detectors in each of the two spectrometer arms. The preshower blocks were stacked with a row of two bars where the end of the bars that did not have PMTs faced each other. The shower detector in right high resolution spectrometer had $64$ lead blocks with a photo-multiplier tube (PMT) attached in one end only, giving a $64$ output channels. The preshower detectors in the both high resolution spectrometers had $48$ output channels coming from $48$ bars, having a PMT in one end in each bar again. All preshower blocks were individually wrapped to block light leak. The preshower detector signal from each PMT in the right HRS had to be split into two using a passive splitter in order to produce the same number of output channels as that in the shower detectors there. Since only the $64$ channels out of the $96$ available preshower channels after splitting had to be used, the unused preshower signals were terminated with a $50~\Omega$ terminator. In the left high resolution spectrometer, both preshower and shower detectors had a similar construction, there was no need to split any signal, as the number of channels in both of these detectors were the same.



%%%%%%%%%%%%%%%%
\subsection {Data Acquisition System}
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%
The combination of preshower and shower detectors was the main detector for the PVDIS experiment. This experiment was expecting a high event rate of about $0.5$ MHz from the main detector in each spectrometer. The conventional DAQ could handle only up to a $4$ kHz of event rate and it was inapplicable for this experiment. Hence there was an immense need of developing a new DAQ to run the PVDIS experiment. As a result, the new DAQ developed for (and used by) this experiment had a unique counting DAQ that employed a hardware based particle identification (PID). This was necessary for separating a large pion background from the electron signal. The integrating DAQ used by previous parity violating experiments at Jefferson Lab could not be adopted here as the integrating DAQ had no mechanism to reject the pion background.

The electron and pion signals were obtained through different routes in the DAQ (see Fig.~\ref{daqflowchart}). They went through both narrow and wide paths. These two paths were designed to study deadtime effects. The main component of the counting DAQ was a scaler module. The scaler counting is always deadtimeless. The high rate digital signal fed into the scaler module would give the final readout of the PVDIS data.
%%%%%%%%%%%%%%%% 

%%%%%%%%%%%%%%%%
There was a big effort to decide whether to use overlapping or non-overlapping scheme in achieving a high signal detection efficiency from the main detector, specially in the region where two adjacent blocks share the same signal. We found that there was no gain in efficiency using the overlapping scheme over the non-overlapping one. This was confirmed by a simulation using real data input. This lead us to choose the non-overlapping scheme which saved us a significant amount of electronics modules along with a possible loss of man-power in debugging the extra electronics in the DAQ, had we used the overlapping scheme. The electron PID efficiency obtained using the non-overlapping scheme, such as shown in Fig.~\ref{pidLeft}, was found to be already about a cent percent; the choice of the non-overlapping scheme had a  merit.
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%
%The shower detector in right high resolution spectrometer had $64$ lead blocks with a photo-multiplier tube (PMT) attached in one end only, giving a $64$ output channels. The preshower detectors in the both high resolution spectrometers had $48$ output channels coming from $48$ bars, with a PMT in one end in each bar again. The preshower blocks were stacked with a row of two bars where the end of the bars that did not have PMTs faced each other. All preshower blocks were individually wrapped to block light leak. The preshower detector signal from each PMT in the right HRS had to be split into two using a passive splitter in order to produce the same number of output channels as that in the shower detector. Since only the $64$ channels out of $96$ available preshower channels after splitting had to be used, the unused preshower signals were terminated by a $50~\Omega$ terminator. In the left high resolution spectrometer, both preshower and shower detectors had a similar construction, there was no need to split any signal, as the number of detector channels in the both were the same.
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
\begin{figure*}%% \begin{figure*} and \end{figure*} allows to fit the figure in both columns in a page with 2-columns.
{
\centering
\includegraphics[width=18.7 cm,angle=0]{epsFig/daqFlowChart.eps}
\caption[]{A typical DAQ flowchart diagram showing eight groups in the front, and two groups in action afterward, using a non-overlapping DAQ scheme. This diagram represents the exact form of the flowchart as used in the right HRS. For the case of left HRS, there was a slight modification, since the shower and preshower detectors in the left HRS had the same construction, unlike that in the right HRS. Regarding groupings, we had eight groups in right HRS and six groups in left HRS. The difference in the total group number is due to the fact that the two spectrometers had different type of shower detector construction, though the two spectrometers had a similar type of preshower detectors. In the case of shower detectors, the left hrs had its shower detector similar to its preshower detector in terms of detector numbers, whereas the right HRS had $80$ shower blocks with one PMT in end only (see ref~\cite{hallA} for details) although we used only $64$ of them only. The non-overlapping scheme is shown on the top left: one group has $8$ PMT channels, $4$ preshower bars form a group; the color coded vertical bars beside the preshower stack represent a group in the preshower stack. In the right HRS shower detector, two rows form a group, each row has four PMT channels.}
\label{daqflowchart}
}
\end{figure*}
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
\begin{figure}
{
\centering
\includegraphics[width=7 cm,angle=0]{epsFig/E_Na_Eff_Left_Hard_Run26328.eps}\\
\caption[]{Red trace shows PID efficiency for electrons and it is almost $100\%$. Horizontal axis is the two meter long coverage of the main detector on the dispersive direction. Blue shading is the double counting in efficiency in two adjacent groups, this double counting is carefully excluded in the red trace. Though this plot belongs to electron PID efficiency in the left hrs through a narrow path, the quality of the electron PID efficiency for the wide path, and also that for the right spectrometer, is identical.}
\label{pidLeft}
}
\end{figure}
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%
The detector signals (a detector means a shower or a preshower detector in this context), in a group of $8$ channels, were directly input to a linear summing module called SUM8 (represented by SS or PS with a different indexing in the DAQ flowchart: Fig.~\ref{daqflowchart}). The right HRS preshower signal splitting was performed before this stage. The SUM8 module had two applications: summing all the input signals producing a single output, and fanning out each input signal yielding it's identical copy so as to use it elsewhere. 
%
%We used all the fan-out copies to a regular spectrometer DAQ so as to get information for tracking, with or without the use of VDCs (vertical drift chambers), carrying out a regular spectrometer DAQ running.
%
The copies of the signal from the fan-out were sent to the regular spectrometer DAQ for a use in an event by event analyses in combination with the vertical drift chambers (VDC's) or alone to study systematic effects. After SUM8, there was another stage of linear summing (represented by TS with a different indexing in the DAQ flowchart: Fig.~\ref{daqflowchart}) where we combined the shower and preshower signals. A random high rate signal, called tagger, did also enter here. Some of these linear summing modules also combined the tagger with a preshower signal only. The analog signal after this linear summing was digitized using a leading edge discriminator. 
%After digitization, the signal was driven through different logic modules and finally taken to a NIM to ECL module to produce outputs in ribbon cables so as to route the signal to a scaler module as a final destination. 
Any signal that went to a scaler module of the counting DAQ also went to a TDC module in a regular spectrometer DAQ. The TDC module signals were used to time-align all the detector signals. This alignment in time was performed before going to the production mode of data taking.
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%
Two types of veto signals were prepared using a combination of scintillator and gas-cherenkov triggers: electron veto and pion veto. The scintillator trigger came from two layers of scintillator paddles that were normally used to provide the main trigger for the regular spectrometer DAQ~\cite{hallA}. The purpose of such veto triggers was to give a clean PID for electron and pion triggers. Referring to the DAQ flowchart diagram (Fig.~\ref{daqflowchart}), the logic modules that had veto signal input would only give outputs if and only if the veto signal was present.
%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%
Clean electrons were selected by the gas-cherenkov detector. By electron PID efficiency means what fraction of the clean electron sample the main detector was detecting. The red trace in Fig.~\ref{pidLeft} shows that this value is close to a unity, which means that the electron PID efficiency was about $100\%$ for this experiment. 
%%%%%%%%%%%%%%%%
\subsection {Deadtime}
%%%%%%%%%%%%%%%%
\begin{figure}
{
\centering
\includegraphics[width=7 cm,angle=0]{epsFig/deadTime.eps}\\
\includegraphics[width=7 cm,angle=0]{epsFig/dtLeft.eps}
\includegraphics[width=7 cm,angle=0]{epsFig/dtRight.eps}
\includegraphics[width=7 cm,angle=0]{epsFig/pileup5583.eps}
\caption[]{Top: a diagram for the use of tagger in determining deadtime. Top-second: deadtime plot for a typical group from the left hrs data. Top-third: deadtime plot for a typical group from the right hrs data. Bottom: a TDC plot showing pileup events. The integration of events in the red trace gives the amount of pileup.}
\label{dtplot}
}
\end{figure}
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
Deadtime is the amount of time after each event during which the system is unable to record another event if there is any. Identifying exact value of the deadtime is always a challenge in nuclear physics experiments. To measure deadtime in this experiment, two different resolution times of the electronic modules were used: $30$~ns (``narrow path'') and $90$~ns (``wide path''). Subsequent events falling within the resolution time of the previous events could not be recorded by the DAQ, causing a counting loss due to deadtime.

%%%%%%%%%%%%%%%%
A tagger of $10$ kHz rate was used to measure the deadtime of the PVDIS electronics. The tagger was mixed (logical OR) with a preshower (P), shower (S), gas-cherenkov (GC) and trigger scintillator (SC) signals individually. After that, these signals were passed through the PVDIS electronics. The output signal from the PVDIS electronics is called PVDIS signal from now on, unless explained otherwise. The PVDIS signal was combined (logical AND) with the tagger itself (see the top sketch in Fig.~\ref{dtplot}). The idea there was to see if there was any tagger signal killed due to deadtime in PVDIS electronics. After combining a delayed tagger with the tagger-mixed PVDIS signals, we could see the output event rate from the logical AND module to be either equal to the tagger rate itself or less. If the event rate observed from the logical AND output was equal to the tagger rate, there was no deadtime in the PVDIS electronics. If the PVDIS electronics had deadtime, the logical AND output event rate must be smaller than the tagger rate. The fractional loss of tagger event rate is the amount of deadtime ($D$) which is given as
\begin{equation}
\scriptsize{D = 1- (1-p)(R_o/R_i),}\nonumber
\end{equation}
where $R_i$ is the input tagger rate, $R_o$ is the output rate from the logical AND module, and $p$ is a correction factor for pileup effects. The pileup effect arises when the tagger signal follows closely to a PVDIS signal and the DAQ output from the PVDIS electronics coincides with the tagger signal which causes a false count that could have been lost due to the deadtime. The pileup factor $p$ was measured by using the TDC spectrum as shown on the bottom pad in Fig.~\ref{dtplot}. If there was no pileup, only the left-side peak would show up in the TDC spectrum. The integral of the events, other than the left-side peak, would correspond to the pileup amount. Such pileup events are represented by the red trace in the bottom pad in Fig.~\ref{dtplot}. 

The slope of deadtime versus rate plot gives the amount of deadtime. This is  obtained from the $p1$-value of each trace in the two middle pads in Fig.~\ref{dtplot}. During the experiment, the narrow path was set as $30$ ns and the wide path as $90$ ns. The slopes of the left and right hrs wide path traces almost meet the expectation ($\sim 90~ns$) at this early stage of data analysis, and the deadtime of the pvdis electronics appears to be below $1\%$ for any group in the main detector. The similar description for the narrow path, however, does not seem to be possible. The slopes for the narrow paths appear to be around $63$ to $71$ ns for most of the groups. The reason for that could be due to the input pulses to the pvdis electronics being about $63$ to $71$ ns. If so, the $30$ ns path setting was ineffective. This requires more investigation. Finding the net deadtime of the whole PVDIS electronics and the simulation for the deadtime are the next jobs to be completed.
%%%%%%%%%%%%%%%%
\subsection {Asymmetry}
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
\begin{figure}
{
\centering
\includegraphics[width=7 cm,angle=0]{epsFig/asymLeftHighP.eps}\\
\includegraphics[width=7 cm,angle=0]{epsFig/asymLeftLowP.eps}\\
\includegraphics[width=7 cm,angle=0]{epsFig/asymRightLowP.eps}
\caption[]{Asymmetry results during the data taking period. The top plot is from left HRS data at low Q$^2~(=~1.1$ GeV$^2/c^2)$, middle one is the same at high Q$^2~(=~1.9$ GeV$^2/c^2)$, and the bottom plot is from right HRS data at high Q$^2~(=~1.9$ GeV$^2/c^2)$ again. Any point in a Slug has a data amount of about a day of data taking.}
\label{asym}
}
\end{figure}
%%%%%%%%%%%%%%%%
The asymmetry is a popular observable that all parity violating experiments care about measuring. Other extractions are possible once the asymmetry is precisely measured. The physics asymmetry sought for in this experiment is about $100$ times the $Q^2$ value. Though the main goal of the present experiment is to extract an effective coupling constant combination $(2C_{2u} - C_{2d})$ with a high precision, it's too early to make any comments on this at the moment, since the data analysis is ongoing. However, for the asymmetry measurements, the following figures  (Fig.~\ref{asym}) depict the blinded asymmetry found during the time of online analysis. These plots indicate that the quality of data obtained through the counting DAQ meets expectations: asymmetry flips sign with the flipping of spin of the incoming electron beam (i.e., the opposite signs of asymmetries with the half wave plate IN and OUT states), asymmetry increases with the increase of Q$^2$ value and vice-versa.
%%%%%%%%%%%%%%%%
\subsection {Conclusion}
%%%%%%%%%%%%%%%%
The newly developed counting DAQ was successfully implemented in the PVDIS experiment at $6$ GeV at Jefferson Lab. The preliminary analysis of deadtime data indicates that the deadtime of the pvdis electronics is below $1\%$. The preliminary (blinded) physics asymmetry is meaningful. The overall data analysis of the experiment is progressing.
%%%%%%%%%%%%%%%%
\bibliography{src}
%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%



Paul's comment not yet implemented:

-Referring to this line: ''A random high rate signal, called tagger, did also enter here.''  in 2nd page second column first paragraph, can we make a global change so as to call a ``random tagger'' everywhere in the article, just to emphasize the random nature of it? 

- replacing fig 1 by some other form(s)?

- In the last sentence of the 3rd para in the ``Data Acquisition System'' section on page 2, PID efficiency of nearly 100 percent should be phrased as an exact value with an error.

- Fig 4 not convincing

- Comment (a single comment there) on Asymmetry section.






If a second pulse arrives within the deadtime of a previous pulse the second pulse is lost.

If a second pulse arrives within the pileup time of a previous pulse the first pulse is lost.

Effectively:

    That pulse is lost, the pileup time of which overlaps the dead time of another pulse.




\bibitem[{\citenamefont{K. S. Kumar}(2004)}]{KK}
\bibinfo{author}{\bibfnamefont{K. S.} \bibnamefont{Kumar}}, \bibinfo{journal}{\emph {Eur. Phys. J. A}},  \bibinfo{\bf{24}}, \bibinfo{pages}{191-195} (\bibinfo{year}{2005}).





