• Main INDEX
  • Monthly INDEX
  • PREV
  • NEXT
    Make New Entry, Make Followup Entry

    User name R. Michaels

    Log entry time 12:11:21 on November 1,2010

    Entry number 337982

    keyword=info about livetime from TS registers

    This halog pertains to the trigger supervisor scaler registers
    that potentially can be used as an alternative way to find the deadtime.

    Below is a raw data dump from a recent run in ROC11. Only the
    relevant fragment is shown. Starting with the header 0xfed00017
    the data are found. The last word 0xabc30000 is a header marking
    the beginning of the ungated helicity scaler, which is not
    explained here.

    The 23 words that follow 0xfed00017 can be understood from
    the readout code and the TS structure (see below). One would
    need to refer to the manual for the "TS2" to be sure what these
    things mean, but I will attempt to document it here.

    scaler 1 - 12 = TS inputs after prescaling
    The scalers after #12 are defined by ts->scalAssign = 0xf1ec20;
    scaler 13 = "or" of TS inputs
    scaler 14 = L1A
    scaler 15 = synch scheduled (how many sync events)
    scaler 16 = "forced trigger" (something we don't do)
    scaler 17 = latched triggers
    scaler 18 = prog 2 events (something we don't do)

    The ratio of scalLive1 and scaleLive2 gives the deadtime as follows
    An approx 196 kHz pulser is on the TS
    scaleLive1 = pulser gated by live time
    scaleLive2 = pulser ungated

    In the example below
    scaleLive1 = 0x00018e0f = 101903
    scaleLive2 = 0x0001a1a3 = 106915
    deadtime = 4.92 %

    The scaler #13 and scaler #17 are supposed to give the livetime
    also: livetime = #17/#13. However, for DVCS this is always 1.0
    (and I looked deep into the run where there is statistics) apparently
    because the DVCS crew does it's own deadtime logic external to the TS.

    So I think the only way to get livetime from TS is using
    the scaleLive*.

    ---------- readout lines in ts_scaler.crl -----------

    for (i = 0; i < 18; i++) *rol->dabufp++ = ts->scaler[i];
    *rol->dabufp++ = ts->scalEvent;
    *rol->dabufp++ = ts->scalLive1;
    *rol->dabufp++ = ts->scalLive2;
    *rol->dabufp++ = ts->trigCount; /* FIFO count */
    *rol->dabufp++ = ts->trigData; /* trigger latch pattern */


    ----------- example of data from ROC11 --------------

    0xfed00017 0x00000000 0x00000000 0x00000000 0x00000000 0x00000028 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000028 0x00000028 0x00000000 0x00000000 0x00000028 0x00000000 0x00000028 0x00018e0f 0x0001a1a3 0xffff0001 0xffff0010 0xabc30000

    ---- data structure of the trigger supervisor ---------

    volatile struct vme_ts {
    volatile unsigned long csr;
    volatile unsigned long csr2;
    volatile unsigned long trig;
    volatile unsigned long roc;
    volatile unsigned long sync;
    volatile unsigned long trigCount;
    volatile unsigned long trigData;
    volatile unsigned long lrocData;
    volatile unsigned long prescale[8];
    volatile unsigned long timer[5];
    volatile unsigned long intVec;
    volatile unsigned long rocBufStatus;
    volatile unsigned long lrocBufStatus;
    volatile unsigned long rocAckStatus;
    volatile unsigned long userData1;
    volatile unsigned long userData2;
    volatile unsigned long state;
    volatile unsigned long test;
    volatile unsigned long blank1;
    volatile unsigned long scalAssign;
    volatile unsigned long scalControl;
    volatile unsigned long scaler[18];
    volatile unsigned long scalEvent;
    volatile unsigned long scalLive1;
    volatile unsigned long scalLive2;
    volatile unsigned long id;
    } VME_TS;