Skip to content

2nd lumi line (MR1166) and lumi shifts and scales (MR1187)

Includes !1166 (closed) and !1187 (closed) (descriptions copied below) - as these two MRs have fairly significant merge conflicts and are both ready, I've made a combined MR encompassing both.


!1166 (closed):

Adds a 1 kHz lumi line (in addition to the 30 kHz line), which contains a larger set of luminosity counters.

The second line requires lumi events with ODIN orbitNumber%30==1 - this ensures the larger LumiSummary banks are non-overlapping with the FSR events that get copied to the physics streams (which have orbitNumber%30==0).

The changes are structured to require as few algorithms as possible to be aware of the additional lumi line. CalcLumiSumSize is the only algorithm that explicitly interacts with the new line. This sets the offset to the summary for each event in the output buffer appropriately. The various sub-detector specific LumiCounters algorithms have been updated only to remove their dependence on a fixed-sized lumi summary. MakeLumiSummary has been updated to check that a counter's offset is within range for the current lumi summary before filling it.

The schema for the 1 kHz luminosity summary is an extended version of the 30 kHz version such that the offsets to counters present in the basic summary are not changed in the extended summary.

Currently the extended section of the lumi summary contains Plume and SciFi counters. The different-length banks are produced as expected in offline tests. Decoded values are internally consistent - i.e. plume average ADC is equal to the average of the individual ADC counters in the extended summary and 30kHz SciFi counters are equal to the relevant sums of extended counters.

To maintain compatibility with sequences that only use a single lumi line, the index of the 1 kHz line defaults to be equal to that of the 30 kHz line and, in this case, the extra counters are not added to the summary.


!1187 (closed):

Adds optional shift and scale keys to the definition of a counter in the JSON lumi schema. These are applied to the quantity (counter_value = shift + scale*quantity) before it is stored in the counter. If the keys are not present, shift and scale default to 0.f and 1.f, respectively.

To avoid unnecessary loss of precision on large unsigned and int counters (due to casting to float and back), fillLumiInfo is overloaded for unsigned, int and float input types and shift == 0.f && scale == 1.f is treated as a special case.

An additional LHCb MR will be needed to update the decoder to recognise and use the new keys but the old decoder will not break with these changes (it will continue to behave as before).

This MR also includes updates to the shifts and scale factors of the ECal and PV counters, which should stop these counters overflowing.

Addresses #412 (closed)


Edited by Daniel Charles Craik

Merge request reports