How to run analysis in cdaq

From Hchkswiki
Jump to: navigation, search

How to run replay

This page shows how to use our analysis program in cdaq.

First of all, ssh to cdaql5. Other cdaq is not good to compile/run our program.

If you are in the cdaql5, go to our "replay" directory.

$cd ~/hks09/replay/e05115replay

Then setup REPLAY.PARM and specify the file name of raw data (g_data_source_filename). Usually our raw data file is linked by ~/hks09/coda25/runlist/.

After that, run a script

$./replay_script RUN#

and engine is started. Then the RUN#.hbook file will be generated in paw/ directory.

Analysis tools

Generate ROOT file

First of all, you should set a environmental variable using following command;

> source setroot_CUE

In order to use ROOT, use "h2root" command.

> h2root "hbook(rzdat) file name" "ROOT file name"

This command may be included in the "replay_script" file. Then, the root file will be created.

Histogram checking macro

In the ~/hks09/replay/e05115replay/root directory, you can see the macro file "check.C". And in the same directory, "run#.root" file which is created by "run#.hbook" must be. First you should execute ROOT with batch mode and execute this macro.

> root -b
root [0] .x check.C (run#)

Then "run#.pdf" file will be created. This file shows almost all raw ADC, TDC shape, hit pattern and so on.

The shell script "" can do the same things.

./ run#

How to checkout analysis code in your directory

We're using Subversion as a version control system of our analyzer. Detail is written in HKS-HES Subversion Repository.

The repository of stable version is in /group/hks/Repositories/svnroot/analyzer/e05115/trunk. Firstly, you should make your directory and move to there. And execute following command in cdaql5;

$svn co file:///group/hks/Repositories/svnroot/analyzer/e05115/trunk directoryname

You can put directoryname as you like and downloading will start.

After finishing download, you can see following directories/files in the directory "directoryname";

$ ls
$ e05115replay/ e05115src/

At the very first time you create directory, execute;

$ ./

You will be asked where CERNINC/CERNLIB directory is. In recent machine, that will be

CERNINC = /usr/include/cernlib/2006
CERNLIB = /usr/lib/cernlib/2006/lib

In the cdaq machine, use

CERNINC = /site/cernlib/i386_rhel3/2004/include
CERNLIB = /site/cernlib/i386_rhel3/2004/lib

Other version in /site/ directory may be not working.

After executing, go to e05115replay/ directory and execute

$ ./

Then you can run replay.