Use crystal ball (2017)

DAQ

  • Log into GSI as user ‘land’:

    ssh -lland lx-pool.gsi.de
    
  • Go to the experimente directory:

    cd /u/land/lynx.landexp/ikp/xbdaq
    
  • You will find the following:

    r4l-43 - Config for the LEFT of crystal ball - ctrl = 1 - crystals 82-162
    r4l-59 - Config for the RIGHT of crystal ball - ctrl = 2 - crystals 1-81
    scripts - Scripts to set environment variables
    unpacker - Main ucesb directory (contains e.g. empty unpacker)
    upexps/xb2017 - Experiment specific unpacker
    r3bfuser - Glue code between nurdlib and drasi
    drasi - drasi/lwroc main dir
    nurdlib - readout library
    trloii - trigger logic library and tools
    htools - Support library for nurdlib
    
  • There is a screen session on lxir123:

    ssh -lland lxir123
    
  • Log into it:

    screen -x xbd
    
  • It has many windows:

    r43 - Logged into r4l-43 (for compiling / log files)
    r59 - Logged into r4l-59 (for log files)
    ts - Logged into lxir123 (for time sorter)
    tree - drasi tree viewer
    pi - Logged into landpi001 (for HV control)
    log - drasi logger
    cfg - The config files
    empty - empty unpacker for testing
    stop - The daq stop script
    
  • DAQ control

    To start the DAQ on each side of XB, do: In each of the windows r4l-43 / r4l-59:

    > cd landexp/ikp/xbdaq/r4l-XX
    > ./master.sh
    
  • Stop acquisition

    Just Ctrl-C either crate or the time sorter at any time. The DAQ will resume automatically, as soon as all components are running.

To be done

  • Report when, and find out why some modules stop wapping.

  • Correct cabling of crystals.

  • Clock distribution:

    Currently, the clock distributor module is present in the setup, but the generated clock frequency is not used by the modules. The module is configured to produce a clock frequency of 25 MHz (in r4l-43/main.cfg).

    One needs to configure the sis3316 modules to use the external clock supplied on the CI input and to produce a proper 250 MHz clock from this input frequency.

  • Heimtime decoder (not so important).

  • Adjust HV to improve energy resolution.

  • Replace NaI with worst resolution with LaBr.

Slow control (HV)

landpi001 runs the EPICS servers for both systems

  • HV:

    cd epics/iseg_hv/scripts
    
    • First make sure that the can device is up:

      candump can0
      

      If you see the message ‘interface down’, then please run:

      sudo ~/bin/start_can
      
    • Then initialise the HV:

      ./init.sh
      
    • And switch on the crystals:

      ./all_on.sh
      
    • Here are a couple of helper scripts:

      all_on.sh                 - Switch all crystals ON (does not set voltage)
      all_off.sh                - Switch all crystals OFF (does not reset voltage)
      init.sh                   - Read a voltage list file (default: init_final.list)
                                          and apply the voltages listed there
      single_on.sh <cr>         - Switch a single crystal on
      single_off.sh <cr>        - Switch a single crystal off
      read_settings.sh          - Read settings for all crystals
      vset_single.sh <cr> <v>   - Set voltage v on crystal cr
      vget_single.sh <cr>       - Read back set and measured voltage on crystal cr
      

Restart the VME crates

It is possible to restart the RIO by sending a VME reset from the VME crate. The VME crates should in principle be reachable via network as krdev002 (left side) and krdev003 (right side). However, at the moment this is not possible. Therefore, whenever possible try to stop the DAQ with the procedure outlined above. Otherwise, the modules may end up in a locked state, and only a power cycle can reset them.

A second method for VME resets is using the VME reset capability of the RIO itself. For this, issue the following command:

/bin/ces/CesXpcBridge_SetOption XPC_VME_RESET 1

Analysis

  • Streaming, unpacking and merging data

    Unpacker is in:

    ~/lynx.landexp/ikp/xbdaq2017/unpackexps/xb2017
    

    The unpacker has a custom user function that tries to convert the sis3316 timestamps into the white-rabbit timescale. It makes use of the fact that the last timestamp recorded in a module (the one that was recorded just before the bank switch) has a good relation to the TRLOII timestamp that got latched by the bank swap signal. Of course this is only true for the first module that issued the bank switch signal. If during readout also another module becomes full and switches the bank, then the latest timestamp in that second module has no relation to the TRLOII timestamp. Therefore, the code looks for the latest timestamp in all modules that have data and then uses the earliest one of these. That timestamp is then related to the TRLOII timestamp of the event and this relation is used to calculate the slope and offset between the two clock frequencies. Using the slope and offset the sis3316 timestamps are converted to white-rabbit scale timestamps. These should then be used to correlate the data, i.e. sort together hits from different modules and crates into data chunks. Time differences should only be computed using the original sis3316 timestamps. The user function also calculates the high resolution timestamps from the MAW values written to the data stream. The procedure is outlined in the sis3316 manual and can lead to a timing precision down to 70 ps. At present the algorithm has not been tested extensively. Notable ROOT file exported branches are:

    TS_LOW - normal sis3316 timestamp
    TS_HIGH
    WRTS_LOW - sis3316 timestamp scaled to WR
    WRTS_HIGH
    WR_LOW - trloii timestamp
    WR_HIGH
    E - energy (baseline subtracted)
    BE - baseline value
    EE - raw energy value (not subtracted)
    TS_CORRECTION - timestamp correction in ps
    TS_FINE - fine timestamp in ps
    MAW_MAX - MAW maximum value
    MAW_BEFORE - MAW value before trigger
    MAW_AFTER - MAW value after trigger
    

    A few parameters can be tweaked inside sis3316_params.h. Most notably the value of MAX_HITS. A higher value allows more hits in the multi-hit arrays, but also increases the memory consumption.

    • Set root environment:

      rootfind
      
    • Streaming from a single crate is not supported when running with timesorter.

    • Stream from the timesorter:

      ./xb2017 trans://lxir123 --output=/path/to/file.lmd
      
    • Or directly unpack to root file:

      ./xb2017 trans://lxir123 --ntuple=RAW,/path/to/rootfile
      
    • Serving data on a local port:

      ./xb2017 trans://lxir123 --server=stream:8000
      
    • Unpacking from a local server:

      ./xb2017 stream://localhost:8000 --ntuple=RAW,/file.lmd