18def getJetResponseTool(jetdef, modspec=''):
19
20 from JetRecConfig.JetDefinition import buildJetAlgName
21
22 label = modspec
23 prefix, suffix = {
24 'R4TruthLabel': ('',''),
25 'R4TruthDressedWZLabel': ('','DressedWZ'),
26 'R4InTimeTruthLabel': ('InTime','')
27 }[modspec]
28 truthJetAlg = prefix+buildJetAlgName(jetdef.algorithm, jetdef.radius)+'Truth'+suffix+'Jets'
29
30 jetPtAssociation = CompFactory.JetResponseTool(
31 'jetResponse',
32 JetMatchedTruthJetName = f'{label}_MatchedTruthJet',
33 TruthJetContainer = truthJetAlg,
34 )
35
36 return jetPtAssociation