Focussing DIRC Prototype in the Test Beam

Taking data, starting/stopping a run

The computer that is used for DAQ in End Station A is called dircrd-priv and has no direct access to any network resources. The system is located behind a bastion host called dircrd and accessible only via the bastion host. This setup is necessary too satisfy SLAC computer security concerns which would require that our DAQ system is taylored if it is on the network. Our worry is that taylor would compromise our DAQ software, make it impossible to compile the CRT code when a new kernel is installed.
You can log into dircrd with your SLAC account, then log in to dircrd-priv using the local account called daq using the command ssh daq@192.168.1.2

Data taking is controlled with a perl script called run.pl located on dircrd-priv in the directory /u2/data. This script will automatically keep starting new runs (the executable is called readTestBeam, from the CRT software package), each for 100,000 triggers.

To stop a run and start a new one, log on to dircrd, then to dircrd-priv and then kill the DAQ executable:

When you kill the run the perl script will gzip the data file and then start a new run a few seconds later.

To stop data taking altogether, log on to dircrd, then to dircrd-privand then kill both the perl script and the DAQ executable:

If you want to start a single run again (not using the perl script), type
cd /u2/data; readTestBeam number.of.events data.file.name.

If you want to start the run again using the perl script, type
cd /u2/data; perl run.pl < /dev/null >&! opfile&.

The data files from the run are written to the local disk on dircrd-priv in the directory /u2/data. This is, in reality, a disk of the bastion host dircrd, exported via NFS to dircrd-priv as well as to our analysis computers. The data files have names that include the data and time of the start of the run and the number of triggers requested for the run.

You can check the progress of the run with the script called statrun, also located in the directory /u2/data. Type /u2/data/statrun /u2/data/testrun_20041019_1639_1000000.dat (obviously, you have to use the proper output data file name). The script will tell you the current number of events and the trigger rate (integer value rounded down, 9.999Hz will show up as 9Hz), run time and estimated time until end of run.
Another way to keep an eye on the progress of the run is using the NewDAQWobbler (see the documentation here).

File Format

The output .dat file is in ASCII format. It contains in a single line the event time and information about the status word and number of channels for every board read out.

An example from the format in late 2004 is

In 2007 the data became more complex, some 491 numbers were written for every event.
This .dat file can be converted into a ROOT file as shown below or converted into a file that can be read by FORTRAN as shown here.

File conversion

The .dat data files are automatically copied to the monitoring and analysis system called kifaru by a background (daemon) job. This is required for monitoring as well as for file conversion. This job also converts the dat files to .root files.

Start the daemon job on kifaru by opening a terminal and typing cd /u2/DAQ/monitoring/CRTanalysis/crtanalysis; ./RunDaemons.pl

This command starts several background processes:

For these scripts to run correctly the files which describe the association between hardware channels and ROOT variables in the .dat and .root files has to be up-to-date. That means updating the current_data_link.xml and current_data_link.order (set via symlinks) every time the number and type of boards is changed.

Analysis

The computer dedicated to analysis of DIRC test beam and CRT data is called kifaru. Log into that system, create a directory on one of the three local drives (/u1 is disfavored). You will find a copy of the data files on /u2/data.

The data analysis is usually performed with rather complex ROOT programs, too complex to explain here. Briefly, one needs to make sure to update the analysis code for each system configuration, in particular the association between ROOT variables and detectors, like adc3_5 correspondig to the leadglass ADC, because each time we add or subtract a board this association will change.

One simple set of tests is possible without big programs, though. Using the .root file for a run (or a chain of a group of runs) one can plot simple quantities. The procedure is

The conversion can also be done with a simple script automatically for you. If you want to do a conversion manually on kifaru, go to /u2/data and type slacAdcDat2root.sh testrun_2000000_20041005

This script will create the root file while providing some information about the number of columns in the event ntuple.

Setup

The current setup is described in Jerry's logbook.

Summary of current channel assignments

The channel definitions should be kept up-to-date on our dedicated webpage.

Results

Results of our beam test runs are usually reported in the Thursday R&D meetings, copies of the presentations can be found here.

Last significant update: March 31, 2008, by Joe