Skip to content

Harden DL1 (slightly)

Dan Guest requested to merge dguest/athena:harden-dl2 into 21.2

I tried to add some defensive changes to DL2. In the end I could only implement one without changing derivation content though. Specifically:

  • We weren't checking the return code from some track accessors: if these inputs were missing in a derivation we previously would have ignored the tracks (or accepted them, I think the behavior would have been undefined).

    Note: this is the only change here that we could actually make without changing the output of the derivations.

This should be merged after !26648 (merged), I forked from that MR since it touches some similar lines.

Aborted changes

  • We always read the auxdata from all input variables, regardless of whether they are supposed to be replaced with defaults. Before we only accessed variables when we weren't using defaults. This change is in response to an issue we found few months back where DL2 would only fail on events with muons, which turned out to be caused by incorrect input names. We were feeding default values in to all the non-muon jets and only accessing the incorrect variables when muons existed.

    Note: this doesn't work thanks to ATLASRECTS-5027. When JetFitter_isDefaults == true we are often missing other jetfitter outputs. The missing branches from JetFitter cause a lot more exceptions than we previously had.

  • The "(minimum|average|maximum)TrackRelativeEta" branch didn't have a corresponding "isDefaults" branch despite relying on JetFitter finding a secondary vertex to be well defined. We never noticed this because when JetFitter failed to find a vertex the branch was set to NAN, which was treated the same way as a default value. Just in case someone changes this branch to not be NAN when JetFitter is returning defaults, we should make sure we explicitly check "JetFitter_isDefaults".

    Note: this doesn't work because of ATLASRECTS-5143: the NAN values that get spit out of the *TrackRelativeEta branches turn out to be much less common than JetFitter_isDefaults == true. At some point it might be good to work out the logic that causes a NAN in these variables.

Edited by Dan Guest

Merge request reports