ATLAS Offline Software
Loading...
Searching...
No Matches
MissingEtDQAConfig.py
Go to the documentation of this file.
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
11from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12from AthenaConfiguration.ComponentFactory import CompFactory
13
14def 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(jetCollection="AntiKt4EMTopoJets",
29 name="METMaker_AntiKt4Topo",
30 JetSelection="Loose",
31 DoPFlow=False) )
32 kwargs.setdefault("METMakerPFlow", getMETMaker(jetCollection="AntiKt4EMPFlowJets",
33 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
PhysValMETCfg(flags, **kwargs)