README trig_filter_treeX for bcal06 data May 5, 2008 This directory contains 3 programs that are near identical copies of one another. There are 3 different ones corresponding to 3 different versions of the bcal TTree definition used in producing the bcal_dst files in /work/halld/bcal06 on the JLab CUE. The purpose of these programs is to read in events from root files produced by bcal_dst and write only the events satisfying a trigger mask into an output file. The output tree is of the same format as the input tree, except that the run number is added as another branch. The programs were written specifically to address a request by the Regina group to have a set of files containing only cosmic triggers. This is useful for production runs which had cosmic data sprinkled in amongst a sea of beam photon events making it uneseccarily long to make a single pass. The programs are all run with 2 arguments. The first is an integer representing the bit pattern of the triggers one wishes to keep and the second is the input file name. For example: trig_filter_tree1 32 bcal_dst02371.root This would create a file called bcal_dst02371_t6.root that had only events in which trigger 6 (=log(32)/log(2)+1) was set. Note that other triggers could be present as well. The program of the appropriate tree type should be used. If one uses the trig_filter_tree2 program on a bcal_dst file containing a "version 1" tree, then a seg fault is likely and the desired result will not be achieved. Lists of which files belong to each type can be found in the following files: /work/halld/bcal06/tree1files.txt /work/halld/bcal06/tree2files.txt /work/halld/bcal06/tree3files.txt Please direct any questions or comments to David Lawrence at davidl@jlab.org.