Project

General

Profile

UCL Test Bench

IP addresses

Device IP address
MCH 192.168.200.34
Tracker FC7 (slot-2) 192.168.200.72
CCC FC7 (slot-4) 192.168.200.71

Labgate network

Info here: https://www.hep.ucl.ac.uk/twiki/bin/view/Computing/LabComputingIPList?twiki_redirect_cache=5d3215cac6755a11dead45911ea56434

35 is the AMC13

AMC13 / FC7

Tracker FC7 (fc7-gm2-ucl-green, IP 192.168.200.72, MAC fc:07:00:00:00:38) is connected to AMC13 channel 4. This channel must be enabled (and only this one) on the AMC13.

A GLIB (glib-gm2-ucl-lbemulator) is emulating 3 logic boards. Each is connected via a fiber channel to the FC7 inputs 0,1,2.

Set the number of hits in the emulated logic boards by writing to the GLIB registers tdcwords.reg2 (this sets number of words in all the emulated logic boards).

Logic boards

USB Devices:

  • FTWYN4RJ
  • FTWYN43B

DAQ Software

Configuration

Configure using the XML file ${DAQ_CONFIG_XML} if running using python, or using the ODB if running with MIDAS.

Some important config params:

  • "/Equipment/StrawTrackerDAQ/Settings/Globals/Sim Mode"
    • Use hardware emulators instead of talking to real hardware
  • "/Equipment/StrawTrackerDAQ/Settings/Globals/External trigger"
    • If in normal mode:
      • If true then expects external trigger (TTC if AMC13, TTL or IPBus if GLIB/FC7)
      • If false then will self-generate a signal at the period specified by "/Equipment/StrawTrackerDAQ/Settings/Globals/Trigger period clocks" (units = clocks) (using local loop back in AMC13, or with software thread sending IPBus gen_spill if GLIB/FC7)
    • If in sim mode:
      • If true then expects external trigger (either "SEND TRIGGER" button in GUI, or one will be sent every EOF if running in MIDAS)
      • If false then will self-generate a signal at the period specified by "/Equipment/StrawTrackerDAQ/Settings/Globals/Trigger period clocks" (units = clocks) (using T1 emulator for AMC13, or with software thread sending IPBus gen_spill if GLIB/FC7)

Using the calo frontends

The calo frontends are in gm2daq. They are:

  • CaloReadoutAMC13
    • The readout frontend
  • AMC13Simulator
    • The emulator

The guide below assumes you have NOT setup the gm2-tracker-readout-daq environment (using trackerDaq-setup.sh). For the time being this is incompatible with gm2daq due to different amc13 tool versions (this will be resolved in the future).

To build them follow these steps:

cd <your install location>/gm2daq
. setup.sh                                                 #Set environment (edit this script to match your system)
cd $AMC13_STANDALONE_ROOT/amc13StandaloneMAN_2014-05-12
make                                                       #Build the calo modified AMC13 libs
cd $GM2DAQ_DIR/frontends/AMC13Simulator
make                                                       #Build the simulator frontend
cd $GM2DAQ_DIR/frontends/CaloReadoutAMC13
#If not using MC1 DAQ machines, edit Makefile to set "USE_GPU" to "0" (as don't have GPUs/CUDA on e.g. UCL machines)
make                                                       #Build the readout frontend

The following ODB params need settings:

  • /Equipment/AMC1301/Settings/Link01/readout ip
    • IP adress of machine running CaloReadoutAMC13 frontend (use localhost e.g. 127.0.0.1 if running all on same machine)
  • /Equipment/AMC1301/Settings/Link01/source ip
    • IP adress of machine running AMC13Simulator frontendd (use localhost e.g. 127.0.0.1 if running all on same machine)

To run the frontends, use the gm2-tracker-readout-daq environment (using trackerDaq-setup.sh) to get all our MIDAS experiment variables. Use the following commands or the buttons in the "Programs" tab in the MIDAS web GUI:

$GM2DAQ_DIR/frontends/AMC13Simulator/frontend -i <fronted index>
$GM2DAQ_DIR/frontends/CaloReadoutAMC13/frontend -i <fronted index>

where <frontend index> is in th range 1-24.

Note that AMC13Simulator must be started BEFORE CaloReadoutAMC13.

Note that the calo data volume is large, so if not using GPUs then you either need to run with a low trigger rate (0.5Hz seems fine in MasterGM2) or prescale the data (TODO how?).

Troubleshooting

Missing readline

When the building the calo AMC13 stuff, you might get errors like:

include/hcal/amc13/FilePrompt.hh:11:31: error: readline/readline.h: No such file or directory
include/hcal/amc13/FilePrompt.hh:12:30: error: readline/history.h: No such file or directory

This means that readline-devel isn't installed on your system. Do this using (requires root):

yum install readline-devel

Missing CUDA

When the building the CaloReadoutAMC13 frontend, you might get errors like:

gpu_thread.cpp:35:18: error: cuda.h: No such file or directory

This means that the CUDA GPU packages can't be found. If you have the GPUs (e.g. the MC1 DAQ machines), you probably need to check your "CUDASYS" environment variable is correcta nd that your machine has CUDA installed. If not at MC1 (e.g. UCL), we need to build without GPUs so make sure that $GM2DAQ_DIR/frontends/CaloReadoutAMC13/Makefile has "USE_GPU" set to 0 to avoid building with these packages.

Fixing permissions

The permissions are weird on /unix/muons/g-2, and the g-2 group stuff isn't working. This means that common repos on here (gmwmidas,gm2daq,etc) need their permissions updating manually so that all users can build.

Need to do this each time the repo is pulled.

The following command sets the correct permissions (and only on directories so git doesn't think all files are modified):

chmod 771 `find <repo> -type d`

e.g.

chmod 771 `find gm2midas -type d`