BookCRYSTAL

the LPM/CRYSTAL data reduction and translation program.

On this page... (hide)

  1.   1.  Introduction
  2.   2.  History
  3.   3.  Installation
  4.   4.  Running bookCRYSTAL
    1.   4.1  The command line
    2.   4.2  The init (.ini) files
  5.   5.  Structure of bookCRYSTAL
  6.   6.  Modifing bookCRYSTAL

1.  Introduction

BookCRYSTAL is a program that provides:

  1. Translation of DumleCollect files (.dml format of NA43 data from '94 onwards) into HBOOK column-wise ntuples, for analysis in PAW, and since 2007, also into ROOT files.
  2. Event recostruction:
    • Standard calibrations
    • Drift chamber calibrations and geometry
    • DC Multiple hits
    • Electron momentum calculations
    • Angles calculations

It is based on the CERNLIB software created at CERN.

2.  History

The data collection is done on a PC interfaced to a CAMAC crate, runnig DumleCollect, an MS Windows 3.1 program.

In '94, the analysis was done with the Dumle program, an enhanced MS Windows version of the MS-DOS data collection and analysis program from the previous years.

From '95 onwards, the highly interactive Dumle will be used for the on-line analysis, while the more sophisticated off-line analysis will use PAW.

For this task, a data translation and reduction program is being developed, Book95?. The goal is to have an easily modifiable and flexible program that transforms raw ADC and TDC data into physically meaningful N-tuples to feed PAW.

In 2007, bookCRY has been updated to allow ntuple production in ROOT format, in addition to HBOOK. Support was added for merging double-hit information for Drift Chambers.

Also in 2007, DumleCollect was ported to WindowsXP, and integrated with a much improved goniometer control program.

3.  Installation

Please refer to the separate section on Install

4.  Running bookCRYSTAL

4.1  The command line

you can get help running bookCRY --help :

[sergio@daq-pc src]$ ./bookCRY
./bookCRY: wrong number of arguments
Try `./bookCRY --help' for more information.
[sergio@daq-pc src]$ ./bookCRY --help
Usage: ./bookCRY [OPTION] FILENAME[.dml]
   or: ./bookCRY [OPTION] BASENAME #FIRST #LAST

Options:
 -o, --out      NAME    defines the output file name
 -i, --ini   NAME    reads the specified .ini file
 -s, --strict        checks the whole header for differences
                     from the 1st, and skips file if it finds any

 -h, --help          prints this help
 -v, --verbose       verbose output
 -q, --quiet         turns off all output
     --set           prints Setup
     --eset          prints EventSetup
     --uinfo         prints User Info
     --evnt, --event prints runs/events info
     --debug         too much output :-)

where BASENAME means the first 5 letters of the Dumle file name. bookCRY will use the BASENAME/FILENAME you give as the model for the ntuple name and directory too. So if you want the ntuple to even just be stored in a different directory from the input Dumle files, you must specify the -o option. The --noextraini option makes the program skip all but the first .ini file. The --ini and --out accept a directory (with ending / ) and/or a filename. ( /home/name/data/ , /home/data/pola1 and pola1 are ok, @@/home/name/data@ is not). The extension ( .ini / .hbook ) is optional, and is appended if none (or a non-standard one) is found.

bookCRY can handle gzip-compressed files; its actually is usually faster to use compressed files because less data needs to be read from disk. A typical command to find and compress all the dumle files would be:
find Calibration -name "*.dml" -exec gzip -8v {} \;
Note that gzip compresses single files - it does not create multiple-file archives like tar or pkzip/WinZip.

Bugs

  • bookCRY complains that it couldn't store all the events
    This is a problem of the CERNlibs; the workaround is increasing the .hbook file blocksize, and this can be done in book95.inc. Or better, use the ROOT ntuples instead.

4.2  The init (.ini) files

The behaviour of bookCRYSTAL is mostly controlled by the Init files, that contain the geometry constants, the calibration constants and flags that change the ntuple contents. See Init files.

5.  Structure of bookCRYSTAL

Please refer to the separate page.

6.  Modifing bookCRYSTAL

so that it better suits your needs

Please check the chapter about how bookCRYSTAL is structured before reading the chapter about how to modify it .