next up previous contents
Next: The Perm Bank Cut Up: Hardwired Tests Previous: Hardwired Tests   Contents

The Two Pass Hardwired Filter

The two pass cut is an unusual hardwired filter in that it passes over data files twice. During the first pass it stores and reorders the times of events along with the results of other tests. Any events which are out of order by more than the reordering stack time are rejected. It then passes a sliding time window over the data recording as bad time windows any bursts or events which fail other tests. The second pass it filters the data rejecting any events which are either part of or too close to a bad time window. This filter returns headers as good events. Printed the end are the number of passed events, failed events, orphans, number of events which were out of time by more than the reordering stack, the time by which the most out of order event was out of order, the total time, the dead time and the percentage of memory used. The dead-time is a little inexact and just gives the approximate size.

The parameters used are in FLTH 6 in filter.dat. An nhit cut is among the variables as it would be unwise to have an nhit cut on INP when looking for bursts. The length of the sliding window and the threshold number of events in the window required to label a group of events a burst can be varied. To avoid edge effects in the burst cut there is a variable time to cut at the start of the first file in a continuous set of passes and at the end of the last file of all those passes. A list of test numbers (remember hardwired tests are negative) to apply to each event to see if it is bad can be put at the bottom. The two pass filter will then call these tests and cut around any bad events and bursts by the safety margin specified. If requested the histograms and ntuple will go in the file on FLT 1 or two_pass_cut.out. The histogram just gives nhit histograms of the unfiltered, passed and failed events. The ntuple contains the following:

'nhit'         The number of hits
'ev_tid'       The global trigger id
'pass'         Whether the event was passed 1. or failed 0.
'ngrp'         The number of events in the
                  closest Bad Time Window
'deltatns'     The time in ns to the near edge of
                  the closest BTW (0 if in it)
'tlate'        If the event was too late to be reordered this
                  gives how late it was in milliseconds.
'HW000008',etc Whether the closest BTW passed hardwire test 8
For events which were too far out of time to be reordered 'pass', 'ngrp' and 'deltatns' are all set to -1.

The data files must be on input stream 1 and must be listed twice eg.

FILE INP 1 /data/prod/SNO_0000002528_000.zdab
FILE INP 1 /data/prod/SNO_0000002528_000.zdab
A pass may contain any number of files provided that there is enough memory in idiv_perm to store all the bad time windows. It is assumed that the files are in time order with no gaps between them. So to filter subruns 0,1,2,3,4 an acceptable but strange file order would be 0,1,2,0,1,2,3,4,3,4. The advantage of grouping files is that less end of pass cuts will be made. If there were a time gap between files in the same pass then the end of pass cut won't be applied to the gap it will just look like a quiet spell. Also the burst cut uses the 50 Mhz clock so if there were a gap of more than a day between files in a pass it may look like there are a load of out of order events. So as a rule of thumb group sub runs but separate runs.


next up previous contents
Next: The Perm Bank Cut Up: Hardwired Tests Previous: Hardwired Tests   Contents
sno Guest Acct 2009-09-09