some CGI programs

  1. monitor the DAQ : http://webusers.npl.uiuc.edu/~yangrz/cgi-bin/daq.pl
  2. LVL2 filtered data analysis : http://webusers.npl.uiuc.edu/~yangrz/cgi-bin/lvl2-analyze.pl

Modularized analysis code

  1. do_daq : wrapper script for DAQ
  2. do_analyze : wrapper script for converting raw data
  3. analyze_mod_tracking.C : actual ROOT script to convert raw data to .root file
  4. class definition in the new tracking code
  5. script for the new tracking code

Use DAQ program and related analysis software

  1. log on to phenix4
  2. go to /scratch/phenix/yangrz/rootCosmicData
  3. run do_daq will take the data with the CAMAC modules defined in file mdaq.conf, the first line is a list of TDC: the first number is total number of TDCs, then are the station numbers, station number<1000 means a PHILLIPS TDC, station number in [1000, 1999] is a LeCroy one; the second line is a list of ADC: the first number is the total number of ADCs, followed by the station numbers, station number<1000 is for PHILLIPS ADCs. For example the mdaq.conf could be:
    3 7 1008 1009
    2 20 21
    
    then you have 3 TDCs and 2 ADCs: one PHILLIPS TDC at station 7, two LeCroy TDCs at stations 8 and 9, 2 PHILLIPS ADC at stations 20 and 21.
  4. when running do_daq, you need to specify the arguments like this:
    ./do_daq -e 100 -r 1 -m SLOW_TRIGGER -g 1
    
    this will do 1 run with 100 events per run, and will write a comment in the mdaq.log file saying "SLOW_TRIGGER" for future reference; and "-g 1" means there will be noisy debug info, "-g 0" will turn it off
  5. the run numbers, time and date of the run will be in the logfile mdaq.log
  6. the raw data file is integers in plain text, they are by default stored at /scratch/phenix/yangrz/cosmicData; the names of the raw data files are the data and time when they were written.
  7. do_analyze will start anaylsis and write the data into the .root files. the root files are at /scrach/phenix/yangrz/rootCosmicData, the do_analyze will search the raw data dir and if the corresponding .root file doen't exist, then it will read the raw data and create .root file.
  8. the draw.C script will draw the plots
  9. the DAQ program itself is in C++ using the generic SCSI driver of Linux (sg), originally written by Cody McCain; the anaylsis software are all ROOT Macros; some shell scripts are used to wrap up all the programs; I didn't make all these very portable, so if you need to use them elsewhere, you need to change some paths to make them work

Test CAMAC controller

To test the Jorway 73A CAMAC controller (SCSI bus), there are some existing tools:

One is from Fermilab, you can find it at http://fermitools.fnal.gov, you can also find it in my home dir under work/rpc-cosmic/sjyLX, the excutables are located at "example" dir within the package.

The other one is from Jorway company, you can locate it in my home dir at work/rpc-cosmic/Scsi_73a, they are already compiled.

2006/06/30

We are using the PHILLIPS 7186 TDC; I noticed that every time when all the channels are out of the up/low thresholds, e.g. all "4095", LAM is not set, so the TDC is never ready for readout until one of the channels have a hit within that channel's up/low thresholds. I don't know why and I am still trying to find out.

2006/06/24

I am trying to put mdaq and also other codes in CVS repository. Here you can find information on CVS. My CVS repository is at /home/yangrz/cvs; mdaq is included in the package rpc-cosmic

2006/04/28

In the mdaq package, the program called cosmic will record the raw data. The root macro for converting TDC/ADC raw data is analyze.C.

2006/04/26

Currently, to compile the mdaq package, run the following commands:

export ROOTSYS=/usr/local/share/root/pro
./bootstrap
./configure --with-ACE=/scratch/phenix/build/ACE_wrappers \
            --with-TAO=/scratch/phenix/build/ACE_wrappers/TAO/ \
            --with-XMLWRAPP=/scratch/phenix/install \
            --prefix=<where you want to install>
export LD_LIBRARY_PATH=<install path same as above>/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/scratch/phenix/install/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/share/root/pro/lib:$LD_LIBRARY_PATH
make
make install
If the files "configure" in top dir and "Makefile.in"s in all dirs exist, then "./bootstrap" is not necessary.

then go to install path, test your program:

bin/cosmic -h
This will print the usage for the progarm:
Usage: ./cosmic [-d <sg_device_path>] [-f <data_file_prefix>] [-i <input_reg_station=1>]
[-o <output_reg_station=2>] [-t <tdc_station=15>] [-e <events_per_run=5000>]
[-r <run_count=1>] [-u <upper_threshold=4095>] [-l <lower_threshold=0>] [-p <pedestal=0>]
[-x (disable_threshold) ] [-h (help)]

I have a working example at /home/yangrz/work/rpc-cosmic/install