46 trkisotool=None,caloisotool=None,
51 doModClus = (modConstKey!=
"" and not doPFlow)
53 modLCClus = modClusColls[
'LC{0}Clusters'.
format(modConstKey)]
54 modEMClus = modClusColls[
'EM{0}Clusters'.
format(modConstKey)]
57 if config.objType ==
'Ele':
58 tool = CompFactory.getComp(
"met::METElectronAssociator")(
'MET_ElectronAssociator_'+suffix,TCMatchMethod=1)
59 if config.objType ==
'LRTEle':
60 tool = CompFactory.getComp(
"met::METElectronAssociator")(
'MET_LRTElectronAssociator_'+suffix,TCMatchMethod=1)
61 if config.objType ==
'Gamma':
62 tool = CompFactory.getComp(
"met::METPhotonAssociator")(
'MET_PhotonAssociator_'+suffix,TCMatchMethod=1)
63 if config.objType ==
'Tau':
64 tool = CompFactory.getComp(
"met::METTauAssociator")(
'MET_TauAssociator_'+suffix)
65 if config.objType ==
'LCJet':
66 tool = CompFactory.getComp(
"met::METJetAssocTool")(
'MET_LCJetAssocTool_'+suffix)
67 if config.objType ==
'EMJet':
68 tool = CompFactory.getComp(
"met::METJetAssocTool")(
'MET_EMJetAssocTool_'+suffix)
69 if config.objType ==
'PFlowJet':
70 tool = CompFactory.getComp(
"met::METJetAssocTool")(
'MET_PFlowJetAssocTool_'+suffix)
71 if config.objType ==
'CustomJet':
72 tool = CompFactory.getComp(
"met::METJetAssocTool")(
'MET_CustomJetAssocTool_'+suffix)
73 if config.objType ==
'Muon':
74 tool = CompFactory.getComp(
"met::METMuonAssociator")(
'MET_MuonAssociator_'+suffix)
75 if config.objType ==
'MuonLRT':
76 tool = CompFactory.getComp(
"met::METMuonAssociator")(
'MET_MuonLRTAssociator_'+suffix)
77 if config.objType ==
'Soft':
78 tool = CompFactory.getComp(
"met::METSoftAssociator")(
'MET_SoftAssociator_'+suffix)
79 tool.DecorateSoftConst =
True
81 tool.LCModClusterKey = modLCClus
82 tool.EMModClusterKey = modEMClus
83 if config.objType ==
'Truth':
84 tool = CompFactory.getComp(
"met::METTruthAssociator")(
'MET_TruthAssociator_'+suffix)
85 tool.RecoJetKey = config.inputKey
88 tool.FlowElementCollection = modConstKey
if modConstKey!=
"" else defaultInputKey[
"PFlowObj"]
90 tool.UseModifiedClus = doModClus
91 tool.UseFELinks =
False if config.objType ==
'MuonLRT' or config.objType ==
'LRTEle' else useFELinks
93 if config.inputKey ==
'' and defaultInputKey[config.objType] !=
'':
94 tool.InputCollection = defaultInputKey[config.objType]
95 config.inputKey = tool.InputCollection
96 elif hasattr(tool,
'InputCollection'):
97 tool.InputCollection = config.inputKey
99 tool.ClusColl = modLCClus
100 if 'EMTopo' in suffix: tool.ClusColl = modEMClus
101 tool.TrkColl = defaultInputKey[
'Tracks']
102 tool.UseTracks = configFlags.MET.UseTracks
103 tool.TrackSelectorTool = trkseltool
104 tool.TrackIsolationTool = trkisotool
105 tool.CaloIsolationTool = caloisotool