ATLAS Offline Software
Loading...
Searching...
No Matches
JetMatchingConfig.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
6def JetMatchingCfg(flags, target, source=None,
7 floats_to_copy=[], ints_to_copy=[],
8 source_minimum_pt=0,
9 pt_priority_with_delta_r=-1,
10 particle_link_name=None,
11 name_suffix=''):
12
13 if source is None:
14 source = target
15
16 dr_str = f'deltaRTo{source}'
17 deta_str = f'deltaEtaTo{source}'
18 dphi_str = f'deltaPhiTo{source}'
19 dpt_str = f'deltaPtTo{source}'
20 to_suffix = f'From{source}'
21 match_str = f'matchedTo{source}'
22 def to(f):
23 return f + to_suffix
24
25 ca = ComponentAccumulator()
26 ca.addEventAlgo(
27 CompFactory.ftag.JetMatcherAlg(
28 f'{source}To{target}CopyAlg{name_suffix}',
29 targetJet=target,
30 sourceJets=[source],
31 floatsToCopy={f: to(f) for f in floats_to_copy},
32 intsToCopy={i: to(i) for i in ints_to_copy},
33 dR=dr_str,
34 dEta=deta_str,
35 dPhi=dphi_str,
36 dPt=dpt_str,
37 match=match_str,
38 ptPriorityWithDeltaR=pt_priority_with_delta_r,
39 sourceMinimumPt=source_minimum_pt,
40 particleLink=(particle_link_name or ""),
41 )
42 )
43 return ca
JetMatchingCfg(flags, target, source=None, floats_to_copy=[], ints_to_copy=[], source_minimum_pt=0, pt_priority_with_delta_r=-1, particle_link_name=None, name_suffix='')