Project

General

Profile

TestBeam2015SiDet

Running SiDetDAQ frontend at MTest

As must be root user for SiDet (raw ethernet), we have been starting it from the command line rather than via MIDAS. Follow these steps:

1) Sign in to gm2straw7.fnal.gov (IMPORTANT not 6)

2) Change to root user:

ksu

3) Navigate to gm2-tracker-readout-daq and source trackerDaq-setup.sh as usual

4) Run command using:

sh -c "source $GM2_TRACKER_DAQ_SW/trackerDaq-setup.sh ;  $GM2_TRACKER_DAQ_BIN/SiDetDAQ_frontend.exe -h gm2straw6.fnal.gov:7070" 

5) When time to shutdown FE, use ctrl+c from command line

Trouble-shooting

Library load error

Trying to run SiDet FE directly using sudo, e.g.

sudo ../bin/SiDetDAQ_frontend.exe

leads to errors like:

../bin/SiDetDAQ_frontend.exe: error while loading shared libraries: libCore.so: cannot open shared object file: No such file or directory

This is because using sudo change suser so you no longer have the shell variables from the setup script. Instead do this:

 sudo sh -c "source ../trackerDaq-setup.sh ;  ../bin/SiDetDAQ_frontend.exe " 

Tips about Silicon readout

LEDs

  • Trigger board (MC, master controller, the far left board in the crate) will flash a row green LEDs (at bottom near front on left hand face) during CONFIGURE if connection is OK (CONFIGURE is sent a BEGIN OF RUN and a short time after END OF SPILL)
  • MB cards (the 5 cards connected to the Si, the rightmost 5 cards in the crate) have two LEDs each near the front
    • Red LED on MB will flash when the board receives a trigger (e.g. a scint coincidence when the straw active signal is high and no current trigger is underway). This should flicker on all MBs during the MTest spill.
  • Green LED on MB will be on during data readout. These should light up sequentially from MB0 (far right) to MB4 (far left) at END OF SPILL.

First configure

  • Sometimes first CONFIGURE after loading firmware doesn't work, do it again if so
  • When running with MIDAS this would mean that the first MTest spill was bad but the subsequent ones would be good.

Tuning for cable lengths

- Need to set Beetle latency to match tigger card latency plus cable delay (*2 for there and back)
- Also possibly some electronics delays

Readout cycle information

- Proton passes through two PMTs and Si
- Beetle latches amplitude into pipeline (pipeline carries on shifting by one per clock though, so need to fins this amplitude later)
- Also both PMT signals have same leading edge (bad for coincidence) so, delay first (thinner) PMT signal due to shorter signal
- PMT signal takes 84ns to reach trigger card (cable delay)
- This creates a coincidence pulse which lasts for latency value (generally 7, see data) + 0 or 1 clocks (event dependent). It starts on the first rising clock edge after the signal is received.
- TDCs on each MB also start counting upon receipt of PMT coincidence, but start at TDC clock leading edge (200ps rather than 25ns, so more accurate that trigger card). TDC on signal lasts for same period as coincidence trigger except the little extra because it started from a faster clock. This also includes the random 0/1, so compensates automatically for this in the clock cycle (so no offline handling required).
- TDC stop signal occurs 4 clocks after coincidence pulse ends in trigger card. This signal (rising edge of 40MHz clock) (a) stops TDC (b) latches clock cycle (c) increments event counter (d) issues beetle ADC readout pulse
- Beetle freezes pipleline at this this readout pulse receipt (although takes 84ns clocks to arrive, reverse of earlier pulse, e.g. signal time between crate and detector)
- Proton amplitude in beetle is some steps down the pipeline (dependeing on latencies, clocks, etc above)
- Beetle send "data available" at some unknown time after this latch (trigger receipt) because the timing is asynchronous to MC clock. This introduces a variable offset at start of ADCs

All this means:

Particle "hit" time = nClockCycle*25ns - TDCcount*Resolution - (110.0+/-0.5)ns

where Resolutiuon ~ 0.2ns but needs to be calibrated.

Coincidence acceptance

A coincidence in the 2 scintillators always records a coincidence event in the MC data. This will result in a trigger unless the following two vetoes occur:

1) In deadtime following last trigger
2) GM2_ACTIVE signal is low (e.g. straw trigger not high, so not during TDC accumulation)

So if the protons are reasonably spaced out, if the straw TDC active time is 50% then the coincidence/trigger ratio ~ 2.

ADC values

- The beetle header should be 16 ADC samples long, but a known issue is that it may be more. In this case it overwrites the first few strip values (e.g. the extended header overwrites strips rather than shunting them down)

- We should ignore the 5 strips on each side of the layer as they have poor electrical properties (also because of beetle header issue)

Documentation

Documentation is saved in software/src/SiDet/reference directory.

Page 250 of BTL.pdf has ADC header definition (16 words).

Run not as root

Change executable permissions (make copy of executable):

cp /home/nfs/gm2/mtest/daq/gm2-tracker-readout-daq/software/bin/SiDetDAQ_frontend.exe /home/nfs/gm2/mtest/daq/gm2-tracker-readout-daq/software/bin/SiDetDAQ_frontend_root.exe
chown root /home/nfs/gm2/mtest/daq/gm2-tracker-readout-daq/software/bin/SiDetDAQ_frontend_root.exe
chmod ugo+s /home/nfs/gm2/mtest/daq/gm2-tracker-readout-daq/software/bin/SiDetDAQ_frontend_root.exe

Then use start button in Program MIDAS httpd tab as usual for frontends.