GUIDE TO DATA TAKING IN HALL A

Bob Michaels,     v2.5,     Jan 2002

pager: (757)-584-7410,    e-mail:    rom@jlab.org

This file :  hallaweb.jlab.org/equipment/daq/guide.html


This is information about how to run DAQ in Hall A, as well as how to configure the trigger and use the ``online'' codes. See also hallaweb.jlab.org for useful links such as ESPACE, the offline code.

 I.  Where   to   Run   Things

Below is a table showing where to run the different codes using the public accounts adaq, adev, atrig, a-onl, and apar.  The run coordinator should know the passwords.  

Where to Run Online Software in Hall A Counting Room
                  Code                                     Computer                          Public  Account           
     CODA  (runcontrol)    various (see table below)    see table below
     ESPACE    adaql3 or l4 or any Linux box not running CODA   adaq
     trigsetup    adaqlN (N=1,2...) Linux   atrig
     dataspy    adaqs3 (Sun)   adaq or adev
     dhist    adaqs3 (Sun)   adaq
     xscaler    adaqs3   NOT s2   adaq


For early 2003, we have split the two Hall A Spectrometer DAQ systems.  The Left Spectrometer runs on adaqs2 on the adev account.  The Right Spectrometer runs on adaql2 on the a-onl account.   In addition, the Parity DAQ is available for test of helicity correlations; it runs on adaql1 on apar account.   From the usage standpoint, these DAQ setups are quite similar, see also section III.
 

Attributes of the Three DAQ Setups
                   Attribute                                                                                                                                                
   System being read out          Left   Spectrometer           Right   Spectrometer          Parity  DAQ
   Computer where to run          adaqs2   (SunOS)           adaql2   (Linux)          adaql1   (Linux)
   Account from which to run          adev           a-onl          apar
   ROCs involved   ROC3, ROC14, TS1  ROC1, ROC2, TS0   ROC23 (crate in cnt room)
    BPM Crate     ROC14 (VME)      Fastbus         
    Disk areas for data   /adaqs2/dataN, N=1,2...   /adaql2/dataN, N=1,2...   /adaql1/data1 or /adaql2/data2/parity
   Run numbers numbers > 20,000  numbers < 20,000        
  Prescale factors ~adev/prescale/prescale.dat ~a-onl/prescale/prescale.dat      
  Deadtime and Disk monitor    datamon (from adev)    datamon (from a-onl)       
  runcontrol configuration     LeftHRS     RightHRS     sduality
 runcontrol config for pedestals  pedrunL   (L means Left)   pedrunR   (R means Right)        
 Location of pedestal files ~adev/ped/ped2.dat ~a-onl/ped/ped1.dat        
 Location of scaler_history.dat ~adev/scaler/ ~a-onl/scaler/        



 II.  General  Computer Information

Computers:   adaqs1 will be the Compton DAQ computer. It should be avoided, e.g. the paths are different.   adaqs2 and adaql2 are used for spectrometer DAQ.   adaql1 is for Parity DAQ.   adaql3 or adaql4 is for running online ESPACE analysis, etc.   The Linux boxes like adaql1, adaql2, adaqep, adaqcp are the best places to run ESPACE, but the ones where CODA is running should be avoided. Note the large amount of ``work'' disk on adaql1 and l2 where you may keep scratch files like hbook. The disks are /adaqlN/workM where N=1,2... and M=1,2,3...etc.

How to reboot workstations (rarely necessary): On SunOS its possible to do a quick reboot which can fix some hangups. Login as adaq account and type "reboot". NOTE: If power fails you must do a shutdown before the UPS battery goes bad. Login as adaq and type "shutdown". After several minutes, the screen goes black, wait a bit more, then power off. When power comes back, computer reboots. For Linux:   Hit Ctrl-Alt-F1 to go to console mode, then Ctrl-Alt-Del, or see Ole's instructions which might be posted near the terminal.

 III.  CODA  

Detailed information about running the spectrometer DAQ in Hall A as well as the Parity DAQ may be found below. There are two modes of running spectrometer DAQ in Hall A :   (i)   The "coincidence" setup, also called the "1-Trigger-Supervisor" mode because it uses one trigger supervisor;   and (ii) The "single-arm" setup, also called the "2-Trigger-Supervisor" mode because it uses two trigger supervisors to run two completely indendent DAQ systems.

If you are doing a coincidence experiment, you must use mode 1). Mode 1) can also handle single-arm triggers, of course, but is limited in speed to about 1/2 the aggregate speed of mode 2).

Here is the guide, which was written in a sufficiently general way to apply to each of the independent DAQs:

hallaweb.jlab.org/equipment/daq/guide2.html  for CODA 2.x setup (read this if nothing else).

Bryan Moffit and Antonin Vacheret will maintain a Parity HOWTO for obtaining charge asymmetry among other things from the Parity DAQ.

Also available are documentation about the raw data structure and frequently asked questions about DAQ deadtime.

IV.  Trigger

