3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import BeamType
9 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonCaloTagToolCfg
11 kwargs.setdefault(
"MuonCombinedInDetExtensionTool",
13 kwargs.setdefault(
"TagMap",
"caloTagMap")
14 kwargs.setdefault(
"CombinedTrackCollection",
"")
15 kwargs.setdefault(
"METrackCollection",
"")
16 kwargs.setdefault(
"usePRDs",
False)
17 alg = CompFactory.MuonCombinedInDetExtensionAlg(name, **kwargs)
18 result.addEventAlgo(alg, primary=
True)
23 kwargs.setdefault(
"TagMap",
"caloTagMap_LRT")
24 kwargs.setdefault(
"InDetCandidateLocation",
"TrackParticleCandidateLRT")
29 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonSegmentTagToolCfg
31 muon_segment_tag_tool = result.popPrivateTools()
32 kwargs.setdefault(
"MuonSegmentTagTool", muon_segment_tag_tool)
33 kwargs.setdefault(
"InDetCandidateLocation",
34 "InDetCandidates" if not flags.MuonCombined.doCombinedFit
else "InDetCandidatesSystemExtened")
35 alg = CompFactory.MuonSegmentTagAlg(name, **kwargs)
36 result.addEventAlgo(alg, primary=
True)
41 kwargs.setdefault(
"TagMap",
"segmentTagMap_LRT")
42 kwargs.setdefault(
"InDetCandidateLocation",
"TrackParticleCandidateLRT"
43 if not flags.MuonCombined.doCombinedFit
else "InDetCandidateLRT_SystemExtended")
48 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonInsideOutRecoToolCfg
50 kwargs.setdefault(
"MuonCombinedInDetExtensionTool",
52 kwargs.setdefault(
"usePRDs",
True)
53 kwargs.setdefault(
"HasCSC", flags.Detector.GeometryCSC)
54 kwargs.setdefault(
"HasSTgc", flags.Detector.GeometrysTGC)
55 kwargs.setdefault(
"HasMM", flags.Detector.GeometryMM)
56 kwargs.setdefault(
"TagMap",
"muGirlTagMap")
57 kwargs.setdefault(
"SegmentCollection",
"MuGirlSegments")
58 kwargs.setdefault(
"TGCPrepDataLocation",
59 'TGC_MeasurementsAllBCs' if not flags.Muon.useTGCPriorNextBC
else 'TGC_Measurements')
60 kwargs.setdefault(
"InDetCandidateLocation",
61 "InDetCandidates" if not flags.MuonCombined.doCombinedFit
else "InDetCandidatesSystemExtened")
63 alg = CompFactory.MuonCombinedInDetExtensionAlg(name, **kwargs)
64 result.addEventAlgo(alg, primary=
True)
69 kwargs.setdefault(
"TagMap",
"MuGirlMap_LRT")
70 kwargs.setdefault(
"METrackCollection",
"MuGirlMETracks_LRT")
71 kwargs.setdefault(
"SegmentCollection",
"MuGirlSegments_LRT")
72 kwargs.setdefault(
"CombinedTrackCollection",
73 "MuGirlCombinedMuonContainerLRT")
74 kwargs.setdefault(
"InDetCandidateLocation",
"TrackParticleCandidateLRT"
75 if not flags.MuonCombined.doCombinedFit
else "InDetCandidateLRT_SystemExtended")
80 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonStauRecoToolCfg
82 kwargs.setdefault(
"MuonCombinedInDetExtensionTool",
84 kwargs.setdefault(
"TagMap",
"stauTagMap")
85 kwargs.setdefault(
"HasCSC", flags.Detector.GeometryCSC)
86 kwargs.setdefault(
"HasSTgc",
False)
87 kwargs.setdefault(
"HasMM",
False)
91 kwargs.setdefault(
"TGCPrepDataLocation",
'TGC_Measurements')
92 kwargs.setdefault(
"CombinedTrackCollection",
"MuGirlStauCombinedTracks")
93 kwargs.setdefault(
"METrackCollection",
"")
94 kwargs.setdefault(
"SegmentCollection",
"TrkStauSegments")
95 kwargs.setdefault(
"InDetCandidateLocation",
96 "InDetCandidates" if not flags.MuonCombined.doCombinedFit
else "InDetCandidatesStaus")
97 alg = CompFactory.MuonCombinedInDetExtensionAlg(name, **kwargs)
98 result.addEventAlgo(alg, primary=
True)
103 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonCandidateToolCfg
108 from CaloTools.CaloNoiseCondAlgConfig
import CaloNoiseCondAlgCfg
112 if flags.Beam.Type
is BeamType.Cosmics:
113 tool_kwargs.setdefault(
"ExtrapolationStrategy", 1)
116 kwargs.setdefault(
"MuonCandidateTool", acc.popPrivateTools())
119 alg = CompFactory.MuonCombinedMuonCandidateAlg(name, **kwargs)
120 result.addEventAlgo(alg, primary=
True)
127 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import EMEO_CombinedMuonTrackBuilderCfg
128 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonCandidateToolCfg
130 track_builder = result.popToolsAndMerge(
133 name=
"MuonCandidateTool_EMEO",
134 TrackBuilder=track_builder,
137 candidate_tool = result.popToolsAndMerge(acc)
138 alg = CompFactory.MuonCombinedMuonCandidateAlg(name,
139 MuonCandidateTool=candidate_tool,
140 MuonSpectrometerTrackParticleLocation=
"EMEO_MuonSpectrometerTrackParticles",
141 MuonCandidateLocation=
"MuonCandidates_EMEO",
142 MSOnlyExtrapolatedTrackLocation=
"EMEO_MSOnlyExtrapolatedTracks")
143 result.addEventAlgo(alg, primary=
True)
149 from InDetConfig.InDetTrackSelectorToolConfig
import MuonCombinedInDetDetailedTrackSelectorToolCfg, MuonCombinedInDetDetailedForwardTrackSelectorToolCfg
150 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonSystemExtensionToolCfg
152 kwargs.setdefault(
"TrackSelector", result.popPrivateTools())
153 if flags.MuonCombined.doSiAssocForwardMuons
and flags.Tracking.doForwardTracks:
154 kwargs.setdefault(
"DoSiliconAssocForwardMuons",
True)
155 kwargs.setdefault(
"InDetForwardTrackSelector", result.popToolsAndMerge(
158 muon_ext_tool = result.popToolsAndMerge(
160 kwargs.setdefault(
"MuonSystemExtensionTool", muon_ext_tool)
164 kwargs.setdefault(
"ExtendBulk",
not flags.MuonCombined.doCombinedFit)
166 if flags.Reco.EnableCaloExtension
and not flags.Muon.MuonTrigger:
167 kwargs.setdefault(
"CaloExtensionLocation", [
"ParticleCaloExtension"])
169 alg = CompFactory.MuonCombinedInDetCandidateAlg(name, **kwargs)
170 result.addEventAlgo(alg, primary=
True)
176 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonSystemExtensionToolCfg
177 muon_ext_tool = result.popToolsAndMerge(
179 kwargs.setdefault(
"MuonSystemExtensionTool", muon_ext_tool)
180 kwargs.setdefault(
"noNSWforSeeding",
True)
181 kwargs.setdefault(
"WriteStauCandidates",
"InDetCandidatesStausPrompt"
182 if flags.Tracking.doLargeD0
else "InDetCandidatesStaus")
184 if not flags.Muon.MuonTrigger:
185 from MuonConfig.MuonSegmentFindingConfig
import MuonLayerHoughAlgCfg
187 kwargs.setdefault(
"UseOnlyHitSectors",
188 not flags.Muon.MuonTrigger
and flags.Beam.Type
is BeamType.Collisions)
189 alg = CompFactory.MuonInDetToMuonSystemExtensionAlg(name, **kwargs)
190 result.addEventAlgo(alg, primary=
True)
195 kwargs.setdefault(
"WriteStauCandidates",
"InDetCandidatesStausLRT")
196 kwargs.setdefault(
"WriteInDetCandidates",
197 "InDetCandidateLRT_SystemExtended")
198 kwargs.setdefault(
"InputInDetCandidates",
"TrackParticleCandidateLRT")
199 kwargs.setdefault(
"CombinedTagMap",
"muidcoTagMap_LRT")
204 from InDetConfig.InDetTrackSelectorToolConfig
import MuonCombinedInDetDetailedForwardTrackSelectorToolCfg, MuonCombinedInDetDetailedTrackSelectorTool_LRTCfg
207 kwargs.setdefault(
"TrackSelector", result.popToolsAndMerge(
212 kwargs.setdefault(
"TrackParticleLocation", [
"InDetLargeD0TrackParticles"])
213 kwargs.setdefault(
"InDetCandidateLocation",
"TrackParticleCandidateLRT")
214 kwargs.setdefault(
"DoSiliconAssocForwardMuons",
False)
216 kwargs.setdefault(
"InDetForwardTrackSelector", result.popToolsAndMerge(
219 if flags.Reco.EnableCaloExtension
and not flags.Muon.MuonTrigger:
220 kwargs.setdefault(
"CaloExtensionLocation", [
221 "ParticleCaloExtension_LRT"])
223 result.merge(cand_alg)
228 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonCombinedToolCfg
230 kwargs.setdefault(
"MuonCombinedTool", result.popToolsAndMerge(
235 for h
in kwargs[
'MuonCombinedTool'].MuonCombinedTagTools:
236 if str(h).
find(
'FitTagTool') >= 0:
237 tagmaps.append(
'muidcoTagMap')
238 elif str(h).
find(
'StacoTagTool') >= 0:
239 tagmaps.append(
'stacoTagMap')
240 kwargs.setdefault(
"CombinedTagMaps", tagmaps)
241 alg = CompFactory.MuonCombinedAlg(name, **kwargs)
242 result.addEventAlgo(alg, primary=
True)
247 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import EMEO_MuonCombinedToolCfg
249 kwargs.setdefault(
"MuonCombinedTool", result.popToolsAndMerge(
251 kwargs.setdefault(
"CombinedTagMaps", [
252 "muidcoTagMap_EMEO",
"stacoTagMap_EMEO"])
253 kwargs.setdefault(
"MuidCombinedTracksLocation",
"MuidCombinedTracks_EMEO")
254 kwargs.setdefault(
"MuidMETracksLocation",
"MuidMETracks_EMEO")
255 kwargs.setdefault(
"MuonCandidateLocation",
"MuonCandidates_EMEO")
256 alg = CompFactory.MuonCombinedAlg(name, **kwargs)
257 result.addEventAlgo(alg, primary=
True)
262 kwargs.setdefault(
"InDetCandidateLocation",
"TrackParticleCandidateLRT")
263 kwargs.setdefault(
"CombinedTagMaps", [
264 "muidcoTagMap_LRT",
"stacoTagMap_LRT"])
265 kwargs.setdefault(
"MuidCombinedTracksLocation",
"MuidCombinedTracks_LRT")
266 kwargs.setdefault(
"MuidMETracksLocation",
"MuidMETracks_LRT")
271 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonCreatorToolCfg
273 kwargs.setdefault(
"MuonCreatorTool", result.popPrivateTools())
278 if flags.MuonCombined.doMuGirl:
279 tag_maps += [
"muGirlTagMap"]
280 if flags.MuonCombined.doStatisticalCombination:
281 tag_maps += [
"stacoTagMap"]
282 if flags.MuonCombined.doCombinedFit:
283 tag_maps += [
"muidcoTagMap"]
284 if flags.MuonCombined.doCaloTrkMuId:
285 tag_maps += [
"caloTagMap"]
286 if flags.MuonCombined.doMuonSegmentTagger:
287 tag_maps += [
"segmentTagMap"]
288 kwargs.setdefault(
"TagMaps", tag_maps)
289 if flags.Muon.MuonTrigger:
290 kwargs.setdefault(
"MakeClusters",
False)
291 kwargs.setdefault(
"ClusterContainerName",
"")
292 kwargs.setdefault(
"SegmentContainerName",
"")
293 kwargs.setdefault(
"TagToSegmentKey",
"")
294 if flags.Muon.SAMuonTrigger:
295 kwargs.setdefault(
"CreateSAmuons",
True)
296 kwargs.setdefault(
"TagMaps", [])
298 alg = CompFactory.MuonCreatorAlg(name, **kwargs)
299 result.addEventAlgo(alg, primary=
True)
305 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonCreatorToolCfg
306 creatorTool = result.popToolsAndMerge(
308 kwargs.setdefault(
"MuonCreatorTool", creatorTool)
311 if flags.MuonCombined.doMuGirl:
312 tag_maps += [
"MuGirlMap_LRT"]
313 if flags.MuonCombined.doStatisticalCombination:
314 tag_maps += [
"stacoTagMap_LRT"]
315 if flags.MuonCombined.doCombinedFit:
316 tag_maps += [
"muidcoTagMap_LRT"]
317 if flags.MuonCombined.doCaloTrkMuId:
318 tag_maps += [
"caloTagMap_LRT"]
319 if flags.MuonCombined.doMuonSegmentTagger:
320 tag_maps += [
"segmentTagMap_LRT"]
321 kwargs.setdefault(
"TagMaps", tag_maps)
322 kwargs.setdefault(
"MuonContainerLocation",
"MuonsLRT")
323 kwargs.setdefault(
"ExtrapolatedLocation",
"ExtraPolatedMuonsLRT")
324 kwargs.setdefault(
"MSOnlyExtrapolatedLocation",
325 "MSOnlyExtraPolatedMuonsLRT")
326 kwargs.setdefault(
"CombinedLocation",
"CombinedMuonsLRT")
327 kwargs.setdefault(
"BuildSlowMuon",
False)
328 kwargs.setdefault(
"MakeClusters",
False)
329 kwargs.setdefault(
"ClusterContainerName",
"")
335 muon_maps = [
"MuonCandidates_EMEO"]
337 if flags.MuonCombined.doStatisticalCombination:
338 combined_maps += [
"stacoTagMap_EMEO"]
339 if flags.MuonCombined.doCombinedFit:
340 combined_maps += [
"muidcoTagMap_EMEO"]
341 kwargs.setdefault(
"TagMaps", combined_maps)
342 kwargs.setdefault(
"MuonCandidateLocation", muon_maps)
343 kwargs.setdefault(
"MuonContainerLocation",
"EMEO_Muons")
344 kwargs.setdefault(
"ExtrapolatedLocation",
"EMEO_ExtrapolatedMuon")
345 kwargs.setdefault(
"MSOnlyExtrapolatedLocation",
346 "EMEO_MSOnlyExtrapolatedMuon")
347 kwargs.setdefault(
"CombinedLocation",
"EMEO_CombinedMuon")
348 kwargs.setdefault(
"BuildSlowMuon",
False)
349 kwargs.setdefault(
"MakeClusters",
False)
350 kwargs.setdefault(
"ClusterContainerName",
"")
355 from MuonCombinedConfig.MuonCombinedRecToolsConfig
import MuonCreatorToolCfg
357 flags, BuildStauContainer=
True, name=
'StauCreatorTool')
358 kwargs.setdefault(
"MuonCreatorTool", result.popPrivateTools())
359 kwargs.setdefault(
"MuonContainerLocation",
"Staus")
360 kwargs.setdefault(
"CombinedLocation",
"CombinedStau")
361 kwargs.setdefault(
"ExtrapolatedLocation",
"ExtrapolatedStau")
362 kwargs.setdefault(
"MSOnlyExtrapolatedLocation",
"MSOnlyExtrapolatedStau")
363 kwargs.setdefault(
"MuonCandidateLocation", [])
364 kwargs.setdefault(
"SegmentContainerName",
"StauSegments")
365 kwargs.setdefault(
"TagToSegmentKey",
"")
366 kwargs.setdefault(
"BuildSlowMuon", 1)
367 kwargs.setdefault(
"ClusterContainerName",
"SlowMuonClusterCollection")
368 kwargs.setdefault(
"TagMaps", [
"stauTagMap"])
376 kwargs.setdefault(
"saveUnusedSegments",
377 flags.MuonCombined.writeUnAssocSegments)
379 if flags.MuonCombined.doMuGirl:
380 tag_maps += [
"muGirlTagMap"]
381 if flags.MuonCombined.doStatisticalCombination:
382 tag_maps += [
"stacoTagMap"]
383 if flags.MuonCombined.doCombinedFit:
384 tag_maps += [
"muidcoTagMap"]
385 if flags.MuonCombined.doMuonSegmentTagger:
386 tag_maps += [
"segmentTagMap"]
387 muon_maps = [
"MuonCandidates"]
388 if flags.Muon.runCommissioningChain:
389 if flags.MuonCombined.doStatisticalCombination:
390 tag_maps += [
"stacoTagMap_EMEO"]
391 if flags.MuonCombined.doCombinedFit:
392 tag_maps += [
"muidcoTagMap_EMEO"]
393 muon_maps += [
"MuonCandidates_EMEO"]
394 if flags.Tracking.doLargeD0:
395 if flags.MuonCombined.doMuGirl:
396 tag_maps += [
"MuGirlMap_LRT"]
397 if flags.MuonCombined.doStatisticalCombination:
398 tag_maps += [
"stacoTagMap_LRT"]
399 if flags.MuonCombined.doCombinedFit:
400 tag_maps += [
"muidcoTagMap_LRT"]
401 if flags.MuonCombined.doMuonSegmentTagger:
402 tag_maps += [
"segmentTagMap_LRT"]
403 kwargs.setdefault(
"MuonCandidateMaps", muon_maps)
404 kwargs.setdefault(
"TagMaps", tag_maps)
405 from MuonConfig.MuonRecToolsConfig
import MuonAmbiProcessorCfg
406 kwargs.setdefault(
"AmbiguityProcessor", result.popToolsAndMerge(
409 the_alg = CompFactory.MuonSegContainerMergerAlg(name, **kwargs)
410 result.addEventAlgo(the_alg)
417 "ToMerge", [
"InDetCandidatesStausPrompt",
"InDetCandidatesStausLRT"])
418 kwargs.setdefault(
"ToWrite",
"InDetCandidatesStaus")
419 the_alg = CompFactory.MuonInDetExtensionMergerAlg(name, **kwargs)
420 result.addEventAlgo(the_alg, primary=
True)
430 tp_coll = [
"ExtrapolatedMuonTrackParticles",
431 "CombinedMuonTrackParticles",
432 "MSOnlyExtrapolatedMuonTrackParticles"]
433 track_coll = [
"ExtrapolatedMuonTracks",
434 "CombinedMuonTracks",
435 "MSOnlyExtrapolatedTracks"]
436 if flags.Muon.runCommissioningChain:
437 tp_coll += [
"EMEO_ExtrapolatedMuonTrackParticles",
438 "EMEO_CombinedMuonTrackParticles",
439 "EMEO_MSOnlyExtrapolatedMuonTrackParticles"]
440 track_coll += [
"EMEO_ExtrapolatedMuonTracks",
441 "EMEO_CombinedMuonTracks",
442 "EMEO_MSOnlyExtrapolatedTracks"]
443 if flags.MuonCombined.doMuGirl
and flags.MuonCombined.doMuGirlLowBeta:
444 tp_coll += [
"CombinedStauTrackParticles",
445 "ExtrapolatedStauTrackParticles"]
446 track_coll += [
"CombinedStauTracks",
447 "ExtrapolatedStauTracks"]
448 if flags.Tracking.doLargeD0:
449 tp_coll += [
"CombinedMuonsLRTTrackParticles",
450 "ExtraPolatedMuonsLRTTrackParticles",
451 "MSOnlyExtraPolatedMuonsLRTTrackParticles"]
452 track_coll += [
"CombinedMuonsLRTTracks",
453 "ExtraPolatedMuonsLRTTracks",
454 "MSOnlyExtraPolatedMuonsLRTTrackParticlesTracks"]
455 return tp_coll, track_coll
460 the_alg = CompFactory.MuonTrkIDMSScatterDecorAlg(name=name, **kwargs)
461 result.addEventAlgo(the_alg)
467 the_alg = CompFactory.MuonTrkAEOTDecorationAlg(name=name, **kwargs)
468 result.addEventAlgo(the_alg)
474 the_alg = CompFactory.MuonPrecisionLayerDecorAlg(name=name, **kwargs)
475 result.addEventAlgo(the_alg)
481 trk_cols = [
"ExtrapolatedMuonTrackParticles",
482 "CombinedMuonTrackParticles",
483 "MSOnlyExtrapolatedMuonTrackParticles"]
484 stau_coll = [
"CombinedStauTrackParticles",
485 "ExtrapolatedStauTrackParticles"]
if flags.MuonCombined.doMuGirl
and flags.MuonCombined.doMuGirlLowBeta
else []
486 track_coll_lrt = [
"CombinedMuonsLRTTrackParticles",
487 "ExtraPolatedMuonsLRTTrackParticles",
488 "MSOnlyExtraPolatedMuonsLRTTrackParticles"]
if flags.Tracking.doLargeD0
else []
491 for coll
in trk_cols + stau_coll + track_coll_lrt:
493 TrackContainer=coll))
496 TrackContainer=coll))
498 prec_trk_cols = [
"ExtrapolatedMuonTrackParticles",
499 "CombinedMuonTrackParticles",
500 "MSOnlyExtrapolatedMuonTrackParticles"]
502 MuonContainer=
"Muons",
503 TrackContainer=prec_trk_cols))
504 if flags.MuonCombined.doMuGirl
and flags.MuonCombined.doMuGirlLowBeta:
507 MuonContainer=
"Staus",
508 TrackContainer=stau_coll))
509 if flags.Tracking.doLargeD0:
512 MuonContainer=
"MuonsLRT",
513 TrackContainer=track_coll_lrt))
522 from MuonConfig.MuonTruthAlgsConfig
import MuonDetailedTrackTruthMakerCfg
524 TrackCollectionNames=trk_cols))
526 for i
in range(len(trk_cols)):
527 from TrkConfig.TrkTruthAlgsConfig
import TrackTruthSelectorCfg, TrackParticleTruthAlgCfg
530 TrackParticleName=particle_cols[i]))
539 from MuonConfig.MuonTruthAlgsConfig
import MuonTruthAssociationAlgCfg
542 if flags.Tracking.doLargeD0:
544 MuonContainerName=
"MuonsLRT",
545 RecoLinkName=
"recoMuonLinkLRT",
546 TrackContainers=trk_cols))
548 if flags.Muon.runCommissioningChain:
550 MuonContainerName=
"EMEO_Muons",
552 TrackContainers=trk_cols))
554 if flags.MuonCombined.doMuGirl
and flags.MuonCombined.doMuGirlLowBeta:
556 MuonContainerName=
"Staus",
558 TrackContainers=trk_cols))
563 from OutputStreamAthenaPool.OutputStreamConfig
import addToESD, addToAOD
567 from TrkEventCnvTools.TrkEventCnvToolsConfig
import (
568 TrkEventCnvSuperToolCfg)
574 for track_pt
in 500, 1000:
575 for cone_str
in "",
"LooseCone":
576 name = f
"Nonprompt_All_MaxWeightTTVA{cone_str}_pt{track_pt}"
577 iso_vars += [
"ptconeCorrBitset_"+name,
578 "ptconecoreTrackPtrCorrection_"+name]
579 for cone_size
in 20, 30, 40:
580 for var_str
in "",
"var":
581 iso_vars.append(f
"pt{var_str}cone{cone_size}_{name}")
585 aod_items += [
"xAOD::MuonSegmentContainer#MuonSegments"]
586 aod_items += [
"xAOD::MuonSegmentAuxContainer#MuonSegmentsAux."]
587 if flags.MuonCombined.writeUnAssocSegments:
588 aod_items += [
"xAOD::MuonSegmentContainer#UnAssocMuonSegments"]
589 aod_items += [
"xAOD::MuonSegmentAuxContainer#UnAssocMuonSegmentsAux."]
590 if flags.MuonCombined.doMuGirlLowBeta:
591 aod_items += [
"xAOD::MuonSegmentContainer#StauSegments"]
592 aod_items += [
"xAOD::MuonSegmentAuxContainer#StauSegmentsAux."]
595 if flags.Detector.EnableCalo:
596 aod_items += [
"xAOD::CaloClusterContainer#MuonClusterCollection"]
597 aod_items += [
"xAOD::CaloClusterAuxContainer#MuonClusterCollectionAux."]
598 aod_items += [
"CaloClusterCellLinkContainer#MuonClusterCollection_links"]
599 from CaloRec.CaloThinCellsByClusterAlgConfig
import CaloThinCellsByClusterAlgCfg
601 clusters=
"MuonClusterCollection",
602 samplings=[
"TileGap1",
"TileGap2",
"TileGap3",
"TileBar0",
"TileExt0",
"HEC0"]))
605 excludedAuxData =
'-clusterAssociation'
606 aod_items += [
"xAOD::TrackParticleContainer#"+col
for col
in particle_col]
607 aod_items += [
"xAOD::TrackParticleAuxContainer#"+col +
608 "Aux." + excludedAuxData
for col
in particle_col]
610 aod_items += [
"xAOD::MuonContainer#Muons"]
611 aod_items += [
"xAOD::MuonContainer#MuonsLRT"]
614 wp_decors = [
"DFCommonMuonsTight",
"DFCommonGoodMuon",
"DFCommonMuonsMedium",
615 "DFCommonMuonsLoose",
"InnerDetectorPt",
"MuonSpectrometerPt",
"isMedium_DRAWZmumu"]
618 gpf_vars = [
"chargedGlobalFELinks",
"neutralGlobalFELinks",
619 "deltaR_muon_clus_GlobalFEalg",
"muon_efrac_matched_GlobalFE"]
621 excludedMuonAuxData =
".-"+
".-".
join(iso_vars+wp_decors+gpf_vars)
623 aod_items += [
"xAOD::MuonAuxContainer#MuonsAux" + excludedMuonAuxData]
624 aod_items += [
"xAOD::MuonAuxContainer#MuonsLRTAux" + excludedMuonAuxData]
627 aod_items += [
"xAOD::MuonContainer#Staus"]
628 aod_items += [
"xAOD::MuonAuxContainer#StausAux" + excludedMuonAuxData]
629 aod_items += [
"xAOD::SlowMuonContainer#SlowMuons"]
630 aod_items += [
"xAOD::SlowMuonAuxContainer#SlowMuonsAux."]
632 if flags.Muon.runCommissioningChain:
633 aod_items += [
"xAOD::MuonContainer#EMEO_Muons"]
634 aod_items += [
"xAOD::MuonAuxContainer#EMEO_MuonsAux" +
639 esd_items = [
"TrackCollection#"+col
for col
in trk_col]
640 esd_items += [
"Trk::SegmentCollection#TrkMuonSegments"]
641 if flags.MuonCombined.writeUnAssocSegments:
642 esd_items += [
"Trk::SegmentCollection#UnAssocMuonTrkSegments"]
645 esd_items += [
"DetailedTrackTruthCollection#ExtrapolatedMuonTracksTruth"]
646 esd_items += [
"DetailedTrackTruthCollection#CombinedMuonTracksTruth"]
647 esd_items += [
"DetailedTrackTruthCollection#ExtrapolatedMuonTrackParticlesTruth"]
648 esd_items += [
"DetailedTrackTruthCollection#CombinedMuonTrackParticlesTruth"]
650 if flags.MuonCombined.doCosmicSplitTracks:
651 esd_items += [
"TrackCollection#Combined_Tracks_split"]
652 esd_items += [
"TrackCollection#Tracks_split"]
653 esd_items += [
"Rec::TrackParticleContainer#TrackParticleCandidate_split"]
655 esd_items += aod_items
657 result.merge(
addToESD(flags, esd_items))
658 result.merge(
addToAOD(flags, aod_items))
675 from MuonConfig.MuonGeometryConfig
import MuonIdHelperSvcCfg
680 from CaloRec.CaloTopoClusterConfig
import CaloTopoClusterCfg
682 from TrackToCalo.CaloExtensionBuilderAlgCfg
import CaloExtensionBuilderCfg
685 from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig
import TrackingGeometryCondAlgCfg
687 from MuonConfig.MuonRecToolsConfig
import MuonEDMHelperSvcCfg
691 from TrkConfig.TrackCollectionReadConfig
import TrackCollectionReadCfg
696 if flags.MuonCombined.doMuGirl
or \
697 flags.MuonCombined.doStatisticalCombination
or \
698 flags.MuonCombined.doCaloTrkMuId
or \
699 flags.MuonCombined.doCombinedFit
or \
700 flags.MuonCombined.doMuonSegmentTagger:
703 if flags.Tracking.doLargeD0:
708 if flags.MuonCombined.doStatisticalCombination
or flags.MuonCombined.doCombinedFit:
710 if flags.Tracking.doLargeD0:
714 if flags.MuonCombined.doCombinedFit:
716 if flags.Tracking.doLargeD0:
718 if flags.MuonCombined.doMuGirl:
721 InDetCandidateLocation=
"InDetCandidates"
722 if not flags.MuonCombined.doCombinedFit
else "InDetCandidatesSystemExtened"))
723 if flags.MuonCombined.doMuGirlLowBeta:
724 if flags.Tracking.doLargeD0:
729 if flags.Tracking.doLargeD0:
732 if flags.MuonCombined.doCaloTrkMuId:
734 if flags.Tracking.doLargeD0:
737 if flags.MuonCombined.doMuonSegmentTagger:
739 if flags.Tracking.doLargeD0:
742 if flags.Muon.runCommissioningChain:
747 from MuonConfig.MuonSegmentFindingConfig
import MuonSegmentCnvAlgCfg
749 SegmentContainerName=
"TrkMuonSegments",
750 xAODContainerName=
"MuonSegments"))
751 if flags.MuonCombined.writeUnAssocSegments:
753 SegmentContainerName=
"UnAssocMuonTrkSegments",
754 xAODContainerName=
"UnAssocMuonSegments"))
755 if flags.MuonCombined.doMuGirlLowBeta:
757 SegmentContainerName=
"TrkStauSegments",
758 xAODContainerName=
"StauSegments"))
759 if flags.Muon.runCommissioningChain:
763 if flags.Tracking.doLargeD0:
766 if flags.MuonCombined.doMuGirlLowBeta:
772 from MuonConfig.MuonRecToolsConfig
import MuonTrackScoringToolCfg
773 result.addPublicTool(result.popToolsAndMerge(
775 from TrkConfig.TrkTrackSummaryToolConfig
import MuonCombinedTrackSummaryToolCfg
776 result.addPublicTool(result.popToolsAndMerge(
783 if 'MuonSegments' not in flags.Input.Collections:
785 from MuonConfig.MuonTruthAlgsConfig
import MuonSegmentTruthAssociationAlgCfg
788 result.addEventAlgo(CompFactory.ClusterMatching.CaloClusterMatchLinkAlg(
789 "MuonTCLinks", ClustersToDecorate=
"MuonClusterCollection"))
797 if __name__ ==
"__main__":
801 from MuonConfig.MuonConfigUtils
import SetupMuonStandaloneCA
802 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
804 args = flags.fillFromArgs()
808 flags.Input.Files = [
809 '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonCombinedConfig/myESD_q445_unslimmedTracks.pool.root']
812 flags.IOVDb.GlobalTag =
"OFLCOND-MC23-SDR-RUN3-05"
814 flags.Muon.useTGCPriorNextBC =
False
816 flags.MuonCombined.doMuGirlLowBeta =
False
823 from MuonConfig.MuonPrepDataConvConfig
import MuonPrepDataConvCfg
833 'MuonInDetToMuonSystemExtensionAlg').UseOnlyHitSectors =
False
848 from SGComps.AddressRemappingConfig
import AddressRemappingCfg
850 rename_maps = [
'%s#%s->%s' % (
"xAOD::MuonContainer",
"Muons",
"old_Muons"),
851 '%s#%s->%s' % (
"xAOD::MuonAuxContainer",
852 "MuonsAux.",
"old_MuonsAux."),
853 '%s#%s->%s' % (
"xAOD::MuonContainer",
854 "Muons.rpcHitIdentifier",
"old_Muons.rpcHitIdentifier"),
855 '%s#%s->%s' % (
"xAOD::TruthParticleContainer",
856 "MuonTruthParticles.recoMuonLink",
"MuonTruthParticles.old_recoMuonLink")
863 cfg.printConfig(withDetails=
True, summariseProps=
True)
868 if not args.config_only:
870 if not sc.isSuccess():
872 sys.exit(
"Execution failed")