next up previous contents
Next: Scintillation Light Up: Monte Carlo Previous: User Control   Contents

Calibration and ZDAB Data Structure

The development of the packer/unpacker routines for SNOMAN 2.07/2.08 represents the first attempt at generating "real looking" data which has the same format as will be written out by the DAQ/electronics system. In version 3.01 this has matured into the production version. This bit packed data consists of status/error flags and raw digitized ADC counts from the three charge and one TAC channels. The data format encoded for the Event Header and PMT Event Records is outline in the BANK_ZDAB_PMT documentation. The PMT charge (Q) and time (T) from the Px words of the PMT banks, and other quantities generated by the Monte Carlo are bit packed into this data format and placed in a single linear bank called ZDAB. This results in the Monte Carlo and Real data having the exact same event format (e.g. Header and PMT Event records) except for a single reserved bit in the event Header which is set for the appropriate data type. At present the only data record defined is for PMT events. In the future, however, the ZDAB record structure will be expanded to include NCD, CMA and RUN header data. These will be placed in separate ZDAB data records and flaged by the record type word which is found in the first 7 bits of the bank.

Before packing a PMT event into the ZDAB bank, the Q and T have to be converted into raw digitized ADC counts. This is done in the UCL_UNCALIBRATION routine which uses simple calibration constants to make the transformation. As of 4.01, this is a channel-dependent calibration (see the titles documentation TCAL and PDST WPCA GPCA ) This produces simulated raw data which is then placed into the intermediate PIx PMT words (i.e. three charge, one or two time, one PMT number and one flag banks). This intermediate data is then digitized, bit packed and placed into the ZDAB bank in PCK_PACK_ZDAB. To output the ZDAB bank as a stand alone unmasted event the user must set the output type switch which is stored in the TEIO titles banks. The user also has the option of appending all of the Monte Carlo source vertex/track banks to the end of the PMT event record in a pack format. The user options for this is found in the TPCK titles bank. There is some loss of position and angle precision but this is very minimal (e.g. 0.03cm position and 3.1e-5 radians resolution). Also, the PMT jitter and Cerenkov history (presently not defined) can be packed and appended. Therefore, all the information necessary for doing analysis, fitting and comparing the results to the source MC is stored in a single compact format which looks and feels like the real data as presently defined.

On reading back a ZDAB event into snoman the UPK_UNPACKER bit strips the ZDAB bank words into the appropriate PIx words of the PMT banks. If MC_FLAG is set to Monte Carlo data type then it checks if one of the packer options (PCK_TYPE) was set in the DAQ status word. If so, the MC source vertex/track information is unpacked and the appropriate MC banks are lifted and filled. The PMT jitter and Cerenkov history is also unpacked if it was originally appended. After this the CAL_CALIBRATION routine takes the PMT banks that were lifted/filled and applies the Q and T linear transformation constants to the PIx words to convert the raw ADC counts into units of photoelectrons and nanoseconds. The two data paths can be summaried as follows:

Reading back the event is as follows:

Where:-

If one wants to avoid writting out the events to disk and then reading them in, the OUTPUT and INPUT steps can be avoided by selecting, in sequence, the UNCALIBRATION/PACKER/UNPACKER/CALIBRATION processors. This allows the user to simulate the effects of the DAQ and electronics (e.g. loss of precision due to digitization, etc) without having to produce data files. Do not use a subset of this set of processors e.g. UNCALIBRATION/CALIBRATION or PACKER/UNPACKER, they will not work properly; either use all four or none at all. If one chooses to write out ZDAB event files then for 1000 charge currrent events one can expect a file size of 0.98MBytes for the PMT data only, and up to 1.31MBytes with all the MC information included.

Also the Px and PIx banks are slowly being replaced by the PMT banks. There is one PMT bank per PMT and each bank holds a single entry from all the PIx and Px banks. The processors described above have been converted to the new scheme. Currently the system state after unpacking is backwards compatible; both the PMT and PIx/Px banks area available.


next up previous contents
Next: Scintillation Light Up: Monte Carlo Previous: User Control   Contents
sno Guest Acct 2009-09-09