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  UseR21JvtFallback=True,
31  JetJvtMomentName="NewJvt",
32  DoPFlow=False) )
33  kwargs.setdefault("METMakerPFlow", getMETMaker(name="METMaker_AntiKt4PFlow",
34  JetSelection="Loose",
35  DoPFlow=True) )
36 
37  from METUtilities.METMakerConfig import getMuonSelectionTool, getEleSelLikelihood, getPhotonSelIsEM, getTauSelectionTool
38  kwargs.setdefault("MuonSelectionTool", getMuonSelectionTool())
39  kwargs.setdefault("ElectronLHSelectionTool", getEleSelLikelihood())
40  kwargs.setdefault("PhotonIsEMSelectionTool", getPhotonSelIsEM())
41  kwargs.setdefault("TauSelectionTool", getTauSelectionTool())
42 
43  from AthenaConfiguration.AutoConfigFlags import GetFileMD
44  metadata = GetFileMD(flags.Input.Files)
45  isDAOD_PHYSVAL=False
46  for class_name, name in metadata['metadata_items'].items():
47  if name == 'EventStreamInfo':
48  if "DAOD_PHYSVAL" in class_name :
49  print ("Running on DAOD_PHYSVAL - will not add TTVA decorations.")
50  isDAOD_PHYSVAL=True
51  break
52  kwargs.setdefault("InputIsDAOD", isDAOD_PHYSVAL)
53 
54  kwargs.setdefault("DoMETRefPlots", "xAOD::MissingETContainer#MET_Reference_AntiKt4EMTopo" in flags.Input.TypedCollections)
55 
56  tool = CompFactory.MissingEtDQA.PhysValMET(**kwargs)
57  acc.setPrivateTools(tool)
58  return acc
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:17
METMakerConfig.getMETMaker
def getMETMaker(name="METMaker", **kwargs)
Definition: METMakerConfig.py:6
python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True)
Definition: AutoConfigFlags.py:51
METMakerConfig.getTauSelectionTool
def getTauSelectionTool(name="TauSelectionTool_METMakerAlg")
Definition: METMakerConfig.py:27
METMakerConfig.getMuonSelectionTool
def getMuonSelectionTool(name="MuonSelectionTool_METMakerAlg")
Definition: METMakerConfig.py:9
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
METMakerConfig.getPhotonSelIsEM
def getPhotonSelIsEM(name="PhotonSelIsEM_METMakerAlg")
Definition: METMakerConfig.py:22