7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
11 doClusterMonAlg =
True
16 if flags.DQ.Environment
in (
'online',
'tier0',
'tier0Raw'):
20 isOnline = flags.Common.isOnline
21 if not isOnline: doMVAMonAlg=
False
22 kwargsHitMonAlg = {
'doOnline' : isOnline,
23 'doLumiBlock' :
not isOnline,
25 'RDOName' :
'PixelRDOs',
28 kwargsClusMonAlg = {
'doOnline' : isOnline,
29 'doLumiBlock' :
not isOnline,
30 'doLowOccupancy' : flags.Beam.Type
is BeamType.Cosmics,
31 'doHeavyIonMon' : flags.Reco.EnableHI,
33 'ClusterName' :
'PixelClusters',
34 'TrackName' :
'CombinedInDetTracks',
37 kwargsErrMonAlg = {
'doOnline' : isOnline,
38 'doLumiBlock' :
not isOnline
41 kwargsMVAMonAlg = {
'calibFolder' :
'20220503',
42 'RDOName' :
'PixelRDOs',
43 'ClusterName' :
'PixelClusters',
44 'TrackParticleContainerName' :
'InDetTrackParticles',
47 if doHitMonAlg
or doClusterMonAlg
or doErrorMonAlg
or doMVAMonAlg:
48 from PixelConditionsAlgorithms.PixelConditionsConfig
import PixelDetectorElementStatusAlgActiveOnlyCfg
51 from AthenaMonitoring
import AthMonitorCfgHelper
52 helper = AthMonitorCfgHelper(flags,
"NewPixelMonitoring")
54 from AthenaConfiguration.ComponentFactory
import CompFactory
55 from AthenaMonitoring.FilledBunchFilterToolConfig
import FilledBunchFilterToolCfg
58 from PixelMonitoring.PixelAthHitMonAlgCfg
import PixelAthHitMonAlgCfg
59 pixelAthHitMonAlg = helper.addAlgorithm(CompFactory.PixelAthHitMonAlg,
'PixelAthHitMonAlg', addFilterTools = [
FilledBunchFilterToolCfg(flags)])
60 kwargsHitMonAlg.setdefault(
'PixelDetElStatus',
'PixelDetectorElementStatus' )
61 kwargsHitMonAlg.setdefault(
'PixelDetElStatusActiveOnly',
'PixelDetectorElementStatusActiveOnly')
62 for k, v
in kwargsHitMonAlg.items():
63 setattr(pixelAthHitMonAlg, k, v)
67 from PixelMonitoring.PixelAthClusterMonAlgCfg
import PixelAthClusterMonAlgCfg
68 pixelAthClusterMonAlg = helper.addAlgorithm(CompFactory.PixelAthClusterMonAlg,
'PixelAthClusterMonAlg', addFilterTools = [
FilledBunchFilterToolCfg(flags)])
69 kwargsClusMonAlg.setdefault(
'PixelDetElStatus',
'PixelDetectorElementStatus' )
70 kwargsClusMonAlg.setdefault(
'PixelDetElStatusActiveOnly',
'PixelDetectorElementStatusActiveOnly')
71 for k, v
in kwargsClusMonAlg.items():
72 setattr(pixelAthClusterMonAlg, k, v)
74 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_TightPrimary_TrackTools_Cfg
75 TrackSelectionTool = acc.popToolsAndMerge(
77 flags, maxNPixelHoles = 2))
78 if flags.Beam.Type
is not BeamType.Cosmics:
79 TrackSelectionTool.maxD0 = 2
80 TrackSelectionTool.maxZ0 = 150
82 pixelAthClusterMonAlg.TrackSelectionTool = TrackSelectionTool
84 from InDetConfig.InDetTrackHoleSearchConfig
import (
85 InDetTrackHoleSearchToolCfg)
86 pixelAthClusterMonAlg.HoleSearchTool = acc.popToolsAndMerge(
89 from InDetConfig.InDetTestPixelLayerConfig
import InDetTestPixelLayerToolInnerCfg
90 pixelAthClusterMonAlg.TestPixelLayerTool = acc.popToolsAndMerge (InDetTestPixelLayerToolInnerCfg (flags,
'TestPixelLayerTool'))
95 from PixelMonitoring.PixelAthErrorMonAlgCfg
import PixelAthErrorMonAlgCfg
96 pixelAthMonAlgErrorMonAlg = helper.addAlgorithm(CompFactory.PixelAthErrorMonAlg,
'PixelAthErrorMonAlg', addFilterTools = [
FilledBunchFilterToolCfg(flags)])
97 kwargsErrMonAlg.setdefault(
'PixelDetElStatusActiveOnly',
'PixelDetectorElementStatusActiveOnly')
98 kwargsErrMonAlg.setdefault(
'PixelByteStreamErrs',
'PixelByteStreamErrs')
99 kwargsErrMonAlg.setdefault(
'UseByteStreamFEI4',
not flags.Input.isMC)
100 kwargsErrMonAlg.setdefault(
'UseByteStreamFEI3',
not flags.Input.isMC)
101 kwargsErrMonAlg.setdefault(
'UseByteStreamRD53',
False)
102 for k, v
in kwargsErrMonAlg.items():
103 setattr(pixelAthMonAlgErrorMonAlg, k, v)
107 from PixelMonitoring.PixelAthMVAMonAlgCfg
import PixelAthMVAMonAlgCfg
108 pixelAthMVAMonAlg = helper.addAlgorithm(CompFactory.PixelAthMVAMonAlg,
'PixelAthMVAMonAlg', addFilterTools = [
FilledBunchFilterToolCfg(flags)])
109 kwargsMVAMonAlg.setdefault(
'PixelDetElStatus',
'PixelDetectorElementStatus' )
110 kwargsMVAMonAlg.setdefault(
'PixelDetElStatusActiveOnly',
'PixelDetectorElementStatusActiveOnly')
111 for k, v
in kwargsMVAMonAlg.items():
112 setattr(pixelAthMVAMonAlg, k, v)
114 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_TightPrimary_TrackTools_Cfg
115 TrackSelectionTool = acc.popToolsAndMerge(
119 if flags.Beam.Type
is not BeamType.Cosmics:
120 TrackSelectionTool.maxD0 = 2
121 TrackSelectionTool.maxZ0 = 150
123 from InDetConfig.InDetTrackHoleSearchConfig
import InDetTrackHoleSearchToolCfg
124 pixelAthMVAMonAlg.TrackSelectionTool = TrackSelectionTool
126 from TrkConfig.AtlasExtrapolatorConfig
import InDetExtrapolatorCfg
130 acc.merge(helper.result())