ATLAS Offline Software
Loading...
Searching...
No Matches
TruthTauDecoratorConfig Namespace Reference

Functions

 TruthTauDecoratorCfg (flags, target_jets, ghost_tau_assoc_name='GhostTausFinal', truth_taus='TruthTaus', name_suffix='')

Function Documentation

◆ TruthTauDecoratorCfg()

TruthTauDecoratorCfg ( flags,
target_jets,
ghost_tau_assoc_name = 'GhostTausFinal',
truth_taus = 'TruthTaus',
name_suffix = '' )
Decorate jets with their leading/subleading truth-tau kinematics.

Orders the ghost-associated taus by pT and writes, per jet:

- total (neutrino-inclusive): ``truthtau_{lead,sublead}_{pt,deta,dphi,m}``
- visible:                    the same with a ``_vis`` suffix
- prongness:                  ``truthtau_{lead,sublead}_numCharged``
- charge:                     ``truthtau_{lead,sublead}_charge``
- decay mode:                 ``truthtau_{lead,sublead}_isHadronic``
- multiplicity:               ``nGhostTaus``

The visible quantities come from the matched ``truth_taus`` entry, found via
its ``originalTruthParticle`` back-link. Angles are the tau relative to the
jet axis (``deta = tau.eta - jet.eta``); pt/m are absolute. Note the ghost
association holds all final-state taus, so ``isHadronic`` separates hadronic
from leptonic decays. With no tau, pt/m are 0, deta/dphi NaN, numCharged and
isHadronic -1 and charge 0; gate on ``nGhostTaus``.

Fails outright if the ghost-tau association is missing from the jets.

Parameters
----------
target_jets : str
    Jet collection to decorate.
ghost_tau_assoc_name : str
    Ghost tau association on the jets.
truth_taus : str
    Container providing the visible-tau 4-momenta and numCharged.

Definition at line 7 of file TruthTauDecoratorConfig.py.

11 name_suffix=''):
12 """Decorate jets with their leading/subleading truth-tau kinematics.
13
14 Orders the ghost-associated taus by pT and writes, per jet:
15
16 - total (neutrino-inclusive): ``truthtau_{lead,sublead}_{pt,deta,dphi,m}``
17 - visible: the same with a ``_vis`` suffix
18 - prongness: ``truthtau_{lead,sublead}_numCharged``
19 - charge: ``truthtau_{lead,sublead}_charge``
20 - decay mode: ``truthtau_{lead,sublead}_isHadronic``
21 - multiplicity: ``nGhostTaus``
22
23 The visible quantities come from the matched ``truth_taus`` entry, found via
24 its ``originalTruthParticle`` back-link. Angles are the tau relative to the
25 jet axis (``deta = tau.eta - jet.eta``); pt/m are absolute. Note the ghost
26 association holds all final-state taus, so ``isHadronic`` separates hadronic
27 from leptonic decays. With no tau, pt/m are 0, deta/dphi NaN, numCharged and
28 isHadronic -1 and charge 0; gate on ``nGhostTaus``.
29
30 Fails outright if the ghost-tau association is missing from the jets.
31
32 Parameters
33 ----------
34 target_jets : str
35 Jet collection to decorate.
36 ghost_tau_assoc_name : str
37 Ghost tau association on the jets.
38 truth_taus : str
39 Container providing the visible-tau 4-momenta and numCharged.
40 """
41 ca = ComponentAccumulator()
42 ca.addEventAlgo(
43 CompFactory.ftag.TruthTauDecoratorAlg(
44 f'{target_jets}TruthTauDecoratorAlg{name_suffix}',
45 jets=target_jets,
46 ghostTauAssocName=ghost_tau_assoc_name,
47 truthTaus=truth_taus,
48 )
49 )
50 return ca