DØ Run IIb L1Cal Et(miss) Algorithm
updated: 06-Jun-06
Index
- Inputs to the algorithm in firmware
- The calculation and results
- Examples
Inputs to the Algorithm in the Firmware
Description from Jaro Ban
Inputs to the procedure are:
- Energies summed in eta for each phi (16 bit integers)
- sine and cosine (13 bit integers) for phi 2 to 5
The sine an cosine have range 0-1 multiplied by 1024.
(We can change the number 1024 to something else if needed.)
Example: sine(eta)=0.2 will be represented by 1024*(2/10)=204.8=204
- one common energy threshold (16 bit integer)
User has to define/download sine, cosine and the threshold parameters.
The Calculation and Results
- Exsum() = (e2()-thr)*cos2()+(e3()-thr)*cos3()+
(e4()-thr)*cos4()+(e5()-thr)*cos5()
- Eysum() = (e2()-thr)*sin2()+(e3()-thr)*sin3()+
(e4()-thr)*sin4()+(e5()-thr)*sin5()
- Etsum = (e2()-thr) + (e3()-thr) + (e4()-thr) + (e5()-thr)
The multiply operation is performed by the hardware (integer)
multipliers.
Your results are then: exsum[28:0] eysum[28:0], 29 bit long
and etsum [16:0] is 17 bit long.
Our agreement (Hal and others) was that our results which we
send to GAB will be 12 bit number and if the overflow is detected
the numbers will be all ones(0xFFF). We agreed also on the rounding off
the numbers. We need also normalize the numbers for the maximum energy
deposits. We simply divide the results by 16 at the moment.
Bit usage is summarized in the following table:
| Variable |
Full Sum |
Output Subset |
Used for Roundoff |
| Ex,ySum | [28..0] | [25..14] | [13..2] |
| EtSum | [16..0] | [15..4] | [3..0] |
Details of it are in the procedure multiply.vhd.
Examples
An example of what we are doing at the moment in multiply.vhd is
- Sin2=0.2 -> 204
- Sin3=0.3 -> 307
- Sin4=0.4 -> 409
- Sin5=0.5 -> 512
Let say e2=e3=e4=e5=1000 and thr=0.
Then
- Eysum
= (204*1000 + 307*1000 + 409*1000 + 512*1000)/1024
= (204000 + 307000 + 409000 + 512000) /1024
= (1430000)/1024 = 1396.484375
- Etsum = 1000+1000+1000+1000 = 4000
Then after normalization
- Ey = 1396.484375/16 = 87
- Et = 4000/16 = 250