ATLAS Offline Software
Loading...
Searching...
No Matches
MissingEtDQAConfig.py
Go to the documentation of this file.
2# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3#
4
5'''@file MissingEtDAQConfig.py
6@contact atlas-cp-jetetmiss-jsv-conveners@cern.ch
7@brief Main CA-based python configuration for MissingEtDQA
8'''
9
10from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
11from AthenaConfiguration.ComponentFactory import CompFactory
12
13def PhysValMETCfg(flags, **kwargs):
14 acc = ComponentAccumulator()
15
16 kwargs.setdefault("EnableLumi", False)
17 kwargs.setdefault("DetailLevel", 10)
18 kwargs.setdefault("DoTruth", flags.Input.isMC)
19
20 from METUtilities.METMakerConfig import getMETMaker
21 # for EMTopo jets no NNJvt is calculated so we need to fall back to Jvt (re-calculated in MissingEtDQA::PhysValMET as "NewJvt")
22 METMakerTopo = getMETMaker(jetCollection="AntiKt4EMTopoJets",
23 name="METMaker_AntiKt4Topo",
24 JetSelection="Loose",
25 DoPFlow=False)
26 METMakerPFlow = getMETMaker(jetCollection="AntiKt4EMPFlowJets",
27 name="METMaker_AntiKt4PFlow",
28 JetSelection="Loose",
29 DoPFlow=True)
30
31
32 kwargs.setdefault("METMakerTopo", METMakerTopo )
33 kwargs.setdefault("METMakerPFlow", METMakerPFlow )
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
PhysValMETCfg(flags, **kwargs)