ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkJetEtMiss
python
METCommonConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
#********************************************************************
4
# METCommonConfig.py
5
# Configures DF MET content building and association tools
6
# Component accumulator version
7
#********************************************************************
8
9
10
11
def
METCommonCfg
(ConfigFlags):
12
"""Configure MET for the derivation framework"""
13
14
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
15
from
METReconstruction.METAssociatorCfg
import
METAssociatorCfg
16
17
acc = ComponentAccumulator()
18
19
metDefs = [
'AntiKt4EMTopo'
]
20
if
ConfigFlags.MET.DoPFlow:
21
metDefs.append(
'AntiKt4EMPFlow'
)
22
23
for
metDef
in
metDefs:
24
acc.merge(
METAssociatorCfg
(ConfigFlags, metDef))
25
26
return
acc
27
28
def
METCustomVtxCfg
(ConfigFlags, vxColl, jetColl, constituentColl):
29
from
METReconstruction.METAssocCfg
import
METAssocConfig, AssocConfig
30
from
METReconstruction.METAssociatorCfg
import
getAssocCA
31
32
associators = [AssocConfig(
'CustomJet'
, jetColl+
'Jets'
),
33
AssocConfig(
'Muon'
),
34
AssocConfig(
'Ele'
),
35
AssocConfig(
'Gamma'
),
36
AssocConfig(
'Tau'
),
37
AssocConfig(
'Soft'
)]
38
39
cfg = METAssocConfig(jetColl,
40
ConfigFlags,
41
buildconfigs = associators,
42
doPFlow = (
'PFlow'
in
jetColl),
43
usePFOLinks = ConfigFlags.MET.UseFELinks,
44
modConstKey = constituentColl)
45
46
for
assoc
in
cfg.assoclist:
47
assoc.PrimVxColl = vxColl
48
49
return
getAssocCA(cfg, METName=
'CustomJet'
)
50
51
52
def
METLRTCfg
(ConfigFlags, jetType):
53
from
METReconstruction.METAssocCfg
import
METAssocConfig, AssocConfig
54
from
METReconstruction.METAssociatorCfg
import
getAssocCA
55
56
jetColl = {
"AntiKt4LCTopo"
:
"LCJet"
,
57
"AntiKt4EMTopo"
:
"EMJet"
,
58
"AntiKt4EMPFlow"
:
"PFlowJet"
}
59
60
associators = [ AssocConfig(jetColl[jetType]),
61
AssocConfig(
'Muon'
),
62
AssocConfig(
'MuonLRT'
),
63
AssocConfig(
'Ele'
),
64
AssocConfig(
'LRTEle'
),
65
AssocConfig(
'Gamma'
),
66
AssocConfig(
'Tau'
),
67
AssocConfig(
'Soft'
)]
68
69
modConstKey =
""
70
modClusColls = {}
71
if
ConfigFlags.MET.UseTracks:
72
modConstKey=
"OriginCorr"
73
modClusColls={
74
'LCOriginCorrClusters'
:
'LCOriginTopoClusters'
,
75
'EMOriginCorrClusters'
:
'EMOriginTopoClusters'
76
}
77
usePFlow = (
'PFlow'
in
jetType)
78
cfg = METAssocConfig(jetType+
"_LRT"
,
79
ConfigFlags,
80
buildconfigs = associators,
81
doPFlow = usePFlow,
82
usePFOLinks = (ConfigFlags.MET.UseFELinks
if
usePFlow
else
False
),
83
modConstKey=(
""
if
usePFlow
else
modConstKey),
84
modClusColls=({}
if
usePFlow
else
modClusColls) )
85
86
return
getAssocCA(cfg, METName=jetType+
'_LRT'
)
87
88
def
METRemappingCfg
(ConfigFlags):
89
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator, CompFactory
90
91
acc = ComponentAccumulator()
92
acc.addEventAlgo(CompFactory.DerivationFramework.METRemappingAlg(
'AnalysisMETRemappingAlg'
))
93
94
return
acc
95
96
def
HadRecoilMETCfg
(ConfigFlags):
97
from
METReconstruction.METAssocCfg
import
METAssocConfig, AssocConfig
98
from
METReconstruction.METAssociatorCfg
import
getAssocCA
99
100
101
jettype=
'HadronicRecoil'
# -> i.e. dont build assocs to jets at all
102
assocname=
'AntiKt4EMPFlowHR'
103
doPFlow=
True
104
doRecoil=
True
105
106
#only mu, e and soft assocs are needed
107
associators = [AssocConfig(jettype),
108
AssocConfig(
'Muon'
),
109
AssocConfig(
'Ele'
),
110
AssocConfig(
'Soft'
)]
111
112
cfg = METAssocConfig(assocname,
113
ConfigFlags,
114
buildconfigs = associators,
115
doPFlow = doPFlow,
116
doRecoil = doRecoil,
117
usePFOLinks = ConfigFlags.MET.UseFELinks)
118
119
120
return
getAssocCA(cfg, METName=assocname)
METAssociatorCfg
Definition
METAssociatorCfg.py:1
python.METCommonConfig.METCommonCfg
METCommonCfg(ConfigFlags)
Definition
METCommonConfig.py:11
python.METCommonConfig.HadRecoilMETCfg
HadRecoilMETCfg(ConfigFlags)
Definition
METCommonConfig.py:96
python.METCommonConfig.METLRTCfg
METLRTCfg(ConfigFlags, jetType)
Definition
METCommonConfig.py:52
python.METCommonConfig.METCustomVtxCfg
METCustomVtxCfg(ConfigFlags, vxColl, jetColl, constituentColl)
Definition
METCommonConfig.py:28
python.METCommonConfig.METRemappingCfg
METRemappingCfg(ConfigFlags)
Definition
METCommonConfig.py:88
Generated on
for ATLAS Offline Software by
1.17.0