Converting qbread text output to PAW ntuples
The program to convert the files is called ntuple, in the same directory with the other qbread program files. Running it will create .hbk files that you can use to quickly analyze the output.
neutrino:/work/jlraaf/qbread> ./ntuple --help
option help
usage: ./ntuple [options ]
options:
-h
change data format to hitcell (default)
-t
change data format to raw TDC cell
-d debug mode
-s
enable 32-bit event# from spacer cell information
-i <inputfile> specify input filename
--calib add calibrated charge into ntuple
(hitdata format only)
--constdir specify constant directory
--help this menu
default : hit data format
Note : The beginning of the input data file must
have a header line of "RAWTDC" or "HITDATA" and the format of the data
on the remaining lines should be "%04x" (2 bytes per line written in
hex).
I typically run the program with:
./qbread -i qbread.dat
The ntuple variables are explained below.
hit data format (ntuple ID 2)
flag = 1 : hit cell
2 : spacer cell
3 : raw TDC cell
4 : status message cell
5 : daughter board cell
event : event number
tsta : TDC start count
(if not hit cell, this is the first 2 bytes of data)
twid : TDC width count
(if
not hit cell, this is the second 2 bytes of data)
range : gain range (0-2)
(if
not hit cell, this is the third 2 bytes data)
atmch : channel number on QB (0-23)
trigger = 1 : hit trigger type
2 : pedestal trigger type
mhit : multi-hit number
raw TDC format (ntuple ID 1)
event : event number
tdcid : TDC id (0-3)
tdcch : TDC channel (0-23)
tsta : TDC start count
twid : TDC width count
atmch : channel number in ATM board
mhit : multi-hit number