tauRec+tauRecTools+xAODTau: reset tau secondary vertex link for re-reconstruction from AOD
Hello,
The primary goal of this MR is to reset the element link between the tau and its secondary vertex (tau decay vertex) at the start of the execute
method, in the TauVertexVariables tool that creates this link.
This is necessary for the muon-subtracted tau reconstruction that we run in AODtoDAOD, where we start from existing taus, subtract any muon off the tau, and rerun most of the tau reconstruction.
If we don't reset the link, it can point to a wrong vertex in a wrong container (when we have less than 2 tau tracks after muon subtraction, or no tau vertex available, we don't create the link, so we inherit it from the original tau before muon subtraction).
The change to TauJet_v3 is to be more user-friendly: we check that the element link from the tau to its secondary vertex is valid before dereferencing it. Then we can simplify e.g. TauThinningAlg, we just check that the corresponding pointer is not nullptr.
This MR will be needed by another urgent MR underway (which applies thinning to muon-subtracted taus, which crashes when the link is not properly reset), so I'm adding the 'urgent' label. I've checked that the RAWtoALL reconstruction is unchanged in 500 data events.
Thanks, Bertrand