Skip to content

tauRecTools: improve element link handling and fix charged PFO usage in substructure reconstruction

Hello,

Adding the 'urgent' flag as we'd need to have this merged for Round2 MC pre-production... Thanks!

This MR implements @akraszna 's suggestion to improve the handling of element links in the tau substructure reconstruction code (ATLASRECTS-6278). The detailed explanation can be found here . The links are only used at reconstruction time, to associate various PFO types and run the substructure reconstruction. Probably, nobody ever checked whether the links were valid after they are written to AODs (and we don't write out charged PFOs anymore, which does not help), to be done soon. This part of the MR does not change the reconstruction output.

The MR also fixes which charged PFOs (i.e. tau tracks) are used in the tau substructure reconstruction and shower subtraction. When we reconstruct a tau, we push its tracks in a charged PFO container, so the container is growing as we process more taus. And currently, in the shower subtraction procedure, for a given tau, we consider all the PFOs from the charged PFO container, which includes tracks from previous taus, instead of using only tracks of the current tau. It introduces a dependency on taus reconstructed upstream in the event, but this is not a bug in itself, a good track from a previous tau is a good track, and it would make sense to consider it when subtracting charged PFOs from neutral PFOs. However, rightfully using a track from another tau seems very rare (I saw 1 case in 2000 ttbar events). So I am replacing the loop over all charged PFOs in the container with a loop over the charged PFOs associated with the current tau. For completeness: with this change, we fix a very subtle bug. dR < dRmin should have been dR <= dRmin, otherwise, in case a same track is shared by tau1 and tau2, we will create chargedPFO1 when processing tau1, then chargedPFO2 when processing tau2, and in the loop over charged PFOs, we would select chargedPFO1 for tau2, as it comes first in the container, which causes some mess downstream...

Cheers, Bertrand

Merge request reports