E852 Documentation: Software: Pedestals

E852 Documentation: Software: Pedestals

Introduction

This document describes how the online/offline software handles the ADC pedestals, how the pedestals are measured and stored.

Currently we support LeCroy 1885 and 1881 Fastbus ADCs and IU ADCs.

How to Measure the Pedestals

The pedestals are measured by putting the DAQ in a special 'pedestals' mode. In this mode, data is read only from selected ADCs, which are assumed to be gated with a pulser and have their data inputs disconnected.

To prepare for a pedestals run, frm the DAQcontrol program, pressing the 'pedestals' button. This will tell 'DAQinit' to initialize the hardware for the pedestals run. The 'DAQinit' program will pop-up a series of windows asking to select ADCs, etc... Just follow the prompts... :-)

After 'DAQinit' finishes, it will leave the DAQ in the 'no run' mode. To start the pedestals run, press the 'begin run' button. After taking enough data, stop the run by pressing the 'end run' button.

During the pedestals run, data is routed to the pedestal measuring program (called 'pedestals'). The progress of this program can be monitored using the DAQ Logging System, the pedestals measuring program will appear under the name 'pedestals'.

After the end of the pedestals run, the pedestals measuring program will store the pedestals into the Map Manager file and terminate.

How the pedestals are Stored

When pedestal data is taken, the pedestals program calculates the following numbers for each ADC channel:

nevents - number of events where this channel fired.
          Useful to detect sick channels.
    min - minimum ADC value the program ever saw
    max - maximum ADC value, note that overflows are seen as 65535
average - the average ADC values
  sigma - the standard deviation of the ADC values

threshold - the ADC zero suppression threshold

If zero suppression on an ADC is turned on, the ADC zero suppression thresholds are downloaded into that ADC and the ADC values below the threshold are not read-out during normal running.

Currently, the thresholds are calculated using the formula:


threshold = average + 3.0 * sigma

ADC Thresholds

The array of thresholds ready for downloading into the ADC is saved in the 'E852_INIT/pedestals' directory with file names like '1881.0x10712', where '1881' is the ADC type and '0x10712' is the ADC's Fastbus address.

Map Manager

The measured data is stored in the Map Manager file 'pedestals.Map'

The subsystem name is (for example) '0x10712-64', where '0x10712' is the ADC's Fastbus address and '64' is the number of channels in that ADC.

The item names are 'average', 'max', 'min', 'n', 'sigma' and 'threshold'.

The access time is the run number when the pedestals were measured.

How to look at pedestals

You can look at the pedestals directly, using your favorite map manager browsing tool, see the mapmanager page for more details.

Otherwise, you can use the printPedestals program to print the pedestals data for any particular run for any subsystem.

How to access pedestals from a program

The pedestals for a given run and subsystem can be loaded using the functions from the 'libdata' library declared and documented in the pedestals.h include file.

//end file. CO 1.Apr.1994