S.T. stop and readout of WFD

Ed Kearns (kearns@budoe.bu.edu)
Thu, 23 May 1996 23:17:30 -0400 (EDT)

Ciao a tutti,

So I am finally back from Japan and Chris and I have done preliminary
work for reading out the WFD for S.T. monopole triggers. I will append
at the end of this message a text file with my notes on the mapping.
Although Erik looked into accomplishing this without changing the daq
system, there may be some problems with this, and anyway I think it is
OK to add new code to the USER_PROCEDURE.PAS to treat EQUIP 7 just like
any other trigger.

Before we go further, I have this question:

1) Is EQUIP 7 executed on every S.T. trigger or just the 15 mHz of
interesting SLOW S.T. triggers? If the answer is "every S.T. trigger" we
have a problem that will require more complicated code, or an
alternative approach. If the answer is "only 15 mHz of SLOW triggers"
then the code is essentially done and ready.

Also:

2) Does everybody agree with this readout plan?
(a) On a horizontal trigger, readout B and C plane for the
two modules indicated by the trigger
(b) On a lateral trigger, readout the vertical half-plane (lower or attico)
for the indicated triggers.
I think the main alternative would be to (a') read out B, C and Vertical
planes for a horizontal trigger. Which makes sense based on the acceptance
of the trigger.

So the plan is to compile this into a test system and when Chris Orth
gets to Gran Sasso in early June he will work with whoever can help on
setting this up and IMMEDIATELY checking the data.

Erik... is the TOHM stop of the S.T. readout now back in acq?

Ed

P.S. Here is my working notes on the WFD_PATREG code. You can see the
actual code fragment in the WFDINFO area at http://hep.bu.edu/~macro/wfdinfo
in st-readout.pas (this file is st-readout.txt).

------------------------------------------------------------------------
ETK, CMO 22-MAY-96

This file describes the mapping from Streamer Tube Monopole Trigger to
WFD channel readout. This is accomplished from the EQUIP 7 data of the
Streamer Monopole Supervisor and the WFD_PATREG software pattern
register coded in USER_PROCEDURE.PAS.

Derived from email by Ivan DeMitri, here is the EQUIP 7 definition:

N words (N varies from event to event)
WORD 1: pattern of the horizontal trigger
WORD 2: pattern of the bottom lateral trigger
WORD 3: pattern of the attico lateral
24 words: TDC

The plan is to insert a WFD_PATREG command after WORD 1-3. This command
looks back one word in the data buffer; checks each relevant bit, and
sets the matching bit in the software pattern register. The code is kept
in USER_PROCEDURE.PAS. To help with the bit mapping, we used the
following tables:

**********************************************************************
Horizontal S.T. Trigger:
**********************************************************************

WORD 1: ST horizontal trigger pattern:
- for uVAX 1
bit 6 OR bit 7 -----> 1st unit (modules 1 and 2)
bit 8 OR bit 9 -----> 2nd unit (modules 2 and 3)
bit 10 OR bit 11 -----> 3rd unit (modules 3 and 4)
- for uVAX 2
bit 6 OR bit 7 -----> 1st unit (modules 4 and 5)
bit 8 OR bit 9 -----> 2nd unit (modules 5 and 6)
bit 10 OR bit 11 -----> 3rd unit (modules 6 and 7)
bit 12 OR bit 13 -----> 4th unit (modules 7 and 8)
bit 14 OR bit 15 -----> 5th unit (modules 8 and 9)
- for uVAX 3
bit 6 OR bit 7 -----> 1st unit (modules 9 and 10)
bit 8 OR bit 9 -----> 2nd unit (modules 10 and 11)
bit 10 OR bit 11 -----> 3rd unit (modules 11 and 12)

Here is the software pattern register (WFD_SPR) mapping table for WORD
1. If either of each pair of bits (see above) is set in WORD 1, set the
corresponding bit in WFD_SPR. The horizontal axis is WORD 1 bit number;
the table entry is WFD_SPR bit number. Bits count from 0. "0-----7"
means set all bits 0 through seven; this is equivalent to read out all
of the B and C face in a supermodule.

EQUIPMENT 7 WORD 1 bit number:
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
===============================================================
2/3/6/7 0-----7 SM-1
0-----7 0/1/4/5 SM-2
---------------------------------------------------------------
2/3/6/7 0-----7 0/1/4/5 SM-3
2/3/6/7 0-----7 0/1/4/5 SM-4
---------------------------------------------------------------
2/3/6/7 0-----7 SM-5
0-----7 0/1/4/5 SM-6
---------------------------------------------------------------

**********************************************************************
Lateral S.T. Trigger
**********************************************************************

WORD 2: ST bottom lateral trigger pattern:
bit 0 -----> West wall of the 1st SM of that uVAX
bit 1 -----> East wall of the 1st SM of that uVAX
bit 2 -----> West wall of the 2nd SM of that uVAX
bit 3 -----> East wall of the 2nd SM of that uVAX
bit 4 -----> North/South face

WORD 3: ST attico lateral trigger pattern:
bit 0 -----> West wall of the 1st SM of that uVAX
bit 1 -----> East wall of the 1st SM of that uVAX
bit 2 -----> West wall of the 2nd SM of that uVAX
bit 3 -----> East wall of the 2nd SM of that uVAX

Here is the software pattern register (WFD_SPR) mapping table for WORDs
2 and 3. The code is written assuming that only the indicated bits are
active and the rest are zero (in the range 0-4). In other words: for
WORD 2 of SM-1, I assume bits 02 and 03 are always zero.

EQUIPMENT 7 WORD 2 bit number (only lower bits are significant):
... 07 06 05 04 03 02 01 00
... ===== ===== ===== ===== ===== ===== ===== =====
20/21 10/11 8/9 SM-1
10/11 8/9 SM-2
---------------------------------------------------------------
10/11 8/9 SM-3
10/11 8/9 SM-4
---------------------------------------------------------------
10/11 8/9 SM-5
20/21 10/11 8/9 SM-6
---------------------------------------------------------------

EQUIPMENT 7 WORD 3 bit number (only lower bits are significant):
... 07 06 05 04 03 02 01 00
... ===== ===== ===== ===== ===== ===== ===== =====
14/15 12/13 SM-1
14/15 12/13 SM-2
---------------------------------------------------------------
14/15 12/13 SM-3
14/15 12/13 SM-4
---------------------------------------------------------------
14/15 12/13 SM-5
14/15 12/13 SM-6
---------------------------------------------------------------