61def getMETMakerAlg(suffix,jetSelection="Tier0",jetColl=""):
62
63 print ("Generate METMaker and METMakerAlg for METAssoc_"+suffix)
64
65 doPFlow = 'PFlow' in suffix
66 doTruth = suffix.startswith('Truth')
67 if jetColl=="":
68 jetColl = suffix+'Jets'
69 if doTruth:
70 jetColl = suffix.split('_')[1]+'Jets'
71
72 metMaker = getMETMaker(jetCollection=jetColl,
73 name='METMaker_'+suffix,
74 DoPFlow=doPFlow,
75 DoSoftTruth=doTruth,
76 JetSelection=jetSelection)
77
78 muonSel = getMuonSelectionTool()
79
80 elecSelLH = getEleSelLikelihood()
81
82 photonSelIsEM = getPhotonSelIsEM()
83
84 tauSel = getTauSelectionTool()
85
86 makerAlg = CompFactory.getComp("met::METMakerAlg")('METMakerAlg_'+suffix,
87 METMapName='METAssoc_'+suffix,
88 METCoreName='MET_Core_'+suffix,
89 METName='MET_Reference_'+suffix,
90 InputJets=jetColl,
91 Maker=metMaker,
92 MuonSelectionTool=muonSel,
93 ElectronLHSelectionTool=elecSelLH,
94 PhotonIsEMSelectionTool=photonSelIsEM,
95 TauSelectionTool=tauSel,
96 )
97 return makerAlg