ATLAS Offline Software
Loading...
Searching...
No Matches
CopyJetParentInfoConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6
7_default_jets = 'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets'
8_default_parents = 'AntiKt10UFOCSSKJets'
9
10
11def CopyJetParentInfoCfg(flags, jets=None, parents=None):
12 if jets is None:
13 jets = _default_jets
14 parents = _default_parents
15 elif jets != _default_jets and parents is None:
16 raise ValueError("You must specify the jet parent collection")
17
18 copied_ints = ['jetRank']
19
20 ca = ComponentAccumulator()
21 ca.addEventAlgo(
22 CompFactory.ftag.JetLinkMatcherAlg(
23 f'{parents}To{jets}LinkCopyAlg',
24 targetJet=jets,
25 sourceJets=[parents],
26 linkName='Parent',
27 intsToCopy={x:x for x in copied_ints},
28 )
29 )
30 return ca
CopyJetParentInfoCfg(flags, jets=None, parents=None)