ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
ElectronPhotonID
ElectronPhotonSelectorTools
python
AsgForwardElectronIsEMSelectorsConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
4
__doc__ =
"""Configure the AsgForwardElectronIsEMSelector with the quality cuts
5
and allow for (re-)setting of all provided cuts."""
6
7
from
AthenaCommon.Logging
import
logging
8
from
AthenaConfiguration.ComponentFactory
import
CompFactory
9
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
10
from
ElectronPhotonSelectorTools.ForwardElectronIsEMSelectorMapping
import
(
11
ForwardElectronIsEMMap, forwardelectronPIDmenu)
12
13
14
def
AsgForwardElectronIsEMSelectorCfg
(flags,
15
name,
16
quality,
17
menu=forwardelectronPIDmenu.menuMC15):
18
19
mlog = logging.getLogger(
'AsgForwardElectronIsEMSelector'
)
20
mlog.debug(
'Start configuration'
)
21
acc = ComponentAccumulator()
22
AsgForwardElectronIsEMSelector = CompFactory.AsgForwardElectronIsEMSelector
23
24
try
:
25
ntuple = ForwardElectronIsEMMap(quality, menu)
26
mlog.debug(
'ntuple: %s'
, ntuple)
27
except
KeyError:
28
mlog.error(
"Fwd Electron quality not found."
29
"Please use an egammaIDQuality"
30
"(ElectronPhotonSelectorTools/egammaPIDdefs.h)."
31
"This function only supports forward IDs,"
32
"and not photon or standard electron IDs"
)
33
raise
34
35
# Create and instance of the tool
36
tool =
AsgForwardElectronIsEMSelector
(name)
37
tool.usePVContainer = flags.Tracking.doVertexFinding
38
39
# Call the function and configure it with the standard configuration
40
ntuple[1](tool)
41
tool.isEMMask = ntuple[0]
42
43
mlog.debug(
'isEMMask: %x'
, tool.isEMMask)
44
45
acc.setPrivateTools(tool)
46
return
acc
AsgForwardElectronIsEMSelector
Electron isEM selector.
Definition
AsgForwardElectronIsEMSelector.h:43
python.AsgForwardElectronIsEMSelectorsConfig.AsgForwardElectronIsEMSelectorCfg
AsgForwardElectronIsEMSelectorCfg(flags, name, quality, menu=forwardelectronPIDmenu.menuMC15)
Definition
AsgForwardElectronIsEMSelectorsConfig.py:17
Generated on
for ATLAS Offline Software by
1.17.0