sweep changes from 21.3 (MR22480) into master by hand
This fixes the failed sweep request from 21.3 to master of MR 22480. I have updated the code in master by hand and check it compiles. The fast digitization is still not running in master, this is not fixed by the merge request. The main changes in the code are a revised tuning for the TRT digitization and the initialization of numerical constants in a dedicated method.