ATLAS Offline Software
ORMETMakerConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 from __future__ import print_function
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
7 def getMETMakerAlg(suffix,jetSelection="Tier0",jetColl="",doRetrieveORconstit=False, retainMuonConstit=False, doORMet=False, muonID=1, electronID="Medium", photonID="Tight"):
8 
9  print ("Generate METMaker and METMakerAlg for METAssoc_"+suffix)
10 
11  doPFlow = 'PFlow' in suffix
12  doTruth = suffix.startswith('Truth')
13  metMaker = CompFactory.getComp("met::METMaker")('METMaker_'+suffix,
14  DoPFlow=doPFlow,
15  DoSoftTruth=doTruth,
16  JetSelection=jetSelection,
17  )
18 
19  muonSel = CompFactory.getComp("CP::MuonSelectionTool")("MuonSelectionTool_METMakerAlg",
20  MuQuality=muonID, # Medium
21  TurnOffMomCorr= True,
22  MaxEta=2.4)
23 
24  elecSelLH = CompFactory.AsgElectronLikelihoodTool("EleSelLikelihood_METMakerAlg",
25  WorkingPoint=electronID+"LHElectron")
26 
27  photonSelIsEM = CompFactory.AsgPhotonIsEMSelector("PhotonSelIsEM_METMakerAlg",
28  WorkingPoint=photonID+"Photon")
29 
30  tauSel = CompFactory.getComp("TauAnalysisTools::TauSelectionTool")("TauSelectionTool_METMakerAlg")
31 
32  if jetColl=="":
33  jetColl = suffix+'Jets'
34  if doTruth:
35  jetColl = suffix.split('_')[1]+'Jets'
36  makerAlg = CompFactory.getComp("met::ORMETMakerAlg")('ORMETMakerAlg_'+suffix,
37  METMapName='METAssoc_AntiKt4EMPFlow',
38  ORMETMapName='METAssoc_'+suffix,
39  METCoreName='MET_Core_'+suffix,
40  METName='MET_Reference_'+suffix,
41  InputJets=jetColl,
42  Maker=metMaker,
43  MuonSelectionTool=muonSel,
44  ElectronLHSelectionTool=elecSelLH,
45  PhotonIsEMSelectionTool=photonSelIsEM,
46  TauSelectionTool=tauSel,
47  DoRetrieveORconstit=doRetrieveORconstit,
48  RetainMuonConstit=retainMuonConstit,
49  DoORMet=doORMet,
50  )
51  return makerAlg
52 
ORMETMakerConfig.getMETMakerAlg
def getMETMakerAlg(suffix, jetSelection="Tier0", jetColl="", doRetrieveORconstit=False, retainMuonConstit=False, doORMet=False, muonID=1, electronID="Medium", photonID="Tight")
Definition: ORMETMakerConfig.py:7