Difference between revisions of "Trigger match problems"

From BESIII Ferrara Group Wiki
Jump to: navigation, search
m (Too high rate (extra test-pulses))
m
 
(12 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
== Missing trailer word [temporarily fixed] ==
 
== Missing trailer word [temporarily fixed] ==
  
Sometimes, a packet is missing the trailer word (identifier: MSB = '111'), which is replaced by a word with all zeros (64-bit zeros). This issue is quite rare (1/250 subRuns), but when occurs the affected subRun has approximately half of the packets with this problem.
+
Sometimes, a packet is missing the trailer word (identifier: MSB = '111'), which is replaced by a word with all zeros (64-bit zeros) that is interpreted as a data word (TIGER 0, Channel 0, TAC 0, Tcoarse = 0, Ecoarse = 0, Tfine = 0, Efine = 0). This issue seems to affect all the GEMROCs (but not at the same time) and is quite rare (1/250 subRuns), but when occurs the affected subRun has approximately half of the packets with this problem.
 +
 
 +
Indeed, we discovered that the packets with the missing trailer word are always the ones with the LOCAL L1 COUNT[2:0] > 3. This means that packets from 0 to 3 are OK and then packets from 4 to 7 are missing the trailer word and this is repeated for all the data-stream coming from that GEMROC for that acquisition subRun.
 +
On the contrary, the LOCAL L1 COUNT in the header word is always OK and is used to match packets of different GEMROCs.
  
 
An example, with the decoded text version, is reported here:
 
An example, with the decoded text version, is reported here:
Line 17: Line 20:
  
 
Instead of using the trailer word to flag the end of each packet we now use the UDP word, which seems to be always correctly present.
 
Instead of using the trailer word to flag the end of each packet we now use the UDP word, which seems to be always correctly present.
 +
  
 
== Packets mismatch [temporarily fixed] ==
 
== Packets mismatch [temporarily fixed] ==
  
TIGER 4-5-6-7 (3rd and 4th FEB for each GEMROC) suffers from packets mismatch: at certain point during acquisition data coming from these TIGER is sent in the next packet w.r.t. data coming from TIGER 0-1-2-3; this offset is present until the acquisition is reset and a new run or subrun is started.
+
TIGER 4-5-6-7 (3rd and 4th FEB for each GEMROC) suffer from packets mismatch: at certain point during acquisition data coming from these TIGER is sent in the next packet w.r.t. data coming from TIGER 0-1-2-3; this offset is present until the acquisition is reset and a new run or subrun is started.
 
A temporary fix has been implemented in "''Decode.py''" to address this mismatch and restore the correct packets content.
 
A temporary fix has been implemented in "''Decode.py''" to address this mismatch and restore the correct packets content.
  
 
==== Patch description ====
 
==== Patch description ====
  
The program checks if the difference of the hit tcoarse with respect to the L1 timestamp is within the interval [1300-1570] or lower than -64240 or larger than -63960 (to take into account counters roll-over) clock hits. If the hit is within the interval, it is accepted. If not, the L1 count is set to previous value and the difference with respect to the precedent L1 timestamp. Then the check is performed again.
+
The program checks if the difference of the hit tcoarse with respect to the L1 timestamp is within the interval [1300-1570] or lower than -64240 or larger than -63960 (to take into account counters roll-over) clock cycles. If the hit is within the interval, it is accepted. If not, the L1 count is set to previous value and the difference with respect to the precedent L1 timestamp. Then the check is performed again.
  
 
Moreover, a correction for the roll-over is applied, by adding 2^16 to the difference previously calculated if it is negative.
 
Moreover, a correction for the roll-over is applied, by adding 2^16 to the difference previously calculated if it is negative.
  
Several runs have been checked after the application of this patch and data seems to be always stored with the correct time reference (l1ts_min_tcoarse).
+
Several runs have been checked after the application of this patch and data seems to be always stored with the correct time reference (''l1ts_min_tcoarse'').
 
 
== Too high rate from digital TP ("extra" test-pulses) ==
 
 
 
During the tests for the measurement of the Trigger-Matched rate we sent digital TPs to channel 62 of all TIGERs. The number of TP was set to one per frameword (i.e. 2 TP per Tcoarse cycle, 2^16 TIGER clocks), all other channels were disabled (trigger_mode=3).
 
Only test-pulses detected by all 8 TIGERs of a GEMROC were considered in order to avoid spurious data generated when the data rate sent from the TIGERS to the GEMROC is very low as in this case.
 
 
 
Plotting the Tcoarse distribution we observe 2 peaks corresponding to the 2 TPs per Tcoarse cycle plus other small peaks. If we take only the entries from the 2 peaks the measured rate is compatible with the expected one. But if we consider all registered TPs, also the ones from the other peaks, this provides a measured rate higher than expected.
 
 
 
==== Possible explanations (to be investigated) ====
 
  
* In addition to the TPs generated by the GEMROC at each frameword, we also detected the TPs generated at each check signal: the GEMROC can be configured to send a TP to the TIGER each time a check signal arrives. It is very likely that during these tests this feature was enable and thus we were generating TPs also for each cosmic detected by the scintillator bars coincidence (i.e. the usual trigger signal).
 
  
 
== Hits with all zeros ==
 
== Hits with all zeros ==

Latest revision as of 03:02, 26 January 2020

Missing trailer word [temporarily fixed][edit | edit source]

Sometimes, a packet is missing the trailer word (identifier: MSB = '111'), which is replaced by a word with all zeros (64-bit zeros) that is interpreted as a data word (TIGER 0, Channel 0, TAC 0, Tcoarse = 0, Ecoarse = 0, Tfine = 0, Efine = 0). This issue seems to affect all the GEMROCs (but not at the same time) and is quite rare (1/250 subRuns), but when occurs the affected subRun has approximately half of the packets with this problem.

Indeed, we discovered that the packets with the missing trailer word are always the ones with the LOCAL L1 COUNT[2:0] > 3. This means that packets from 0 to 3 are OK and then packets from 4 to 7 are missing the trailer word and this is repeated for all the data-stream coming from that GEMROC for that acquisition subRun.

On the contrary, the LOCAL L1 COUNT in the header word is always OK and is used to match packets of different GEMROCs.

An example, with the decoded text version, is reported here:

File:SubRUN 449 GEMROC 6 TM.datout.txt

In the old version of "Decode.py" the trailer word was used to flag the end of the packet and then fill the tree with the hits registered in that packet. This implies that the hits of a packet without the trailer word were stored together with the hits of a subsequent packet with the correct the trailer word. This resulted in, on one hand, one trigger (related to the packet without the trailer word) having no hits and, on the other hand, the next trigger (related to the packet with the proper trailer word) having both its correct hits but also the hits of the previous packet.

A temporary fix has been implemented in "Decode.py" to address this mismatch and restore the correct hits-trigger assignment.

Patch description[edit | edit source]

Instead of using the trailer word to flag the end of each packet we now use the UDP word, which seems to be always correctly present.


Packets mismatch [temporarily fixed][edit | edit source]

TIGER 4-5-6-7 (3rd and 4th FEB for each GEMROC) suffer from packets mismatch: at certain point during acquisition data coming from these TIGER is sent in the next packet w.r.t. data coming from TIGER 0-1-2-3; this offset is present until the acquisition is reset and a new run or subrun is started. A temporary fix has been implemented in "Decode.py" to address this mismatch and restore the correct packets content.

Patch description[edit | edit source]

The program checks if the difference of the hit tcoarse with respect to the L1 timestamp is within the interval [1300-1570] or lower than -64240 or larger than -63960 (to take into account counters roll-over) clock cycles. If the hit is within the interval, it is accepted. If not, the L1 count is set to previous value and the difference with respect to the precedent L1 timestamp. Then the check is performed again.

Moreover, a correction for the roll-over is applied, by adding 2^16 to the difference previously calculated if it is negative.

Several runs have been checked after the application of this patch and data seems to be always stored with the correct time reference (l1ts_min_tcoarse).


Hits with all zeros[edit | edit source]

These data are discarded because they all have delta_coarse = 0.

1100010000000000000000000000000100010110100000011111110110110000  HEADER :  STATUS BIT[2:0]: 1: LOCAL L1 COUNT: 00000056 HitCount: 81 LOCAL L1 TIMESTAMP: FDB0; Diff w.r.t. previous L1_TS: 396.543750 us
0000111111110001111110000010000100000011101100100101100101011000  DATA   : TIGER: 1 L1_TS - TIGERCOARSE_TS: 1423 LAST TIGER FRAME NUM[2:0]: 7 TIGER DATA: ChID [base10]: 60 tacID: 1 Tcoarse: F821 Ecoarse: 03B Tfine: 0150 Efine: 344 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
0000000000000000000000000000000000000000000000000000000000000000  DATA   : TIGER: 0 L1_TS - TIGERCOARSE_TS: 64944 LAST TIGER FRAME NUM[2:0]: 0 TIGER DATA: ChID [base10]: 0 tacID: 0 Tcoarse: 0000 Ecoarse: 000 Tfine: 0000 Efine: 0 
1110000011010011000110000000110000111101000000000000000000000000  TRAILER: LOCAL L1  FRAMENUM [23:0]: 0698C0: GEMROC_ID: 0C TIGER_ID: 7 LOCAL L1 COUNT[2:0]: 5 LAST COUNT WORD FROM TIGER:CH_ID[5:0]: 00 LAST COUNT WORD FROM TIGER: DATA[17:0]: 00000 
0100110011000000000000000000000010100000000000000000000001010110  UDP_SEQNO: GEMROC_ID: 0C UDP_SEQNO_U48: 000000000056  STATUS BIT[5:3]:6