12 floats_to_copy=[], ints_to_copy=[],
14 pt_priority_with_delta_r=-1,
15 particle_link_name=None,
19 if source
is not None:
21 "'source' option is deprecated, use 'sources'",
27 "Can't use 'sources' and 'source' at the same time"
34 if source_name
is None:
35 source_name =
'Or'.join(sources)
36 dr_str = f
'deltaRTo{source_name}'
37 deta_str = f
'deltaEtaTo{source_name}'
38 dphi_str = f
'deltaPhiTo{source_name}'
39 dpt_str = f
'deltaPtTo{source_name}'
40 to_suffix = f
'From{source_name}'
41 match_str = f
'matchedTo{source_name}'
42 n_match_str = f
'numberOfMatchesTo{source_name}'
46 ca = ComponentAccumulator()
48 CompFactory.ftag.JetMatcherAlg(
49 f
'{source_name}To{target}CopyAlg{name_suffix}',
52 floatsToCopy={f: to(f)
for f
in floats_to_copy},
53 intsToCopy={i: to(i)
for i
in ints_to_copy},
60 ptPriorityWithDeltaR=pt_priority_with_delta_r,
61 sourceMinimumPt=source_minimum_pt,
62 particleLink=(particle_link_name
or ""),
JetMatchingCfg(flags, target, source=None, sources=[], source_name=None, floats_to_copy=[], ints_to_copy=[], source_minimum_pt=0, pt_priority_with_delta_r=-1, particle_link_name=None, name_suffix='')