A Monitoring Algorithm for the TABs
updated: 10-Mar-03
Overview & Goals
-
Online monitoring information is collected only for events
associated with an L1 Accept. The main goal of the L1Cal online
monitoring scheme is to
provide some level of access to L1Cal data taken on those beam
crossings that do not come from L1 triggers.
To do this we require some mechanism to store a "history" of data
taken on bunch crossings before the one corresponding to the L1
Accept.
-
Two pieces of information are actually monitored for each Trigger
Tower.
- <Et> calculated over n BC's
- rms(Et) calculated over n BC's
-
In the Run IIa system this is accomplished by storing the EM and
HD Et's for 8 BC's preceding the current one and transmitting all
this information to the TFW on a CollectStatus request.
-
In Run IIb it may be more efficient to calculate the mean and rms
(or Sum(Et) and Sum(Et2)
over an arbitrary number of BC's in the TABs and then transmit
only these numbers to the TFW.
Algorithm
Running Sum(Et) Calculation
-
Parallelize serial input Et from ADFs ==> et_in[7..0]
-
Delay et_in to keep in step with Et2 calculation
-
et_in to n-deep delay register
-
Subtract oldest Et from Sum(Et) register:
sum_reg[31..0] - et_in_delay_n[7..0] ==> sum_sub[31..0]
-
Update Sum(Et) register
sum_sub[31..0] - et_in_delay_2[7..0] ==> sum_reg[31..0]
Running Sum(Et2) Calculation
-
Parallelize serial input Et from ADFs ==> et_in[7..0]
-
Multiply:
et_in[7..0] x et_in[7..0] ==> et2_in[15..0]
-
et2_in to n-deep delay register
-
Subtract oldest Et2 from Sum(Et2) register:
sum2_reg[31..0] - et2_in_delay_n[7..0] ==> sum2_sub[31..0]
-
Update Sum(Et2) register
sum2_sub[31..0] - et2_in_delay_2[7..0] ==> sum2_reg[31..0]
Running Average & RMS Calculation (if necessary)
-
Note: this assumes n = 2x
-
Average: Sum(Et) / n:
ave = sum_reg[31..x]
output ave[15..0]
-
Average2: [Sum(Et)/n]2
ave2[31..0] = sum_reg[15+x..x] x sum_reg[15+x..x]
-
RMS: Sum(Et2)/n - <E>2
rms = sum2_reg[31..x] - ave2[31..0]
output rms[15..0]
Notes
-
Types of Monitoring Requests
-
Synchronous with L1 Accept (online monitoring):
This requires that the running sums be synchronized in a
similar way to L2/L3 readout. When an L1 Accept for event
i arrives at the
L1Cal the running sums registers should contain information
for:
BCi, BCi-1, BCi-2, ..., BCi-n
-
VME-initiated collect monitoring requests:
These can come at any time.
-
Reading Out Running Sums Registers
Delay registers should be cleared after information is transmitted
to readout buffers.
-
Truncation (for n = 8 BC's)
-
<Et> = 8 ADC counts; RMS = 1-2 counts
==> Sum(Et) ~ 64
==> Sum(Et2) ~ 512
-
Should be safe in truncating numbers to 16-bits for output