Skip to content

L1A interval/period incorrectly applied in some calibration scans

Description

Taking a threshold scan at p5 requires to lower the L1A rate (expected ~50kHz) in order not to break the event building local readout. This is due to the zero-suppression not being effective with all channels enabled and very low thresholds. However, it was noticed that the L1A period actually used is much lower, regardless of the configuration parameter. A quick investigation showed that the l1aInterval argument of the thresholdScan RPC method is defined as an uint8_t, limiting the L1A period to a maximum of 255 BX. The full L1A gap range should be exploitable.

Steps to reproduce

Take any threshold scan with an L1A period higher than 255 BX. Check the value actually written to the TTC generator L1A gap register.

Possible fixes

Correct the type of all l1aInterval/l1aPeriod variables to be uint32_t. It might be interesting to check other related variable types as well (e.g. nTriggers/nEvents).