The spectrometer trigger was described in some detail in the OPS manual.   Here I give a superficial overview and describe how to download a new setup.   First, here are some simplified instructions to download and check the trigger:

hallaweb.jlab.org/equipment/daq/trigger.html.

Though coincidence triggers are not used for Spin Duality or GDH, here are some detailed specific information about the coincidence trigger setup:

hallaweb.jlab.org/equipment/daq/trigsetup_coinc.html.

Overview of trigger:  Scintillators make the main trigger in each spectrometer arm, and a coincidence is formed between the spectrometer arms.  The main trigger is formed by requiring that scintillator planes S1 and S2 both fired (and both phototubes in each paddle) in a simple overlap. The trigger requires that S1 and S2 fired.  The coincidence between spectrometer is formed in an overlap AND circuit.  The Right Spectrometer singles triggers are called T1, the Left Spectrometer triggers are called T3, and the coincidence triggers are T5.   Other triggers might be formed which require other detectors. The most important is T2 on R-arm and T4 on L-arm, which are identical, and require 2 out of 3 from among the S1, S2, and Cerenkov detectors (i.e. the "or" of S1 is used, etc). Such a "loose" or "majority logic" trigger allows to measure the efficiency of the main trigger. The experiment should always keep about 5 - 10 Hz of these loose triggers.

Downloading the trigger:  For coincidence experiments, it is forseen that the only change between kinematic settings that affect the trigger are delays that track with the momentum.  To change the trigger, login to a linux PC like adaql1 or l2 in the "atrig" account (ask run coordinator for the password) and type from anywhere "trigsetup". This starts a GUI whose usage is obvious. Further details are at the link above (trigger.html).  

For single arm experiments (like e01012 and gdh), you probably never want to change the trigger. But it would be wise to download the default trigger file from time to time. Also, if the power is lost on the CAMAC crate, you must download again.

V.  Scalers and Scaler Display "xscaler"

Normally "xscaler" is already running on adaqs3.   Warning, it may cause deadtime if run on adaqs2 where CODA runs.  If not running, login as adaq, and go to the appropriate directory, which is  (1) ~adaq/$EXPERIMENT/right/scaler for right arm, and (2) ~adaq/$EXPERIMENT/left/scaler for left arm.  ($EXPERIMENT is an environment  variable, like e01012.)  Then  type "xscaler".  Remember to push the button "Start".  For experts:  The configuration of scaler information is controlled in a file scaler.config in the appropriate directory.

The ``old'' asynchronous readout of scalers are event type 140, which are injected into the datastream asynchronously every few seconds.   A ``new'' readout exists, in which the data are read every synch event (100 events) if DAQ is in buffered mode and every 200 events regardless of mode. This readout also contains helicity and timestamp info necessary for G0 mode. Details are at www.jlab.org/~rom/scaler_roc10.html for the new readout, and for the G0 helicity scheme see www.jlab.org/~rom/g0helicity.html.   Bob will provide some analysis software for scalers, e.g. to measure the charge asymmetry, see hallaweb.jlab.org/equipment/daq/qasy.html.

 Scalers are also read and injected into the datastream at the end of the run.  A file scaler_history.dat is maintained which is a complete history of scaler readings at the end of the run.  These files should be in ~/scaler for the adev and a-onl accounts.  

VI.  Online   Codes   for   Spectrometer

 There are two codes of interest for doing online diagnostics of raw data, in addition to using ESPACE. They are:  (1) dataspy, and (2) dhist (actually dhist is a shell script).    To run dhist, simply type "dhist".   Log onto adaqs3 as adaq account (e.g. via ssh from adaql1) and type "dhist". You will see a reminder that you have to go to the proper directory and type "./dhist" there. Just do it. To run the optional interface that turns on/off histogram pages and that shows the alarm status for comparing histograms to references, type "dopte" and "dopth" for E-arm and H-arm respectively.  The dhist script runs "dplot" on online data which it gets off the net in real time, and "dplot" is a code that pops up some HIGZ windows and displays several pages of raw, uncut, data as self-explanatory diagnostics. More details about the dataspy/dataplot codes may be found at

hallaweb.jlab.org/equipment/daq/dplot.html

By default, the online codes obtain data from ET system, hence cannot cause deadtime.   If one uses "espace" to read a the currently written file, one might cause deadtime. One way around this is to start on the present file at the end of a run, or to choose another file. However, below 1 kHz CODA rate, reading the file should cause no deadtime.

ET system can be implemented for ESPACE, but this seems to be unpopular.   If interested, see jlabs1:/home/rom/doc/README_ET   for details.

VII. Parity Analysis

The Parity DAQ is used to apply feedback on the charge asymmetry and keep it near zero. It will be important to monitor this and verify it is doing a good job. This is mostly the job of experts like Bryan Moffit and Antonin Vacheret. They will maintain a Parity HOWTO for explaining how to run the Parity DAQ and performing routine checks on the charge asymmetry.



This guide is maintained by :

R. Michaels   --   e-mail: rom@jlab.org