ATLAS Offline Software
Loading...
Searching...
No Matches
SubjetBuilderConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6
8 target_jets,
9 output_container=None,
10 ghost_association='GhostTruth',
11 radius=0.2,
12 pt_min=5000,
13 link_name=None,
14 count_name=None,
15 name_suffix=''):
16 """Recluster ghost-associated constituents of a jet into small-R subjets.
17
18 Subjets above ``pt_min`` are written to their own container and linked back
19 from the parent jet.
20
21 Fails outright if the ghost association is missing from the jets.
22
23 Parameters
24 ----------
25 target_jets : str
26 Jet collection whose ghost constituents are reclustered.
27 output_container : str, optional
28 Output subjet container. Defaults to
29 ``<target_jets><ghost_association>Subjets``.
30 ghost_association : str
31 Ghost-associated constituent links read off ``target_jets``.
32 radius : float
33 Anti-kt clustering radius.
34 pt_min : float
35 Minimum subjet pT in MeV.
36 link_name, count_name : str, optional
37 Decorations written on ``target_jets``. Bare names, not prefixed.
38 """
39 if output_container is None:
40 output_container = f'{target_jets}{ghost_association}Subjets'
41 if link_name is None:
42 link_name = f'{output_container}Links'
43 if count_name is None:
44 count_name = f'{output_container}Count'
45
46 ca = ComponentAccumulator()
47 ca.addEventAlgo(
48 CompFactory.ftag.SubjetBuilderAlg(
49 f'{output_container}BuilderAlg{name_suffix}',
50 targetJets=target_jets,
51 outputContainer=output_container,
52 linkName=link_name,
53 countName=count_name,
54 ghostAssociation=ghost_association,
55 radius=radius,
56 ptMin=pt_min,
57 )
58 )
59 return ca
SubjetBuilderCfg(flags, target_jets, output_container=None, ghost_association='GhostTruth', radius=0.2, pt_min=5000, link_name=None, count_name=None, name_suffix='')