Event Creation - pixie_std

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

hissub

Pixie_std is the interface between the HRIBF scan program and the Pixie16 C++ analysis. The function 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. The maximum number of events is programmed during experimental setup. This spill of data is divided into smaller chunks of data for transmission across the network. The hissub_() function collects the chunks of data to reassemble the complete spill.

Initialization

Following the reconstruction of the first spill and before continuing the analysis is initialized with the function Init_IDmap().

Init_IDmap

When the first spill has been reconstructed and before analysis begins the function Init_IDmap() is called to initialize all routines and variables used in the scanning process. First the detector_driver class is queried to determine the valid detector types that can be used in the analysis. This is accomplished with the following two lines of code in Init_IDmap()
  // file pixie_std.cpp - Int_IDmap()
  ddriver = &driver;
  ...
  ddriver->get_known_detectors();
The detector types that are currently valid for analysis are dssd_front, dssd_back, ge, timeclass, si, position, idssd_front, sinct, and mcp. The detector types position and idssd_front have to date been exclusively used for fragmentation experiments at MSU.

Next the file map.txt is opened to determine a unique detector that is connected to each pixie16 strip. Please see map.txt for more information. For every line in the map.txt file the associated parameters are read into an identifier variable called id and pushed into the variable modchan (a vector containing a channel identifier for each line in the map.txt) will the following code:

  //file pixie_std.cpp - Init_IDmap.cpp
  modchan.push_back(id);
If the entry should be ignore (by setting the detector type to "ignore") a dummy entry is inserted into the modchan vector. In the Scan_List() function each channel has an identifier retrieved from the modchan vector using the following code:
  //file pixie_std.cpp - Scan_List()
  rawev.chan.Set_chanid(modchan[id]);
where the variable id is defined as
  module number * 16 + channel number
  
Thus the identifier corresponding to module #2 and channel #10 (id = 42) must be stored in modchan element 42 to allow the retrieval to work properly. This requires that entries in map.txt are in sequential order and all combinations of module number and channel number are present.

After reading in the map.txt file the detector types that are used in the current analysis along with an empty copy of the rawevent are sent to the detector driver for initialization.

For each pixie16 channel that has not been set to "ignore" the detector type is checked against the vector of known detectors. If the detector type is not listed among the known detectors the program will terminate to provide the user an opportunity to fix the problem.

hissub_sec

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

Scan_List

After the list of channels that triggered in the current spill has been sorted by time the Scan_List() function is invoked. This function scans the list of channels and groups channels with similar times togther into events. Starting from the begining 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 diff_t variable (in units of 10 ns) and

Warning:
All possible combinations of module number and channel number must be present in the map.txt file. There is currently no check on this requirement. Failure to do this may reset in the code issuing a "segmentation fault".

The entries in map.txt must be ordered sequentially. Failure to do so could possibly mix different detector types together.

If you add information into the rawevent class make sure to appropriately zero the variable in the Scan_List() function.


Generated on Wed May 14 10:07:06 2008 for pixie16 by  doxygen 1.5.5