Skip to content

Rewrite phi-neighbor patching of LArCaliWaves

Walter Lampl requested to merge wlampl/athena:LArWavePatching1 into main

This MR is motivated by the incident on Aug 30th where a inf-value in the calibration database lead to failure when trying to start a run.

The issue was traced back to a known bad channel for which the calibration is obtained by averaging values from neighboring channels. In the case of of Aug 30th, no suitable neighbor was found and the CaliWave remained a flat line at 0.0 That lead to an inf because at a later point in the calibration procedure we divide by the peak of the CaliWave.

This MR is largely a rewrite of the CaliWave patching code. The new code is able to calculate average CaliWaves for the calibration campaign and channels that caused the failure on Aug 30th. It turns out that the code used so far had no adequate protection against pathological input values and therefore dismissed good neighbors by comparing them to a crappy reference.

At the same time: Fix a bug I found in the ntuple writing code

Merge request reports