AM algorithm
PATTERN: one SuperStrip for each Layer, stored from VME
AM looks at hits as they are read out, matches are recorded by each pattern: 1 MATCH BIT per Layer
After EndEvent, matches are counted in all patterns in parallel. There is one counter for each pattern, acted upon by 6 Opcodes sent in series, one for each layer (1st acts on layer 5, 2nd on layer 4 . . .)
- 2 options: COUNT increments counter if layer had a match SHIFT increments counter anyhow
- When counter reaches 6, pattern is queued for output
- Counters can be cleared and a new series of Count/Shift performed.
- Output of pattern can be done at any time, even in between Count/Shift (but not in parallel)