Use crystal ball (2016)

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 - MBS macros for the LEFT of crystal ball - ctrl = 1 - crystals 82-162
    r4l-59 - MBS macros 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/xb2016 - Experiment specific unpacker
    r3bfuser - Glue code between nurdlib and MBS
    nurdlib - readout library
    trloii - trigger logic library and tools
    htools - Support library for nurdlib
    unpacker - ???
    
  • There is a screen session on lxir123:

    ssh -lland lxir123
    
  • Log into it:

    screen -x xb
    
  • It has many windows:

    r4l-43 - Logged into r4l-43 (for compiling / log files)
    r4l-59 - Logged into r4l-59 (for log files)
    lxir - Logged into lxir123 (for compiling)
    devMbs - development
    r4l-59ioc - EPICS server for r4l-59
    r4l-19ioc - EPICS server for r4l-43
    watch - EPICS watcher for both systems
    pi - Logged into landpi001
    
  • DAQ control (conventional) 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
    > resl
    > mbs
    mbs> @s
    

    In the conventional way you cannot use the EPICS watcher for the DAQ

  • DAQ control (via EPICS)

    Note

    This only works, if the EPICS servers are started (see below).

    From a GSI machine (lx-pool might not work), do:

    epicsfind
    export EPICS_CA_ADDR_LIST="140.181.86.103 140.181.88.37"
    caput -S R4L-10:setup_pwd /land/usr/land/landexp/ikp/xbdaq/r4l-43
    caput R4L-10:dispatch_up 1
    caput R4L-10:dispatch_send "r4l-43::@s"
    caput -S R4L-29:setup_pwd /land/usr/land/landexp/ikp/xbdaq/r4l-59
    caput R4L-29:dispatch_up 1
    caput R4L-29:dispatch_send "r4l-59::@s"
    

    This will start the DAQs using the EPICS control interface For resetting use:

    caput R4L-10:reset_local 1
    caput R4L-29:reset_local 1
    

    To start EPICS servers (IOCs) Log into r4l-43 and r4l-59 and do:

    cd bl/epics/mbs_ioc/iocBoot/iocmbs
    ./st.cmd
    

    The servers on the raspberrypi (landpi001) are started automatically

Slow control (HV and MSCFs)

landpi001 runs the EPICS servers for both systems

  • HV:

    cd epics/iseg_hv/scripts
    
    • 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
      
  • Shaper modules (Mesytec MSCF-16):

    cd epics/mrcc_ioc/script
    
    • You will also find helper scripts here:

      read.sh <cmd> [<from> <to>]       - Read value of parameter <cmd>
      set.sh <cmd> <mscf> <value>       - Set parameter <cmd> of <mscf> to <value>
      read_cr.sh <cmd> <from> <to>      - Read parameter <cmd> from range of crystals
      upd_settings.sh                   - Read all parameters from hardware
      read_settings.sh                  - Show parameter values
      mux_single.sh <cr>                - Put signal from crystal <cr> on the mux output
      

      Note

      One always has to upd_settings first, before read_settings. Otherwise the values are not read from the hardware, but only from the EPICS database. After setting a new value, the database is automatically updated.

Analysis

  • Streaming, unpacking and merging data

    Unpacker/merger is in ~/lynx.landexp/ikp/xbdaq/upexps/xb2016

    • Set root environment:

      rootfind
      
    • Streaming from a single crate:

      ./xb2016 stream://r4l-XX --output=/path/to/file.lmd
      
    • Unpacking from a single crate:

      ./xb2016 stream://r4l-XX --ntuple=RAW,/path/to/file.root
      
    • Merging data from two streams:

      ./xb2016_merger --merge=wr,2 stream://r4l-43 stream://r4l-59 --output=/file
      
    • Merging data and sending to second ucesb for unpacking:

      ./xb2016_merger --merge=wr,2 stream://r4l-43 stream://r4l-59 --output=- \
      | ./xb2016 --file=- --ntuple=RAW,/path/to/rootfile
      
    • Merging data and serving on a local port:

      ./xb2016_merger --merge=wr,2 stream://r4l-43 stream://r4l-59 \
      --server=stream:8000
      
    • Unpacking from a local server:

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