Configure shifts and scale factors of lumi counters in the JSON schema
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)