Skip to content

MuonTruthAlgs: Fix decoration overwrite.

MuonTruthAssociationAlg was overwriting the truth decorations on STACO track particles because they were apparently sometimes missing (see ATLASRECTS-6454). However, these decorations are normally written by TrackParticleTruthAlg (and set to dummy values). In TrackParticleTruthAlg, they are set by a WriteDecorHandle, which means that they should have been locked. However, there was a bug which meant that one might not actually get an error modifying a locked decoration (see ATEAM-909). We want to try to fix that bug, so this needs to be cleaned up.

Change MuonTruthAssociationAlg so that the decorations are written only if they don't already exist. That resolves the crash observed when the bug is fixed.

However, TrackParticleTruthAlg was always filling the STACO track particles with dummies (0/0). MuonTruthAssociationAlg was copying those variables from the muon instead --- and that was sometimes filled in. So fixing this in this way can change the output.

There is however no loss of information, so i'm hoping this is not really a problem. Other solutions would seem to be rather more complicated.

Merge request reports