Author: Wilko
This page was created January 26, 1996, last modified January 26, 1996

  1. Introduction
  2. The DSP Data Structure
  3. Program Flow
  4. Function Description
  5. Where to find the code


The DSP Data Structure

The structure that contains all the information about a single DSP card is : dspType. All programs are build around this structure, a) to created it and b) to fill the hits for an event. For the analysis it is only this structure the user has to know about.

Type: dspType

    typedef  struct
       int  linksUsed;        // number of links used for a particular dsp
       int  linkList[4];      // list of the links that are used
       int  dspAddr;          // the readout address of the dsp (not the physical

       LinkType  *link[4];

    } dspType;
number of links used for a particular dsp.
list of the links that are used, e.g: linksUsed = 2 and link 0 and 3 are used than linkList[0] = 0, linkList[1] = 3.
the readout address of the dsp (not the physical or DIP switch address).
LinkType *link[4]
type for the four links of a dsp link. When the dspType is created no memory is allocated for the four links (i.e: link[i]=NULL), but it has to be explicitly allocated for those links that are used in the readout. LinkType is described below.

Type: LinkType

LinkType describes one dsp link. The hit information for each channel is stored in the type LinkHits, for which the needed memory has to be explicitly allocated (function: memHits ()).

    typedef struct
       int    nChan,  nChips;
       int    hitType;

       int    nHits;
       float  pitch, offset, angle;

       char   *detName;

       ChanType  *chan;
    } LinkType;
nChan, nChips
number of readout chips and channels (=128 * #channels).
defines the if a 0 or 1 is interpreted as a hit.
number of hits for an event.
pitch, offset, angle
for the alignment of the detectors, and track reconstruction the pitch width parallel offset of the detector and the rotation angle has to be known.
name of the detector.
pointer to the type that contains information for every readout channel, i.e.: hits, bad channel bit, hits ored with bad channel bit .. .

Type: ChanType

ChanType information about an individual channel.

     typedef  struct
        unsigned short  rawHit:1;         /*  hit && !badChan  */
        unsigned short  hit:1;            /*  decoded hit      */
        unsigned short  goodChan:1;       /*  bad Channel bit  */
        unsigned short  addr:10;          /*  used for hit list mode */
        unsigned short  empty:3;

     }  ChanType;
Bit if a hit was recorded (=1) or not (=0).
As rawhit, but bad channels are set to 0 (hit = rawHit && badChan )
Bit if a channel is considered to be bad. goodChan = 1: good hit, goodChan = 0: bad channel.
10 bits for channel number. This variable is used to store the hit list. You have to be careful not to mix the channel number due to addr, and the channel number for hit. Example: If we read out 10 channels and channel 2, 4, 7 and 9 are hitted.
        chan[0].hit = 0  chan[0].addr = 2
        chan[1].hit = 0  chan[1].addr = 4
        chan[2].hit = 1  chan[2].addr = 7
        chan[3].hit = 0  chan[3].addr = 9
        chan[4].hit = 1  chan[4].addr = x
        chan[5].hit = 0  chan[5].addr = x 
        chan[6].hit = 0  chan[6].addr = x
        chan[7].hit = 1  chan[7].addr = x
        chan[8].hit = 0  chan[8].addr = x
        chan[9].hit = 1  chan[9].addr = x

Program Flow

The main program flow for the initialization is:

Where to find the code

!!!! no yet installed !!!!
The binary online code is installed on the KEK-DEC station in ~/wilko/monitor. There are the following directories:

source files for the binary code.
utility functions used by the binary code. These functions are archived in libutilBinary.a

Back to SCIPP-Silicon
Back to SCIPP home page