ATLAS Offline Software
MissingEtDQAConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 '''@file MissingEtDAQConfig.py
6 @author T. Strebler
7 @date 2022-06-16
8 @brief Main CA-based python configuration for MissingEtDQA
9 '''
10 
11 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12 from AthenaConfiguration.ComponentFactory import CompFactory
13 
14 def PhysValMETCfg(flags, **kwargs):
15  acc = ComponentAccumulator()
16 
17  kwargs.setdefault("EnableLumi", False)
18  kwargs.setdefault("DetailLevel", 10)
19  kwargs.setdefault("DoTruth", flags.Input.isMC)
20 
21  kwargs.setdefault("JVTToolEMTopo", CompFactory.JetVertexTaggerTool(name="JVTToolEMTopo",
22  JetContainer="AntiKt4EMTopoJets") )
23  kwargs.setdefault("JVTToolEMPFlow", CompFactory.JetVertexTaggerTool(name="JVTToolPFlow",
24  JetContainer="AntiKt4EMPFlowJets") )
25 
26  from METUtilities.METMakerConfig import getMETMaker
27  # for EMTopo jets no NNJvt is calculated so we need to fall back to Jvt (re-calculated in MissingEtDQA::PhysValMET as "NewJvt")
28  kwargs.setdefault("METMakerTopo", getMETMaker(name="METMaker_AntiKt4Topo",
29  JetSelection="Loose",
30  DoPFlow=False) )
31  kwargs.setdefault("METMakerPFlow", getMETMaker(name="METMaker_AntiKt4PFlow",
32  JetSelection="Loose",
33  DoPFlow=True) )
34 
35  from METUtilities.METMakerConfig import getMuonSelectionTool, getEleSelLikelihood, getPhotonSelIsEM, getTauSelectionTool
36  kwargs.setdefault("MuonSelectionTool", getMuonSelectionTool())
37  kwargs.setdefault("ElectronLHSelectionTool", getEleSelLikelihood())
38  kwargs.setdefault("PhotonIsEMSelectionTool", getPhotonSelIsEM())
39  kwargs.setdefault("TauSelectionTool", getTauSelectionTool())
40 
41  from AthenaConfiguration.AutoConfigFlags import GetFileMD
42  metadata = GetFileMD(flags.Input.Files)
43  isDAOD_PHYSVAL=False
44  for class_name, name in metadata['metadata_items'].items():
45  if name == 'EventStreamInfo':
46  if "DAOD_PHYSVAL" in class_name :
47  print ("Running on DAOD_PHYSVAL - will not add TTVA decorations.")
48  isDAOD_PHYSVAL=True
49  break
50  kwargs.setdefault("InputIsDAOD", isDAOD_PHYSVAL)
51 
52  kwargs.setdefault("DoMETRefPlots", "xAOD::MissingETContainer#MET_Reference_AntiKt4EMTopo" in flags.Input.TypedCollections)
53 
54  tool = CompFactory.MissingEtDQA.PhysValMET(**kwargs)
55  acc.setPrivateTools(tool)
56  return acc
python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True, maxLevel='peeker')
Definition: AutoConfigFlags.py:65
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MissingEtDQAConfig.PhysValMETCfg
def PhysValMETCfg(flags, **kwargs)
Definition: MissingEtDQAConfig.py:14
METMakerConfig.getEleSelLikelihood
def getEleSelLikelihood(name="EleSelLikelihood_METMakerAlg")
Definition: METMakerConfig.py:36
METMakerConfig.getMETMaker
def getMETMaker(name="METMaker", **kwargs)
Definition: METMakerConfig.py:6
METMakerConfig.getTauSelectionTool
def getTauSelectionTool(name="TauSelectionTool_METMakerAlg")
Definition: METMakerConfig.py:46
METMakerConfig.getMuonSelectionTool
def getMuonSelectionTool(name="MuonSelectionTool_METMakerAlg")
Definition: METMakerConfig.py:28
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
METMakerConfig.getPhotonSelIsEM
def getPhotonSelIsEM(name="PhotonSelIsEM_METMakerAlg")
Definition: METMakerConfig.py:41