3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from .AthenaMonitoringAODRecoCfg
import AthenaMonitoringAODRecoCfg
5 from AthenaConfiguration.Enums
import LHCPeriod
9 local_logger = logging.getLogger(
'AthenaMonitoringCfg')
10 info = local_logger.info
11 debug = local_logger.debug
12 warning = local_logger.warning
13 error = local_logger.error
18 if flags.DQ.Steering.doPixelMon
and flags.GeoModel.Run
is not LHCPeriod.Run1:
20 info(
'Set up Pixel monitoring')
21 from PixelMonitoring.PixelMonitoringConfig
import PixelMonitoringConfig
24 if flags.DQ.Steering.doSCTMon:
25 info(
'Set up SCT monitoring')
26 from SCT_Monitoring.SCTMonitoringConfig
import SCTMonitoringConfig
29 if flags.DQ.Steering.doTRTMon:
30 info(
'Set up TRT monitoring')
31 from TRTMonitoringRun3.TRTMonitoringRun3Config
import TRTMonitoringRun3Cfg
34 if flags.DQ.Steering.doInDetMon:
35 if flags.DQ.Steering.InDet.doGlobalMon:
36 info(
'Set up InDet Global monitoring')
37 from InDetGlobalMonitoringRun3Test.InDetGlobalMonitoringRun3TestConfig
import InDetGlobalMonitoringRun3TestConfig
39 if flags.DQ.Steering.InDet.doAlignMon:
40 info(
'Set up Alignment monitoring')
41 from InDetAlignmentMonitoringRun3.InDetAlignmentMonitoringRun3Config
import InDetAlignmentMonitoringRun3Config
44 if flags.DQ.Steering.doLArMon:
45 info(
'Set up LAr monitoring')
46 from LArConfiguration.LArMonitoringConfig
import LArMonitoringConfig
49 if flags.DQ.Steering.doTileMon:
50 info(
'Set up Tile monitoring')
51 from TileMonitoring.TileMonitoringConfig
import TileMonitoringCfg
54 if flags.DQ.Steering.doCaloGlobalMon:
55 info(
'Set up Calo monitoring')
56 from CaloMonitoring.CaloMonitoringConfig
import CaloMonitoringCfg
59 if flags.DQ.Steering.doMuonMon:
60 info(
'Set up Muon monitoring')
61 from MuonDQAMonitoring.MuonDQAMonitoringConfig
import MuonDQAMonitoringConfig
64 if flags.DQ.Steering.doHLTMon:
65 info(
'Set up HLT monitoring')
66 if flags.DQ.Environment ==
'AOD':
67 warning(
"HLT Monitoring enabled on AOD: this might cause issues as not all HLT collections are written to standard AOD!")
68 from TrigHLTMonitoring.TrigHLTMonitorAlgorithm
import TrigHLTMonTopConfig
71 if flags.DQ.Steering.doJetTagMon:
72 info(
'Set up JetTagging monitoring')
73 from JetTagMonitoring.JetTagMonitorAlgorithm
import JetTagMonitorConfig
76 if flags.DQ.Steering.doEgammaMon:
77 info(
'Set up Egamma monitoring')
78 from egammaPerformance.egammaMonitoringConfig
import egammaMonitoringConfig
81 if flags.DQ.Steering.doJetMon:
82 info(
'Set up Jet monitoring')
83 from JetMonitoring.JetMonitoringStandard
import standardJetMonitoring
87 if flags.DQ.Environment !=
'tier0ESD':
89 if not flags.Reco.EnableHI
or (flags.Reco.EnableHI
and flags.Tracking.doUPC) :
90 from eflowRec.PFCfg
import PFGlobalFlowElementLinkingCfg
93 if flags.DQ.Steering.doJetInputsMon:
94 info(
'Set up Jet Inputs monitoring')
95 from JetInputsMonitoring.ClusterMonitorAlgorithm
import ClusterMonitoringConfig
97 from JetInputsMonitoring.PFOMonitorAlgorithm
import PFOMonitoringConfig
100 if flags.DQ.Steering.doMissingEtMon:
101 info(
'Set up MET monitoring')
102 from MissingETMonitoring.METMonitorAlgorithm
import METMonitoringConfig
105 if flags.DQ.Steering.doDataFlowMon:
106 info(
'Set up Data Flow monitoring')
107 from DataQualityTools.DQTDataFlowMonAlg
import DQTDataFlowMonAlgConfig
110 if flags.DQ.Steering.doGlobalMon:
111 info(
'Set up Global monitoring')
112 from DataQualityTools.DataQualityToolsConfig
import DataQualityToolsConfig
115 if flags.DQ.Steering.doTauMon:
116 info(
'Set up Tau monitoring')
117 from tauMonitoring.TauMonitoringConfig
import TauMonitoringConfig
120 if flags.DQ.Steering.doAFPMon:
121 info(
'Set up AFP monitoring')
122 from Run3AFPMonitoring.Run3AFPExampleMonitorAlgorithm
import Run3AFPExampleMonitoringConfig
125 if flags.DQ.Steering.doZDCMon
and not flags.Input.isMC
and flags.GeoModel.Run > LHCPeriod.Run2:
126 info(
'Set up ZDC monitoring')
127 from ZdcMonitoring.ZdcMonitorAlgorithm
import ZdcMonitoringConfig
131 if flags.DQ.Steering.doLVL1CaloMon
and flags.GeoModel.Run > LHCPeriod.Run1:
132 info(
'Set up LVL1Calo monitoring')
133 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import LVL1CaloMonitoringConfig
135 if flags.DQ.Steering.doLVL1InterfacesMon:
136 info(
'Set up LVL1Interfaces monitoring')
137 from TrigT1Monitoring.LVL1InterfacesMonitoringCfg
import LVL1InterfacesMonitoringCfg
140 if flags.DQ.Steering.doCTPMon:
141 info(
'Set up CTP monitoring')
142 from TrigT1CTMonitoring.CTPMonitoringConfig
import CTPMonitoringConfig
147 for algo
in result.getEventAlgos():
149 if hasattr(algo,
'GMTools'):
150 for t
in algo.GMTools:
151 for h
in t.Histograms:
153 fullpath = os.path.join(t.HistPath, ho[
'path'], ho[
'alias']) +
':' + ho[
'convention']
154 if fullpath
in definedhists:
155 previous = definedhists[fullpath]
159 info(f
'Multiple matching definition of histogram {fullpath} by:\n\t{algo.getName()}/{t.getName()} ({ho}) and\n\t{previous[0]}/{previous[1]}')
161 error(f
'Multiple differing definition of histogram {fullpath} by:\n\t{algo.getName()}/{t.getName()} ({ho}) and\n\t{previous[0]}/{previous[1]} ({previous[2]})')
163 definedhists[fullpath] = (algo.getName(), t.getName(), ho)
165 debug(
'Passed histogram duplication check')
171 from DataQualityUtils.DQPostProcessingAlg
import DQPostProcessingAlg
172 ppa = DQPostProcessingAlg(
"DQPostProcessingAlg")
173 ppa.ExtraInputs = {(
'xAOD::EventInfo' ,
'StoreGateSvc+EventInfo' )}
174 ppa.Interval = flags.DQ.postProcessingInterval
175 if flags.Common.isOnline:
176 ppa.FileKey = ((flags.DQ.FileKey +
'/')
if not flags.DQ.FileKey.endswith(
'/')
177 else flags.DQ.FileKey)
178 result.addEventAlgo(ppa)