TWR HIT EXTRACTION PROGRAM



1. Introduction

Since the time and charge information of the photoelectrons are only input parameters for the event reconstruction, if we want to reconstruct an events using TWR waveform information, we need to extract hits information from the given waveform. The "twrhit" is a TWR hit extraction program to extract hit information from the given TWR waveform. TWR hit information has same format as Muon hit in the F2K so that we can use it as an input to the "amacalib" in the same way with muon hit.

This program creates a F2K file output for the each input F2K. The output file is separated file from original input file. But the original hit information of Muon Daq is replaced by the extracted TWR hit and TWR waveform is dropped to save the space.

Hit extraction scheme


2. How to determine the hit.

We are using a simple threshold method to determine leading edges.  The leading edge time is determined by interpolating the crossing time between points near the threshold. The charge is obtained by integrating the waveform below the baseline.  We use the same threshold values as the Muon-Daq. And the threshold values are measured periodically in real experiment.

theshold method

Because this method has very similar principal to Muon-DAQ, it is good to show the consistency between Muon-DAQ and TWR-DAQ. Currently LE agreement between two DAQs is about 3.5 ns. More detailed information can be found at my talk on the AMANDA collaboration meeting at Madison.


3. Where to get the source file

   A tarball is available click -> twrhit.tgz


4. Installation

a) Files you need are

   Source Code twrhit.C,

   All files under ./dbdir

   Makefile

b) Modify Makefile and "#include" line for "rdmc" in twrhit.C

c) "make"

5. Directory configurations

a) Input f2K (Merged F2K)

setenv INPUT_FILE_DIR [input file directory]

b) Output f2k

setenv OUTPUT_FILE_DIR [output file directory]

                                                                               

4. How to run

./twrhit [inputfile1] [inputfile2] [...] [number of event]

You can specify the file list and number of events that you wish to analyze. the number of event is useful when we want to process only a part of the file. If you want to analyze all of event in the file list, you can specify very large number as like 100000000

                                                                               

6. Output files

F2K containing TWR hit information will be written under $OUTPUT_FILE_DIR

A root ntuple file is created for a monitoring, ./wavehisto.root

                                                                               

7. Further questions

jwnam @hep.ps.uci.edu