Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
Event Creation - PixieStd

This page describes PixieStd.cpp used for event creation and should not have to be altered on a regular basis. PixieStd includes five important functions which control event creation:

  • hissub_() - The interface between SCAN and the C++ analysis. Reassemble a complete pixie16 spill of data.
  • hissub_sec() - extract channel information from the raw Pixie16 data spill and sort the triggered channels based on time.
  • ScanList() - Group channels into events and send to DetectorDriver for processing
  • HistoStats() - plot various permanent spectra such as the run time and time between events.

pstd-hissub

PixieStd is the interface between the HRIBF scan program and the Pixie16 C++ analysis. hissub_() is called from scan with two variables. The first, ibuf, is a pointer to the array where the raw data is stored. The second, nhw, describes the amount of raw data that is stored in the array.

In a typical experiment with the new pixie16 readout (default), all Pixie16 modules are read out when one module has reached its maximum number of events or FIFO threshold. This is programmed during experimental setup. This spill of data is divided into smaller chunks of data for transmission across the network. hissub_() collects the chunks of data to reassemble the complete spill.

hissub_sec

Once the spill is reassembled, hissub_sec() scans the reconstructed buffer to extract individual triggered channels using the ReadBuffData() function. The individual channels are inserted into the list of events and once the spill has been completely scanned the list is sorted based on the event time of each individual channel.

pstd-ScanList

After the list of channels that triggered in the current spill has been sorted by time, ScanList() is called. This function scans the list of channels and groups channels with similar times together into events. Starting from the beginning of the list and continuing to the end, an individual channel event time is compared with the previous channel event time to determine if they occur within the time period defined by the EventWidth variable (in units proper to the revision) and

  • if yes - the two channels are considered to belong to the same event and the current channel is added to the list of channels in rawEvent.
  • if no - the previous rawEvent is considered complete and is sent to the DetectorDriver for processing. Once processing is finished, the rawEvent variable is cleared and the current channel is placed inside it to begin a new event.