ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TriggerMenuMT
python
HLT
Photon
TrigPhotonFactoriesCfg.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
"""
4
This file defines the factories of the algorithms to be used in a photon trigger sequence in athenaMT
5
These are inspired by the offline factories, alhtough modified so they reflect the configuration we need for these algorithms at the HLT.
6
Offline configurations are available here:
7
https://gitlab.cern.ch/atlas/athena/blob/master/Reconstruction/egamma/egammaAlgs/python/
8
"""
9
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
10
from
AthenaConfiguration.ComponentFactory
import
CompFactory
11
12
def
PrecisionPhotonCaloIsoMonitorCfg
(flags, name = 'PrecisionPhotonCaloIsoEgammaBuilderMon', ion=False):
13
acc = ComponentAccumulator()
14
from
TriggerMenuMT.HLT.Egamma.TrigEgammaKeys
import
getTrigEgammaKeys
15
TrigEgammaKeys = getTrigEgammaKeys(flags, ion = ion)
16
from
TrigEgammaMonitoring.egammaMonitorPrecisionConfig
import
egammaMonitorPrecisionCfg
17
monTool = egammaMonitorPrecisionCfg(flags, name)
18
collectionIn = TrigEgammaKeys.precisionPhotonContainer
19
PrecisionPhotonCaloIsoMonitor = CompFactory.egammaMonitorPhotonAlgorithm(
20
name = name,
21
PhotonKey = TrigEgammaKeys.precisionPhotonContainer,
22
IsoVarKeys = [
'%s.topoetcone20'
% collectionIn,
'%s.topoetcone40'
% collectionIn],
23
MonTool = monTool)
24
acc.addEventAlgo(PrecisionPhotonCaloIsoMonitor)
25
return
acc
26
27
def
TrigEMClusterToolCfg
(flags, ion=False):
28
acc = ComponentAccumulator()
29
from
TriggerMenuMT.HLT.Egamma.TrigEgammaKeys
import
getTrigEgammaKeys
30
TrigEgammaKeys = getTrigEgammaKeys(flags, ion = ion)
31
from
egammaMVACalib.egammaMVACalibConfig
import
egammaMVASvcCfg
32
tool = CompFactory.EMClusterTool(
'TrigEMClusterTool_photon'
,
33
OutputClusterContainerName = TrigEgammaKeys.precisionPhotonEMClusterContainer,
34
MVACalibSvc = acc.getPrimaryAndMerge(egammaMVASvcCfg(flags,name =
"TrigEgammaMVASvc"
)))
35
acc.setPrivateTools(tool)
36
return
acc
37
38
def
TrigTopoEgammaPhotonCfg
(flags):
39
acc = ComponentAccumulator()
40
from
TriggerMenuMT.HLT.Egamma.TrigEgammaKeys
import
getTrigEgammaKeys
41
TrigEgammaKeys = getTrigEgammaKeys(flags)
42
from
egammaTools.EMShowerBuilderConfig
import
EMShowerBuilderCfg
43
from
egammaTools.EMPIDBuilderConfig
import
EMPIDBuilderPhotonCfg
44
TrigTopoEgammaPhotons = CompFactory.xAODEgammaBuilder( name =
'TrigTopoEgammaPhotons'
,
45
InputElectronRecCollectionName = TrigEgammaKeys.precisionElectronSuperClusterRecCollection,
46
InputPhotonRecCollectionName = TrigEgammaKeys.precisionPhotonSuperClusterCollection,
47
ElectronOutputName = TrigEgammaKeys.precisionElectronContainer,
48
PhotonOutputName = TrigEgammaKeys.precisionPhotonContainer,
49
EMClusterTool = acc.popToolsAndMerge(
TrigEMClusterToolCfg
(flags, ion=
False
)),
50
EMShowerTool = acc.popToolsAndMerge(EMShowerBuilderCfg(flags,name=
'TrigEMShowerBuilder'
,CellsName=
"CaloCells"
)),
51
PhotonTools = [acc.popToolsAndMerge(EMPIDBuilderPhotonCfg(flags,name=
'TrigEMPIDBuilderPhotonCfg'
))],
52
doPhotons =
True
,
53
doElectrons =
False
,
54
)
55
acc.addEventAlgo(TrigTopoEgammaPhotons)
56
return
acc
57
58
def
TrigTopoEgammaPhotonCfg_HI
(flags):
59
acc = ComponentAccumulator()
60
from
TriggerMenuMT.HLT.Egamma.TrigEgammaKeys
import
getTrigEgammaKeys
61
TrigEgammaKeys = getTrigEgammaKeys(flags,ion=
True
)
62
from
egammaTools.EMShowerBuilderConfig
import
EMShowerBuilderCfg
63
from
egammaTools.EMPIDBuilderConfig
import
EMPIDBuilderPhotonCfg
64
TrigTopoEgammaPhotons = CompFactory.xAODEgammaBuilder( name =
'TrigTopoEgammaPhotons_HI'
,
65
InputElectronRecCollectionName = TrigEgammaKeys.precisionElectronSuperClusterRecCollection,
66
InputPhotonRecCollectionName = TrigEgammaKeys.precisionPhotonSuperClusterCollection,
67
ElectronOutputName = TrigEgammaKeys.precisionElectronContainer,
68
PhotonOutputName = TrigEgammaKeys.precisionPhotonContainer,
69
EMClusterTool = acc.popToolsAndMerge(
TrigEMClusterToolCfg
(flags, ion=
True
)),
70
EMShowerTool = acc.popToolsAndMerge(EMShowerBuilderCfg(flags,name=
'TrigEMShowerBuilder_HI'
,CellsName=
"CorrectedRoICaloCells"
)),
71
PhotonTools = [acc.popToolsAndMerge(EMPIDBuilderPhotonCfg(flags,name=
'TrigEMPIDBuilderPhotonCfg_HI'
))],
72
doPhotons =
True
,
73
doElectrons =
False
,
74
)
75
acc.addEventAlgo(TrigTopoEgammaPhotons)
76
return
acc
77
78
def
PrecisionPhotonTopoMonitorCfg
(flags, ion=False,name = 'PrecisionPhotonTopoMonitoring'):
79
80
acc = ComponentAccumulator()
81
from
TriggerMenuMT.HLT.Egamma.TrigEgammaKeys
import
getTrigEgammaKeys
82
TrigEgammaKeys = getTrigEgammaKeys(flags,ion=ion)
83
from
TrigEgammaMonitoring.egammaMonitorPrecisionConfig
import
egammaMonitorPrecisionCfg
84
monTool = egammaMonitorPrecisionCfg(flags, name+(
'HI'
if
ion
is
True
else
''
))
85
86
PrecisionPhotonTopoMonitor = CompFactory.egammaMonitorPhotonAlgorithm(
87
name = name+(
'HI'
if
ion
is
True
else
''
),
88
PhotonKey = TrigEgammaKeys.precisionPhotonContainer,
89
MonTool = monTool
90
)
91
92
acc.addEventAlgo(PrecisionPhotonTopoMonitor)
93
return
acc
94
95
def
PrecisionPhotonSuperClusterMonitorCfg
(flags, ion = False, name ='PrecisionPhotonSuperClusterMonitoring'):
96
97
acc = ComponentAccumulator()
98
from
TriggerMenuMT.HLT.Egamma.TrigEgammaKeys
import
getTrigEgammaKeys
99
TrigEgammaKeys = getTrigEgammaKeys(flags, ion=ion)
100
from
TrigEgammaMonitoring.egammaMonitorPrecisionConfig
import
egammaMonitorSuperClusterCfg
101
monTool = egammaMonitorSuperClusterCfg(flags, name+(
'HI'
if
ion
is
True
else
''
))
102
103
PrecisionPhotonSuperClusterMonitor = CompFactory.egammaMonitorSuperClusterAlgorithm(
104
name = name+(
'HI'
if
ion
is
True
else
''
),
105
InputEgammaRecContainerName = TrigEgammaKeys.precisionPhotonSuperClusterCollection,
106
MonTool = monTool
107
)
108
109
acc.addEventAlgo(PrecisionPhotonSuperClusterMonitor)
110
return
acc
TrigPhotonFactoriesCfg.TrigEMClusterToolCfg
TrigEMClusterToolCfg(flags, ion=False)
Definition
TrigPhotonFactoriesCfg.py:27
TrigPhotonFactoriesCfg.PrecisionPhotonCaloIsoMonitorCfg
PrecisionPhotonCaloIsoMonitorCfg(flags, name='PrecisionPhotonCaloIsoEgammaBuilderMon', ion=False)
Definition
TrigPhotonFactoriesCfg.py:12
TrigPhotonFactoriesCfg.PrecisionPhotonTopoMonitorCfg
PrecisionPhotonTopoMonitorCfg(flags, ion=False, name='PrecisionPhotonTopoMonitoring')
Definition
TrigPhotonFactoriesCfg.py:78
TrigPhotonFactoriesCfg.PrecisionPhotonSuperClusterMonitorCfg
PrecisionPhotonSuperClusterMonitorCfg(flags, ion=False, name='PrecisionPhotonSuperClusterMonitoring')
Definition
TrigPhotonFactoriesCfg.py:95
TrigPhotonFactoriesCfg.TrigTopoEgammaPhotonCfg
TrigTopoEgammaPhotonCfg(flags)
Definition
TrigPhotonFactoriesCfg.py:38
TrigPhotonFactoriesCfg.TrigTopoEgammaPhotonCfg_HI
TrigTopoEgammaPhotonCfg_HI(flags)
Definition
TrigPhotonFactoriesCfg.py:58
Generated on
for ATLAS Offline Software by
1.17.0