How to Unpack the 120 Hz Data for the 1993 Run

This note describes a set of tools for use in offline analysis of 120 Hz information from the 1993 run. Note that due to changes in the form of the 120 Hz information, a slightly different set of code must be used to analyze 120 Hz information from the 1994 run or later. See the separate note for information on that set of code.

The 120 Hz information is sent up from online as a single tightly packed bank, S120.

The processor SUNPQ93 can be called to unpack this information into two separate types of banks, SCDRQ93 and SQSRB93. To use this processor, just declare PROCESSOR SUNPQ93 and then call SUNPQ93(DOIT) to activate the processor.

The SCDRQ93 bank contains the Configuration Descriptor Record and then contains a repeat block with pointers to the related Quasi-Static Records. The data is unpacked into an easy to use format. Look at SCDRQ93 TEMPLATE to see this format. You can use a simple PEEK SCDRQ93 to dump the contents.

The SQSRB93 bank contains the Quasi-Static Record and then contains a repeat block which contains the individual Beam Pulse Records. The Quasi-Static Record data is unpacked into an easy to use format. Look at SQSRB93 TEMPLATE to see this format. The Beam Pulse Record data is kept in tightly packed format because there are so many such records. Do NOT use a PEEK to dump the contents of the entire SQSRB93 bank. The large number of beam pulse records will give you an annoyingly long output. To dump the contents without the repeat block information, use the IDA exec @DUCSSLD:SPEEKQ93.

To dump an individual Beam Pulse Record, you can either examine the contents still packed in hex by using an ordinary peek, PEEK SQSRB93 bank_number block_number, or you can do the following to dump the record in an easy to read format:

From IDA:

Or from PREPMORT:

To access a single quantity from an SQSRB93 bank from your PREPMORT, insert the following two lines at the end of the declarations:

All of the functions described at the bottom of SBPR93 STATDATA are then defined for your prepmort routine. Each of the functions takes as its argument the relevant word of the SQSRB93 beam pulse record block.

Examples:

The dump routine already mentioned, SDMPQ93, works by invoking all of the functions from SBPR93.STATFUNC. Just look at SDMPQ93 PREPMORT to see these functions in action.

Two example IDA files that use the 120 Hz data are in PROD SLD. They are heavily commented. They in turn call some additional prepmort routines, but these too have been included in PROD SLD. Note that the examples apply to unpacking data from the 1994 run onwards. To apply these examples to the 1993 run, you must modify the IDA files and their special PREPMORT routines SBHATIM and SMATTAG as follows:

BHATIME IDA unpacks one S120 record at a time (before each new S120 record is unpacked, there is a REMOVE SQSRBPR). For each S120 record it then calls a routine SBHATIM PREPMORT which finds BHABHA triggers and histograms various quantities for them. (This job was originally prepared for Terry Schalk).

MATCHTAG IDA unpacks all of the S120 records from an entire run, holding all of the S120 data in memory at the same time (there is no REMOVE SQSRBPR). It then rewinds the tape and for each EVENT record tries to find a matching beam pulse record among the S120 data that was unpacked. If a matching record is found, the triggers are checked to make sure the trigger info in the EVENT record matches the trigger info in the S120 record. (This work was done for Mike Huffer).


Joseph Perl
28 June 1994