9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
10 from AthenaConfiguration.ComponentFactory
import CompFactory
14 from AthenaConfiguration.Enums
import LHCPeriod
15 isRun3 = flags.GeoModel.Run == LHCPeriod.Run3
20 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import TriggerSkimmingToolCfg
22 name =
"MuonNoAlgTrig_TriggerSkimmingTool",
23 TriggerListOR = [
"HLT_noalg_L1MU.*",
25 "HLT_noalg_L1TGC_BURST",
26 "HLT_noalg_L1XE.*" ]
if isRun3
else [
35 "HLT_noalg_L12MU10"]))
42 name =
"OrthoTrig_TriggerSkimmingTool",
43 TriggerListOR = [
"HLT_xe.*",
45 "HLT_j[0-9]*_(jes|lcw|nojcalib|sub|L1RD0|280eta320|320eta490).*",
46 "HLT_[0-9]?j[0-9]*_b.*|j[0-9]*_[0-9]j[0-9]*_b.*",
48 "HLT_[0-9]?e[0-9]*_(iloose|loose|medium|lhloose|lhmedium|lhtight|etcut)",
49 "HLT_[0-9]?e[0-9]*_(iloose|loose|medium|lhloose|lhmedium|lhtight|etcut)_(iloose|nod0|HLTCalo|cu\
50 td0dphideta|smooth|L1EM[0-9]*VH|L1EM[0-9]*)",
51 "HLT_[0-9]?e[0-9]*_(iloose|loose|medium|lhloose|lhmedium|lhtight)_(iloose|nod0|HLTCalo|cutd0dph\
52 ideta|smooth)_(HLTCalo|iloose|L1EM[0-9]*VH|L1EM[0-9]*)",
53 "HLT_[0-9]?g[0-9]*_(loose|medium|tight|etcut)",
54 "HLT_g[0-9]*_(loose|etcut)_(L1EM[0-9]*|L1EM[0-9]*VH)",
55 "HLT_(e|g)[0-9]*_(loose|medium|lhmedium|tight)_g.*",
59 "HLT_mb.*"]
if not isRun3
else [
63 "HLT_j[0-9]*_(pf_ftf|a10).*",
64 "HLT_[0-9]?j[0-9]*_b.*|j[0-9]*_[0-9]j[0-9]*_b.*",
66 "HLT_[0-9]?e[0-9]*_(lhvloose|lhloose|lhmedium|lhtight|etcut)",
67 "HLT_[0-9]?g[0-9]*_(loose|medium|tight|etcut)",
68 "HLT_(e|g)[0-9]*_(loose|medium|lhmedium|tight)_g.*",
76 "HLT_noalg_L1XE.*"] ))
80 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import xAODStringSkimmingToolCfg
82 name =
"OrthoTrig_LowpTMuonEventStringSkimmingTool",
83 expression =
"(count(Muons.muonType == 0 && Muons.pt > 4*GeV && Muons.pt < 15*GeV) > 0)"))
86 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import PrescaleToolCfg
87 OrthoTrig_LowpTMuonPrescaleSkimmingTool = result.getPrimaryAndMerge(
PrescaleToolCfg(flags,
88 name =
"OrthoTrig_LowpTMuonPrescaleSkimmingTool",
91 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import FilterCombinationANDCfg
93 name=
"OrthoTrig_LowpTMuonEventSkimmingTool",
94 FilterList=[OrthoTrig_LowpTMuonEventStringSkimmingTool,
95 OrthoTrig_LowpTMuonPrescaleSkimmingTool]))
102 name =
"OrthoTrig_MidpTMuonEventSkimmingTool",
103 expression =
"(count(Muons.muonType == 0 && Muons.pt >= 15*GeV) > 0)"))
109 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import FilterCombinationORCfg
111 name=
"OrthoTrig_pTMuonEventSkimmingTool",
112 FilterList=[OrthoTrig_LowpTMuonEventSkimmingTool,
113 OrthoTrig_MidpTMuonEventSkimmingTool]))
116 name=
"OrthoTrig_EventSkimmingTool",
117 FilterList=[OrthoTrig_pTMuonEventSkimmingTool, OrthoTrig_TriggerSkimmingTool]))
123 name =
"JPsiTrig_TriggerSkimmingTool",
124 TriggerListOR = [
"HLT_mu20_2mu0noL1_JpsimumuFS",
125 "HLT_mu18_2mu0noL1_JpsimumuFS",
126 "HLT_mu20_2mu4_JpsimumuL2",
127 "HLT_mu18_2mu4_JpsimumuL2",
128 "HLT_mu6_bJpsi_Trkloose",
129 "HLT_mu18_bJpsi_Trkloose",
130 "HLT_mu4_bJpsi_Trkloose",
131 "HLT_mu20_msonly_mu6noL1_msonly_nscan05"]
if not isRun3
else [
133 "HLT_2mu10_bJpsimumu",
134 "HLT_mu11_mu6_bJpsimumu",
136 "HLT_2mu6_bJpsimumu" ]))
140 JPsiTrig_PrescaleSkimmingTool = result.getPrimaryAndMerge(
PrescaleToolCfg(flags,
141 name =
"JPsiTrig_PrescaleSkimmingTool",
148 name=
"JpsiTrig_EventSkimmingTool",
149 FilterList=[JPsiTrig_PrescaleSkimmingTool,
150 JPsiTrig_TriggerSkimmingTool]))
156 name =
"MuonHLTTrig_TriggerSkimmingTool",
157 TriggerListOR = [
"HLT_mu.*"] ))
163 name =
"MuonHLTTrig_DiMuonEventSkimmingTool",
164 expression =
"( (count(Muons.muonType == 0 && Muons.pt > 25*GeV) > 0) && (count(Muons.muonType == 0 && Muons.pt > 10*GeV) > 1) )"))
170 name =
"MuonHLTTrig_MidpTEventStringSkimmingTool",
171 expression =
"(count(Muons.muonType == 0 && Muons.pt > 25*GeV) > 0)"))
174 MuonHLTTrig_MidpTMuonPrescaleSkimmingTool = result.getPrimaryAndMerge(
PrescaleToolCfg(flags,
175 name =
"MuonHLTTrig_MidpTMuonPrescaleSkimmingTool",
180 name=
"MuonHLTTrig_MidpTMuonEventSkimmingTool",
181 FilterList=[MuonHLTTrig_MidpTEventStringSkimmingTool,
182 MuonHLTTrig_MidpTMuonPrescaleSkimmingTool]))
186 name=
"MuonHLTTrig_pTMuonEventSkimmingTool",
187 FilterList=[MuonHLTTrig_MidpTMuonEventSkimmingTool,
188 MuonHLTTrig_DiMuonEventSkimmingTool]))
190 name=
"MuonHLTTrig_EventSkimmingTool",
191 FilterList=[MuonHLTTrig_pTMuonEventSkimmingTool,
192 MuonHLTTrig_TriggerSkimmingTool]))
196 name=
"DESDM_MCPEventFilterTool",
197 FilterList=[MuonNoAlgTrig_EventSkimmingTool,
198 OrthoTrig_EventSkimmingTool,
199 JpsiTrig_EventSkimmingTool,
200 MuonHLTTrig_EventSkimmingTool]))
201 result.addPublicTool(EventFilterTool, primary =
True)
206 kwargs.setdefault(
"expression",
"(count(Muons.muonType == 0 && Muons.pt > 5*GeV) > 0)")
207 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import xAODStringSkimmingToolCfg
216 kwargs.setdefault(
"SkimmingTools", EventFilterTool)
217 kwargs.setdefault(
"doChronoStat", flags.Concurrency.NumThreads <= 1)
218 the_alg = CompFactory.DerivationFramework.DerivationKernel(name, **kwargs)
219 result.addEventAlgo(the_alg, primary =
True)
224 from AthenaConfiguration.Enums
import LHCPeriod, MetadataCategory
225 isRun3 = flags.GeoModel.Run == LHCPeriod.Run3
227 container_items = [
"xAOD::EventInfo#*",
"xAOD::EventAuxInfo#*",
229 "xAOD::TrigNavigation#TrigNavigation",
"xAOD::TrigNavigationAuxInfo#TrigNavigationAux.",
230 "xAOD::TrigDecision#xTrigDecision",
"xAOD::TrigDecisionAuxInfo#xTrigDecisionAux.",
231 "xAOD::TrigCompositeContainer#HLTNav_Summary_OnlineSlimmed",
"xAOD::TrigCompositeAuxContainer#HLTNav_Summary_OnlineSlimmedAux.",
232 "xAOD::TrigConfKeys#TrigConfKeys",
"HLT::HLTResult#HLTResult_HLT",
234 "xAOD::VertexContainer#PrimaryVertices",
235 "xAOD::VertexAuxContainer#PrimaryVerticesAux.-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV",
237 "TileDigitsContainer#MuRcvDigitsCnt",
238 "TileRawChannelContainer#MuRcvRawChCnt",
239 "TileMuonReceiverContainer#TileMuRcvCnt",
241 "xAOD::L2StandAloneMuonContainer#HLT_xAOD__L2StandAloneMuonContainer_MuonL2SAInfo",
242 "xAOD::L2StandAloneMuonAuxContainer#HLT_xAOD__L2StandAloneMuonContainer_MuonL2SAInfoAux.",
244 "xAOD::L2CombinedMuonContainer#HLT_xAOD__L2CombinedMuonContainer_MuonL2CBInfo",
245 "xAOD::L2CombinedMuonAuxContainer#HLT_xAOD__L2CombinedMuonContainer_MuonL2CBInfoAux.",
247 "xAOD::L2IsoMuonContainer#HLT_xAOD__L2IsoMuonContainer_MuonL2ISInfo",
248 "xAOD::L2IsoMuonAuxContainer#HLT_xAOD__L2IsoMuonContainer_MuonL2ISInfoAux.",
252 container_items +=[
"xAOD::TruthParticleContainer#MuonTruthParticles",
253 "xAOD::TruthParticleAuxContainer#MuonTruthParticlesAux."]
255 l1_muon = [
"LVL1MuonRoIs",
"LVL1MuonRoIsBCp1",
"LVL1MuonRoIsBCp2",
"LVL1MuonRoIsBCm1",
"LVL1MuonRoIsBCm2",
256 "HLT_xAOD__MuonRoIContainer_L1TopoMuon"]
258 container_items +=[
"xAOD::MuonRoIContainer#{roi}".
format(roi = l1),
259 "xAOD::MuonRoIAuxContainer#{roi}Aux.".
format(roi = l1)
263 xaod_muon = [
"Muons",
265 "HLT_xAOD__MuonContainer_MuonEFInfo",
266 "HLT_xAOD__MuonContainer_MuTagIMO_EF",
267 "HLT_xAOD__MuonContainer_eMuonEFInfo" ]
268 for muon
in xaod_muon:
269 container_items+=[
"xAOD::MuonContainer#{muon}".
format(muon = muon),
270 "xAOD::MuonAuxContainer#{muon}Aux.".
format(muon = muon)]
273 trackParticleAuxExclusions=
"-clusterAssociation.-trackParameterCovarianceMatrices.-parameterX.-parameterY.-parameterZ.-parameterPX.-parameterPY.-parameterPZ.-parameterPosition"
275 if flags.Muon.DESDM_MCP.doAlignmentFormat:
276 trackParticleAuxExclusions=
""
277 track_parts = [
"MuonSpectrometerTrackParticles",
278 "CombinedMuonTrackParticles",
279 "ExtrapolatedMuonTrackParticles",
280 "InDetTrackParticles",
281 "MSOnlyExtrapolatedMuonTrackParticles",
283 "HLT_xAOD__TrackParticleContainer_MuonEFInfo_CombTrackParticles",
284 "HLT_xAOD__TrackParticleContainer_MuonEFInfo_ExtrapTrackParticles",
285 "HLT_xAOD__TrackParticleContainer_MuTagIMO_EF_CombTrackParticles",
286 "HLT_xAOD__TrackParticleContainer_MuTagIMO_EF_ExtrapTrackParticles",
287 "HLT_xAOD__TrackParticleContainer_eMuonEFInfo_CombTrackParticles",
288 "HLT_xAOD__TrackParticleContainer_eMuonEFInfo_ExtrapTrackParticles",
289 "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_MuonIso_EFID",
290 "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Muon_FTF",
291 "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Muon_EFID",
292 "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_MuonIso_FTF"]
293 for trk
in track_parts:
294 container_items +=[
"xAOD::TrackParticleContainer#{trk}".
format(trk = trk),
295 "xAOD::TrackParticleAuxContainer#{trk}Aux.{excl}".
format(trk = trk,
296 excl = trackParticleAuxExclusions )]
297 segment_cont = [
"MuonSegments",
"UnAssocMuonSegments" ] + ([
"xAODNSWSegments"]
if isRun3
else [])
298 for seg
in segment_cont:
299 container_items +=[
"xAOD::MuonSegmentContainer#{seg}".
format(seg = seg),
300 "xAOD::MuonSegmentAuxContainer#{seg}Aux.".
format(seg =seg)]
302 container_items += [
"Muon::RpcPrepDataContainer#*",
"Muon::TgcPrepDataContainer#*",
"Muon::MdtPrepDataContainer#*"]
304 if not isRun3: container_items +=[
"Muon::CscPrepDataContainer#*",
"Muon::CscStripPrepDataContainer#CSC_Measurements"]
305 else: container_items +=[
"Muon::MMPrepDataContainer#*",
306 "Muon::sTgcPrepDataContainer#*",
307 "xAOD::NSWTPRDOContainer#*",
"xAOD::NSWTPRDOAuxContainer#*",
308 "xAOD::NSWMMTPRDOContainer#*",
"xAOD::NSWMMTPRDOAuxContainer#*",
309 "Muon::NSW_PadTriggerDataContainer#*",
310 "Muon::NSW_TrigRawDataContainer#L1_NSWTrigContainer" ,
314 container_items += [
"MuCTPI_RDO#MUCTPI_RDO",
"RpcPadContainer#RPCPAD",
315 "Muon::RpcCoinDataContainer#RPC_triggerHits",
316 "RpcSectorLogicContainer#RPC_SECTORLOGIC"]
318 container_items += [
"Muon::TgcCoinDataContainer#TrigT1CoinDataCollectionPriorBC",
319 "Muon::TgcCoinDataContainer#TrigT1CoinDataCollectionNextBC",
320 "Muon::TgcCoinDataContainer#TrigT1CoinDataCollectionNextNextBC",
321 "Muon::TgcCoinDataContainer#TrigT1CoinDataCollection"]
325 trk_seg_cont = [
"TrkMuonSegments",
"UnAssocMuonTrkSegments"]+ ([
"TrackMuonNSWSegments"]
if isRun3
else [])
326 container_items += [
"Trk::SegmentCollection#{seg}".
format(seg = seg)
for seg
in trk_seg_cont]
328 trk_cont = [
"MuonSpectrometerTracks",
"CombinedMuonTracks",
"MSOnlyExtrapolatedTracks",
"ExtrapolatedMuonTracks" ]
329 container_items += [
"TrackCollection#{trk}".
format(trk = trk)
for trk
in trk_cont]
333 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
334 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
335 kwargs.setdefault(
"ItemList", container_items)
340 kwargs.get(
"streamName"),
341 kwargs.get(
"AcceptAlgs"),
343 MetadataCategory.ByteStreamMetaData,
344 MetadataCategory.CutFlowMetaData,
345 MetadataCategory.LumiBlockMetaData,
346 MetadataCategory.TriggerMenuMetaData,
354 if(flags.Muon.DESDM_MCP.doAlignmentFormat):
355 from AthenaCommon.Logging
import logging
356 msg = logging.getLogger(
"Athena")
357 msg.info(
"DESDM_MCP format will run with doAlignmentFormat True")
359 StreamName =
"DESDM_MCP"
360 SeqName =
"DESDMCPSequence"
361 from AthenaCommon.CFElements
import seqAND
362 result.addSequence(
seqAND(
"DESDMCPSequence"))
364 from DerivationFrameworkMuons.MuonsToolsConfig
import AnalysisMuonThinningAlgCfg
368 StreamName =
"Stream{streamName}".
format(streamName=StreamName),
369 IdTrkFwdThinning =
"",
371 ), sequenceName = SeqName)
373 streamName = StreamName,
374 AcceptAlgs = [
"DESDMCPMuonThinning",
"DESDMCPEventKernel" ]),
375 sequenceName = SeqName)