7 @brief Global Monitoring job option to run online DQ with new-style configuration.
8 Include parts from StateLessPT_NewConfig.py and RecoSteering.py
11 if __name__==
'__main__':
13 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
14 from AthenaConfiguration.ComponentFactory
import CompFactory
15 from AthenaConfiguration.Enums
import Format
22 partitionName = os.environ.get(
"TDAQ_PARTITION",
"ATLAS")
24 from ispy
import IPCPartition, ISObject
29 p = IPCPartition(partitionName)
31 print(
"Partition:",p.name(),
"is not valid")
35 from AthenaConfiguration.Enums
import BeamType
37 if partitionName ==
"ATLAS" or partitionName ==
'ATLAS_MP1':
39 y = ISObject(p,
'RunParams.RunParams',
'RunParams')
41 print(
"Could not find Run Parameters in IS - Set default beam type to 'cosmics'")
42 beamType=BeamType.Cosmics
45 beamtype = y.beam_type
46 beamenergy = y.beam_energy
47 runnumber = y.run_number
48 project = y.T0_project_tag
49 print(
"RUN CONFIGURATION: beam type %i, beam energy %i, run number %i, project tag %s"%(beamtype,beamenergy,runnumber,project))
51 if project[7:10]==
"cos":
52 beamType=BeamType.Cosmics
54 beamType=BeamType.Collisions
58 beamType=BeamType.Collisions
64 conditionsTag =
'CONDBR2-HLTP-2022-02'
65 detDescrVersion =
'ATLAS-R3S-2021-03-00-00'
70 from AthenaConfiguration.AutoConfigOnlineRecoFlags
import autoConfigOnlineRecoFlags
73 flags.Concurrency.NumThreads = 1
75 flags.Exec.MaxEvents = -1
77 flags.Beam.Type = beamType
78 flags.Beam.BunchSpacing = 25
79 print(
"RUN CONFIGURATION: Beamtype =",flags.Beam.Type)
81 if partitionName !=
'ATLAS' and partitionName !=
'ATLAS_MP1':
82 flags.Input.ProjectName =
'data21_900GeV'
83 flags.Exec.MaxEvents = 20
84 flags.Input.RunNumbers = [431894]
85 flags.Input.LumiBlockNumbers = [1]
87 flags.Common.isOnline =
True
89 flags.Input.Format = Format.BS
90 flags.Input.isMC =
False
92 flags.IOVDb.DatabaseInstance =
"CONDBR2"
93 flags.IOVDb.GlobalTag = conditionsTag
95 flags.GeoModel.Layout=
"atlas"
96 flags.GeoModel.AtlasVersion = detDescrVersion
98 flags.Trigger.triggerConfig=
'DB'
100 flags.InDet.useSctDCS =
False
102 flags.DQ.enableLumiAccess =
False
103 flags.DQ.doMonitoring =
True
104 flags.DQ.doPostProcessing =
True
105 flags.DQ.useTrigger =
True
106 flags.DQ.triggerDataAvailable =
True
107 flags.DQ.FileKey =
''
108 flags.DQ.Environment =
'online'
110 flags.LAr.doHVCorr =
False
112 if (partitionName !=
'ATLAS' and partitionName !=
'ATLAS_MP1'):
113 flags.DQ.useTrigger =
False
114 flags.DQ.triggerDataAvailable =
False
119 flags.Detector.EnableCalo =
True
120 flags.Reco.EnableTracking =
True
121 flags.Detector.EnableMuon =
True
122 flags.Reco.EnableCombinedMuon =
True
123 flags.Reco.EnableJet =
True
124 flags.Reco.EnablePFlow =
True
125 flags.Reco.EnableEgamma =
True
126 flags.Reco.EnableTrigger =
True
128 if (partitionName !=
'ATLAS' and partitionName !=
'ATLAS_MP1'):
129 flags.Reco.EnableTrigger =
False
131 flags.Reco.EnableMet =
True
132 flags.Reco.EnableIsolation =
True
133 flags.Detector.EnableLucid =
True
134 flags.Reco.EnableHI =
False
135 flags.Reco.EnableBTagging =
True
141 flags.DQ.Steering.doCaloGlobalMon =
True
143 flags.DQ.Steering.doInDetMon =
True
144 flags.DQ.Steering.InDet.doGlobalMon =
True
145 flags.DQ.Steering.InDet.doAlignMon =
True
147 flags.DQ.Steering.doLArMon =
True
149 flags.DQ.Steering.doTileMon =
True
151 flags.DQ.Steering.doJetMon =
True
153 flags.DQ.Steering.doPixelMon =
True
155 flags.DQ.Steering.doSCTMon =
False
157 flags.DQ.Steering.doTRTMon =
True
159 flags.DQ.Steering.doMuonMon =
True
161 flags.DQ.Steering.doMissingEtMon =
True
162 flags.DQ.Steering.doEgammaMon =
True
163 flags.DQ.Steering.doJetTagMon =
True
164 flags.DQ.Steering.doTauMon =
True
165 flags.DQ.Steering.doGlobalMon =
False
167 flags.DQ.Steering.doJetInputsMon =
True
169 flags.DQ.Steering.doHLTMon =
True
171 flags.DQ.Steering.doAFPMon =
True
173 flags.DQ.Steering.doZDCMon =
False
175 flags.DQ.Steering.doLVL1CaloMon =
False
176 flags.DQ.Steering.doLVL1InterfacesMon =
False
178 flags.DQ.Steering.doDataFlowMon =
False
180 flags.DQ.Steering.doCTPMon =
False
182 if (partitionName !=
'ATLAS' and partitionName !=
'ATLAS_MP1'):
183 flags.DQ.Steering.doHLTMon =
False
192 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
195 bytestreamConversion = CompFactory.ByteStreamCnvSvc()
196 acc.addService(bytestreamConversion, primary=
True)
198 from ByteStreamEmonSvc.EmonByteStreamConfig
import EmonByteStreamCfg
201 bytestreamInput = acc.getService(
"ByteStreamInputSvc")
206 bytestreamInput.Partition = partitionName
208 bytestreamInput.Key =
"dcm"
209 bytestreamInput.KeyCount = 40
215 bytestreamInput.Timeout = 600000
217 bytestreamInput.UpdatePeriod = 200
219 bytestreamInput.ISServer =
'Histogramming'
221 bytestreamInput.StreamNames = [
'express']
222 bytestreamInput.StreamType =
"physics"
223 bytestreamInput.StreamLogic =
"Or"
226 if partitionName ==
'ATLAS' or partitionName ==
'ATLAS_MP1':
227 from PyUtils.OnlineISConfig
import GetAtlasReady
228 if beamType == BeamType.Cosmics:
229 bytestreamInput.StreamNames = [
'express',
'IDCosmic',
'HLT_IDCosmic',
'CosmicMuons',
'CosmicCalo']
232 print (
"ATLAS READY, reading express stream")
233 bytestreamInput.StreamNames = [
'express']
235 print (
"ATLAS NOT READY, reading standby stream")
236 bytestreamInput.StreamNames = [
'express',
'IDCosmic',
'HLT_IDCosmic',
'CosmicMuons',
'MinBias',
'Standby',
'Main',
'CosmicCalo']
238 bytestreamInput.StreamLogic =
'Ignore'
239 bytestreamInput.PublishName =
'GMT9_23_0_28_CA_test_1'
247 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoBeamSpotDecoratorAlgCfg
255 if flags.Detector.EnableCalo:
256 from CaloRec.CaloRecoConfig
import CaloRecoCfg
260 if flags.Reco.EnableTracking:
261 from InDetConfig.TrackRecoConfig
import InDetTrackRecoCfg
265 if flags.Detector.EnableMuon:
266 from MuonConfig.MuonReconstructionConfig
import MuonReconstructionCfg
270 if flags.Reco.EnableCombinedMuon:
271 from MuonCombinedConfig.MuonCombinedReconstructionConfig
import (
272 MuonCombinedReconstructionCfg)
276 if flags.Reco.EnableJet:
277 from JetRecConfig.JetRecoSteering
import JetRecoSteeringCfg
281 if flags.Reco.EnablePFlow:
282 from eflowRec.PFRun3Config
import PFCfg
283 acc.merge(
PFCfg(flags))
286 if flags.Reco.EnableEgamma:
287 from egammaConfig.egammaSteeringConfig
import EGammaSteeringCfg
291 if flags.Reco.EnableTau:
292 from tauRec.TauConfig
import TauReconstructionCfg
296 if flags.Reco.EnableTrigger:
297 from TriggerJobOpts.TriggerRecoConfig
import TriggerRecoCfg
301 if flags.Reco.EnableMet:
302 from METReconstruction.METRecCfg
import METCfg
306 if flags.Reco.EnableIsolation:
307 from IsolationAlgs.IsolationSteeringConfig
import IsolationSteeringCfg
311 if flags.Detector.EnableLucid:
312 from ForwardRec.LucidRecConfig
import LucidRecCfg
316 if flags.Reco.EnableHI:
317 from HIRecConfig.HIRecConfig
import HIRecCfg
321 if flags.Reco.EnableBTagging:
322 from BTagging.BTagConfig
import BTagRecoSplitCfg
328 if flags.DQ.doMonitoring:
329 from AthenaMonitoring.AthenaMonitoringCfg
import (
330 AthenaMonitoringCfg, AthenaMonitoringPostprocessingCfg)
332 if flags.DQ.doPostProcessing:
336 from IOVDbSvc.IOVDbSvcConfig
import addOverride
337 acc.merge(
addOverride(flags,
"/TRT/Onl/Calib/PID_NN",
"TRTCalibPID_NN_v2", db=
""))
342 acc.getEventAlgo(
"AlgTRTMonitoringRun3RAW").doExpert =
True
343 acc.getEventAlgo(
"AlgTRTMonitoringRun3RAW").doEfficiency =
True
349 acc.getService(
"PoolSvc").ReadCatalog += [
"xmlcatalog_file:/det/dqm/GlobalMonitoring/PoolFileCatalog_M7/PoolFileCatalog.xml"]
355 sys.exit(0
if sc.isSuccess()
else 1)