How to Unpack the 120 Hz Data

This note describes a set of tools for use in offline analysis of 120 Hz information.
These tools are all in the SLD section of DUCS:

Three different sets of code

The form of the 120 Hz information has changed substantially three times over the lifetime of SLD. As a result, three slightly different sets of code must be used to analyze 120 Hz information for the three different run periods:

All of the above-mentioned filenames therefore come in three flavors, terminating in one of three suffixes: 93, 94 and 96.

For example, there are three different processors to unpack the data:

Throughout this note we will refer to code with the 96 suffix. To analyze data from the earlier runs, just substitute the appropriate other suffix.

The composition of the 120 Hz data

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

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

The SCDRQ96 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 SCDRQ96 TEMPLATE to see this format. You can use a simple PEEK SCDRQ96 to dump the contents.

The SQSRB96 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 SQSRB96 TEMPLATE to see this format. The Beam Pulse Record data is kept in tightly packed format because there are so many such records. The detailed structure of the Beam Pulse Records can be read in one of the following three maps:

Do NOT use a PEEK to dump the contents of the entire SQSRB96 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:SPEEKQ96.

To dump an individual Beam Pulse Record, you can either examine the contents still packed in hex by using an ordinary peek, PEEK SQSRB96 <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 SQSRB96 bank from your PREPMORT, insert the following two lines at the end of the declarations:

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

Examples:

The dump routine already mentioned, SDMPQ96, works by invoking all of the functions from SBPR96.STATFUNC. Just look at SDMPQ96 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.

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

To run the job, start IDA from sharables by typing IDA, then start the IDA file by typing @PRODSLD:SBHAT96

SMATT96 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 SQSRB96). 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).

To run the job, start IDA from sharables by typing IDA, then start the IDA file by typing @PRODSLD:SMATT96


Joseph Perl
28 June 1996