Liverpool Clean Room

DEPRECATED - Do not use

Hardware overview

The following TDCs are currently not working (no response over USB line), and have been disabled in the DAQ config file:

  • LB 0 TDC 0
  • LB 1 TDC 0

The total list of TDCs that have been weird at some time are:

  • LB 0 TDC 1
  • LB 0 TDC 0
  • LB 1 TDC 0

A dead TDC can sometimes be recovered by taking the TDC mother board out of the FLOBBER and wiggling the black cable at the back (snout side) between the daughter and mother. They don't like to be flattened too much, although since they are going into a tight space they have to be a bit flattened unfortunately (will not be the case in the new boards).

Software environment


Online software is in:


The core repository is gm2-tracker-readout-daq.

Before using any online software, set up the environment:

source gm2-tracker-readout-daq/software/


Offline software is in:


Before using any offline software, set up the environment:


Low voltage

To switch on the low voltage, use the following commands:

python $GM2_TRACKER_DAQ_SRC/LowVoltage/ "on 1"  #LV channel 1
python $GM2_TRACKER_DAQ_SRC/LowVoltage/ "on 2"  #LV channel 2

To switch off the low voltage, use the following commands:

python $GM2_TRACKER_DAQ_SRC/LowVoltage/ "off 1"  #LV channel 1
python $GM2_TRACKER_DAQ_SRC/LowVoltage/ "off 2"  #LV channel 2

Don't leave the system on unless it is being used.

DO NOT switch on unless the FLOBBER fan cooling is on.


Initial set up

To totally start again with your MIDAS set up:

source gm2-tracker-readout-daq/software/ #If not done already
$MIDAS_ONLINE_BIN/ hard_clean #Clean any existing experiment
odbedit -c "load $MIDAS_ONLINE/data/cleanODB_lpoolOct2015.odb" #Load clean ODB
$MIDAS_ONLINE_BIN/ ALL #Init all equipment according to your system (file paths, etc)
$MIDAS_ONLINE_BIN/ start #Start MIDAS experiment
firefox $MIDAS_HOST:$MHTTP_PORT & #Open experiment web GUI

Start/stop MIDAS

The steps above are just for the initial set up. In general MIDAS will stay running, but if you need to stop/start it again (e.g. after PC reboots):


Trigger server

A trigger server must be running to use system. If it is running it will be in a screen called trigger_server.

To start it:

$MIDAS_ONLINE_BIN/ start_fake_trigger_server

To stop it:

$MIDAS_ONLINE_BIN/ stop_fake_trigger_server

To view MIDAS web GUI (where you do everything), go to .

Starting frontends

To start a frontend, go to the MIDAS web GUI and click the Programs tabs. It shows a list of frontends, and has buttons to start/stop each of them.

The frontends should be started in the following order:

  1. LowVoltage
  2. SlowControls
  3. EBuilder
  4. masterTrigger
  5. StrawTrackerDAQ

They should be stopped in the reverse order.

Starting runs

The MIDAS web GUI has a Start button for starting runs. Press this and leave the default run number, then click OK to start run. Amazingly enough click the Stop button to stop it.

Note that starting the run takes around 30 seconds, so be patient! The box in the top-left of the GUI will go green once the run has fully started.

DAQ config

The configuration of StrawTrackerDAQ is defined in the following files:



USB connection

If having issues connecting via USB to logic boards (e.g. hang on "Testing USB connection (if script hangs here, either logic board is off or no USB connection) ..." line in script), the USB cable might need unplugging and replugging at the PC end. If it is in the hub, it also might need unplugging, plugging into the PC, then replugging back into the hub.


Many MIDAS problems can be solved with the following command:

$MIDAS_ONLINE_BIN/ hard_restart    #Restart MIDAS after some cleaning

Noise scans

Noise scans can be used to check what ASDQ discriminator threshold (DTHRThreshold param in DAQ config XML file) needs to be used to exclude noise.

To run the scans, following these steps:

1) Configure logic boards / TDCs:

python $GM2_TRACKER_DAQ_SRC/test/ -s -l <LB ID>

where <LB ID> is 0 or 1 for the two logic boards, e.g.

python $GM2_TRACKER_DAQ_SRC/test/ -s -l 0

2) Run noise scan

Run the noise scans with the following script:

python $GM2_TRACKER_DAQ_SRC/test/ -l <LB ID>


python $GM2_TRACKER_DAQ_SRC/test/ -l 0

Change the following parameters in to set the min and max thresholds and step size for the scan (units are mV):

  • minThreshold
  • maxThreshold
  • thresholdStepSize

3) Make plots

Make plots from the results using:

root -l $GM2_TRACKER_DAQ_SRC/test/plotNoiseScanResults.C

The plots will also be saved as NoiseScanResults_TDC0.png, etc (one per TDC).


ROME is used for DQM (Data Quality Monitoring).

To run it offline (e.g. on a MIDAS output file):

$GM2_TRACKER_DAQ_SRC/dqm/strawtrackerdqmanalyzer.exe -i $GM2_TRACKER_DAQ_SRC/dqm/romeConfig.xml -m offline -pi $MIDAS_ONLINE_DATA -po $MIDAS_ONLINE_DATA/ROME -ph $MIDAS_ONLINE_DATA/ROME -r <run num>

where <run num> is the run number you want to analyze.

To run it online (e.g. during MIDAS runs):

$GM2_TRACKER_DAQ_SRC/dqm//strawtrackerdqmanalyzer.exe -i $GM2_TRACKER_DAQ_SRC/dqm/romeConfig.xml -po $MIDAS_ONLINE_DATA/ROME -ph $MIDAS_ONLINE_DATA/ROME -m online

MIDAS must be running already to use ROME in online mode.

Offline analysis

To process a MIDAS file in the offline analysis world, first set up the offline environment as described above and then run the following FCL files:

MIDAS-to-art / Unpacking :

gm2 -c $MRB_SOURCE/gm2unpackers/fcl/LiverpoolUnpacker.fcl -s $MIDAS_ONLINE_DATA/run<run num>.mid.gz

e.g. for run 1:

gm2 -c $MRB_SOURCE/gm2unpackers/fcl/LiverpoolUnpacker.fcl -s $MIDAS_ONLINE_DATA/run00001.mid.gz

Raw to digit conversion :

gm2 -c $MRB_SOURCE/gm2tracker/fcl/LiverpoolRawtoDigits.fcl

Digit plotter:

gm2 -c $MRB_SOURCE/gm2tracker/fcl/LiverpoolDigitsAnalysis.fcl

The result should be a ROOT file called LiverpoolDigitsAnalysis_strawTriggerDigitPlots.root with some histos in it.