ATLAS Offline Software
MuonCombinedReconstructionConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.Enums import BeamType
6 
7 
8 def MuonCaloTagAlgCfg(flags, name="MuonCaloTagAlg", **kwargs):
9  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonCaloTagToolCfg
10  result = ComponentAccumulator()
11  kwargs.setdefault("MuonCombinedInDetExtensionTool",
12  result.popToolsAndMerge(MuonCaloTagToolCfg(flags)))
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)
19  return result
20 
21 
22 def LRT_MuonCaloTagAlgCfg(flags, name="MuonCaloTagAlg_LRT", **kwargs):
23  kwargs.setdefault("TagMap", "caloTagMap_LRT")
24  kwargs.setdefault("InDetCandidateLocation", "TrackParticleCandidateLRT")
25  return MuonCaloTagAlgCfg(flags, name, **kwargs)
26 
27 
28 def MuonSegmentTagAlgCfg(flags, name="MuonSegmentTagAlg", **kwargs):
29  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonSegmentTagToolCfg
30  result = MuonSegmentTagToolCfg(flags)
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)
37  return result
38 
39 
40 def LRT_MuonSegmentTagAlgCfg(flags, name="MuonSegmentTagAlg_LRT", **kwargs):
41  kwargs.setdefault("TagMap", "segmentTagMap_LRT")
42  kwargs.setdefault("InDetCandidateLocation", "TrackParticleCandidateLRT"
43  if not flags.MuonCombined.doCombinedFit else "InDetCandidateLRT_SystemExtended")
44  return MuonSegmentTagAlgCfg(flags, name, **kwargs)
45 
46 
47 def MuonInsideOutRecoAlgCfg(flags, name="MuonInsideOutRecoAlg", **kwargs):
48  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonInsideOutRecoToolCfg
49  result = ComponentAccumulator()
50  kwargs.setdefault("MuonCombinedInDetExtensionTool",
51  result.popToolsAndMerge(MuonInsideOutRecoToolCfg(flags)))
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")
62 
63  alg = CompFactory.MuonCombinedInDetExtensionAlg(name, **kwargs)
64  result.addEventAlgo(alg, primary=True)
65  return result
66 
67 
68 def LRT_MuGirlAlgCfg(flags, name="MuGirlAlg_LRT", **kwargs):
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")
76  return MuonInsideOutRecoAlgCfg(flags, name, **kwargs)
77 
78 
79 def MuGirlStauAlgCfg(flags, name="MuGirlStauAlg", **kwargs):
80  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonStauRecoToolCfg
81  result = ComponentAccumulator()
82  kwargs.setdefault("MuonCombinedInDetExtensionTool",
83  result.popToolsAndMerge(MuonStauRecoToolCfg(flags)))
84  kwargs.setdefault("TagMap", "stauTagMap")
85  kwargs.setdefault("HasCSC", flags.Detector.GeometryCSC)
86  kwargs.setdefault("HasSTgc", False)
87  kwargs.setdefault("HasMM", False)
88  # kwargs.setdefault("TGCPrepDataLocation",
89  # 'TGC_MeasurementsAllBCs' if not flags.Muon.useTGCPriorNextBC else 'TGC_Measurements')
90  # This is probably wrong, but matches old-config. #FIXME
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)
99  return result
100 
101 
102 def MuonCombinedMuonCandidateAlgCfg(flags, name="MuonCombinedMuonCandidateAlg", **kwargs):
103  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonCandidateToolCfg
104 
105  result = ComponentAccumulator()
106 
107  # EJWM - not completely sure where this comes from. Perhaps should be retrieved by a sub-tool?
108  from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
109  result.merge(CaloNoiseCondAlgCfg(flags, "totalNoise"))
110 
111  tool_kwargs = {}
112  if flags.Beam.Type is BeamType.Cosmics:
113  tool_kwargs.setdefault("ExtrapolationStrategy", 1)
114 
115  acc = MuonCandidateToolCfg(flags, **tool_kwargs)
116  kwargs.setdefault("MuonCandidateTool", acc.popPrivateTools())
117  result.merge(acc)
118 
119  alg = CompFactory.MuonCombinedMuonCandidateAlg(name, **kwargs)
120  result.addEventAlgo(alg, primary=True)
121  return result
122 
123 
124 def EMEO_MuonCombinedMuonCandidateAlgCfg(flags, name="MuonCombinedMuonCandidateAlg_EMEO"):
125  result = ComponentAccumulator()
126 
127  from MuonCombinedConfig.MuonCombinedRecToolsConfig import EMEO_CombinedMuonTrackBuilderCfg
128  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonCandidateToolCfg
129 
130  track_builder = result.popToolsAndMerge(
132  acc = MuonCandidateToolCfg(flags,
133  name="MuonCandidateTool_EMEO",
134  TrackBuilder=track_builder,
135  Commissioning=True)
136 
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)
144 
145  return result
146 
147 
148 def MuonCombinedInDetCandidateAlgCfg(flags, name="MuonCombinedInDetCandidateAlg", **kwargs):
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(
157 
158  muon_ext_tool = result.popToolsAndMerge(
160  kwargs.setdefault("MuonSystemExtensionTool", muon_ext_tool)
161 
162  # Switch off the muon system extensions if we fit combined muons
163  # The MuonInDetToSystemExtensionAlg will perform the system extensions then
164  kwargs.setdefault("ExtendBulk", not flags.MuonCombined.doCombinedFit)
165 
166  if flags.Reco.EnableCaloExtension and not flags.Muon.MuonTrigger:
167  kwargs.setdefault("CaloExtensionLocation", ["ParticleCaloExtension"])
168 
169  alg = CompFactory.MuonCombinedInDetCandidateAlg(name, **kwargs)
170  result.addEventAlgo(alg, primary=True)
171  return result
172 
173 
174 def MuonInDetToMuonSystemExtensionAlgCfg(flags, name="MuonInDetToMuonSystemExtensionAlg", **kwargs):
175  result = ComponentAccumulator()
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")
183 
184  if not flags.Muon.MuonTrigger:
185  from MuonConfig.MuonSegmentFindingConfig import MuonLayerHoughAlgCfg
186  result.merge(MuonLayerHoughAlgCfg(flags))
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)
191  return result
192 
193 
194 def LRT_MuonInDetToMuonSystemExtensionAlgCfg(flags, name="MuonInDetToMuonSystemExtensionAlg_LRT", **kwargs):
195  kwargs.setdefault("WriteStauCandidates", "InDetCandidatesStausLRT")
196  kwargs.setdefault("WriteInDetCandidates",
197  "InDetCandidateLRT_SystemExtended")
198  kwargs.setdefault("InputInDetCandidates", "TrackParticleCandidateLRT")
199  kwargs.setdefault("CombinedTagMap", "muidcoTagMap_LRT")
200  return MuonInDetToMuonSystemExtensionAlgCfg(flags, name, **kwargs)
201 
202 
203 def LRT_MuonCombinedInDetCandidateAlgCfg(flags, name="MuonCombinedInDetCandidateAlg_LRT", **kwargs):
204  from InDetConfig.InDetTrackSelectorToolConfig import MuonCombinedInDetDetailedForwardTrackSelectorToolCfg, MuonCombinedInDetDetailedTrackSelectorTool_LRTCfg
205  result = ComponentAccumulator()
206 
207  kwargs.setdefault("TrackSelector", result.popToolsAndMerge(
209 
210  # Use the Standard Track particle container in cases where no separate containters will be
211  # saved for the LRT tracking
212  kwargs.setdefault("TrackParticleLocation", ["InDetLargeD0TrackParticles"])
213  kwargs.setdefault("InDetCandidateLocation", "TrackParticleCandidateLRT")
214  kwargs.setdefault("DoSiliconAssocForwardMuons", False)
215 
216  kwargs.setdefault("InDetForwardTrackSelector", result.popToolsAndMerge(
218 
219  if flags.Reco.EnableCaloExtension and not flags.Muon.MuonTrigger:
220  kwargs.setdefault("CaloExtensionLocation", [
221  "ParticleCaloExtension_LRT"])
222  cand_alg = MuonCombinedInDetCandidateAlgCfg(flags, name, **kwargs)
223  result.merge(cand_alg)
224  return result
225 
226 
227 def MuonCombinedAlgCfg(flags, name="MuonCombinedAlg", **kwargs):
228  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonCombinedToolCfg
229  result = ComponentAccumulator()
230  kwargs.setdefault("MuonCombinedTool", result.popToolsAndMerge(
231  MuonCombinedToolCfg(flags)))
232  tagmaps = []
233  # CombinedTagMaps must be in a 1-1 correspondence
234  # with MuonCombinedTagTools.
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)
243  return result
244 
245 
246 def EMEO_MuonCombinedAlgCfg(flags, name="MuonCombinedAlg_EMEO", **kwargs):
247  from MuonCombinedConfig.MuonCombinedRecToolsConfig import EMEO_MuonCombinedToolCfg
248  result = ComponentAccumulator()
249  kwargs.setdefault("MuonCombinedTool", result.popToolsAndMerge(
250  EMEO_MuonCombinedToolCfg(flags)))
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)
258  return result
259 
260 
261 def LRT_MuonCombinedAlgCfg(flags, name="MuonCombinedAlg_LRT", **kwargs):
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")
267  return MuonCombinedAlgCfg(flags, name, **kwargs)
268 
269 
270 def MuonCreatorAlgCfg(flags, name="MuonCreatorAlg", **kwargs):
271  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonCreatorToolCfg
272  result = MuonCreatorToolCfg(flags, name="MuonCreatorTool")
273  kwargs.setdefault("MuonCreatorTool", result.popPrivateTools())
274 
275  # if muGirl is off, remove "muGirlTagMap" from "TagMaps"
276  # but don't set this default in case the StauCreatorAlg is created (see below)
277  tag_maps = []
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", [])
297 
298  alg = CompFactory.MuonCreatorAlg(name, **kwargs)
299  result.addEventAlgo(alg, primary=True)
300  return result
301 
302 
303 def LRT_MuonCreatorAlgCfg(flags, name="MuonCreatorAlg_LRT", **kwargs):
304  result = ComponentAccumulator()
305  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonCreatorToolCfg
306  creatorTool = result.popToolsAndMerge(
307  MuonCreatorToolCfg(flags, "MuonCreatorTool_LRT", RequireIDTrack=True))
308  kwargs.setdefault("MuonCreatorTool", creatorTool)
309  # In cases we want to switch them off we should add the flags here
310  tag_maps = []
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", "")
330  result.merge(MuonCreatorAlgCfg(flags, name=name, **kwargs))
331  return result
332 
333 
334 def EMEO_MuonCreatorAlgCfg(flags, name="MuonCreatorAlg_EMEO", **kwargs):
335  muon_maps = ["MuonCandidates_EMEO"]
336  combined_maps = []
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", "")
351  return MuonCreatorAlgCfg(flags, name=name, **kwargs)
352 
353 
354 def StauCreatorAlgCfg(flags, name="StauCreatorAlg", **kwargs):
355  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonCreatorToolCfg
356  result = 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"])
369  acc = MuonCreatorAlgCfg(flags, name, **kwargs)
370  result.merge(acc)
371  return result # don't have the right algorithm being primary here, but should be okay?
372 
373 
374 def MuonSegContainerMergerAlgCfg(flags, name="MuonSegContainerMergerAlg", **kwargs):
375  result = ComponentAccumulator()
376  kwargs.setdefault("saveUnusedSegments",
377  flags.MuonCombined.writeUnAssocSegments)
378  tag_maps = []
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(
407  MuonAmbiProcessorCfg(flags)))
408 
409  the_alg = CompFactory.MuonSegContainerMergerAlg(name, **kwargs)
410  result.addEventAlgo(the_alg)
411  return result
412 
413 
414 def MuonInDetExtensionMergerAlgCfg(flags, name="MuonInDetExtensionMergerAlg", **kwargs):
415  result = ComponentAccumulator()
416  kwargs.setdefault(
417  "ToMerge", ["InDetCandidatesStausPrompt", "InDetCandidatesStausLRT"])
418  kwargs.setdefault("ToWrite", "InDetCandidatesStaus")
419  the_alg = CompFactory.MuonInDetExtensionMergerAlg(name, **kwargs)
420  result.addEventAlgo(the_alg, primary=True)
421  return result
422 
423 # Returns a pair vectors containing th names of the
424 # track particle collections associated with combined muon tracks
425 
426 
428  tp_coll = []
429  track_coll = []
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
456 
457 
458 def MuonTrkIDMSScatterDecorAlgCfg(flags, name="MuonCombIDMSScatterDecorAlg", **kwargs):
459  result = ComponentAccumulator()
460  the_alg = CompFactory.MuonTrkIDMSScatterDecorAlg(name=name, **kwargs)
461  result.addEventAlgo(the_alg)
462  return result
463 
464 
465 def MuonTrkAEOTDecorAlgCfg(flags, name="MuonCombAEOTDecorAlg", **kwargs):
466  result = ComponentAccumulator()
467  the_alg = CompFactory.MuonTrkAEOTDecorationAlg(name=name, **kwargs)
468  result.addEventAlgo(the_alg)
469  return result
470 
471 
472 def MuonPrecisionLayerDecorAlgCfg(flags, name="MuonPrecisionLayerDecorAlg", **kwargs):
473  result = ComponentAccumulator()
474  the_alg = CompFactory.MuonPrecisionLayerDecorAlg(name=name, **kwargs)
475  result.addEventAlgo(the_alg)
476  return result
477 
478 
480  result = ComponentAccumulator()
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 []
489 
490  # Decorate the muon tracks
491  for coll in trk_cols + stau_coll + track_coll_lrt:
492  result.merge(MuonTrkIDMSScatterDecorAlgCfg(flags, "MuonCombIDMSScatterDecorAlg"+coll,
493  TrackContainer=coll))
494 
495  result.merge(MuonTrkAEOTDecorAlgCfg(flags, "MuonCombAEOTDecorAlg"+coll,
496  TrackContainer=coll))
497  # Proceed with the precision layer decoration
498  prec_trk_cols = ["ExtrapolatedMuonTrackParticles",
499  "CombinedMuonTrackParticles",
500  "MSOnlyExtrapolatedMuonTrackParticles"]
501  result.merge(MuonPrecisionLayerDecorAlgCfg(flags, "MuonCombPrecisionLayerDecorAlg",
502  MuonContainer="Muons",
503  TrackContainer=prec_trk_cols))
504  if flags.MuonCombined.doMuGirl and flags.MuonCombined.doMuGirlLowBeta:
505 
506  result.merge(MuonPrecisionLayerDecorAlgCfg(flags, "MuonCombStauPrecisionLayerDecorAlg",
507  MuonContainer="Staus",
508  TrackContainer=stau_coll))
509  if flags.Tracking.doLargeD0:
510 
511  result.merge(MuonPrecisionLayerDecorAlgCfg(flags, "MuonCombLRTPrecisionLayerDecorAlg",
512  MuonContainer="MuonsLRT",
513  TrackContainer=track_coll_lrt))
514 
515  return result
516 
517 
519  result = ComponentAccumulator()
520  particle_cols, trk_cols = GetCombinedTrkContainers(flags)
521 
522  from MuonConfig.MuonTruthAlgsConfig import MuonDetailedTrackTruthMakerCfg
523  result.merge(MuonDetailedTrackTruthMakerCfg(flags, name="MuonCombinedDetailedTrackTruthMaker",
524  TrackCollectionNames=trk_cols))
525 
526  for i in range(len(trk_cols)):
527  from TrkConfig.TrkTruthAlgsConfig import TrackTruthSelectorCfg, TrackParticleTruthAlgCfg
528  result.merge(TrackTruthSelectorCfg(flags, tracks=trk_cols[i]))
529  result.merge(TrackParticleTruthAlgCfg(flags, tracks=trk_cols[i],
530  TrackParticleName=particle_cols[i]))
531 
532  return result
533 
534 
536  result = ComponentAccumulator()
537  trk_cols = GetCombinedTrkContainers(flags)[0]
538 
539  from MuonConfig.MuonTruthAlgsConfig import MuonTruthAssociationAlgCfg
540  result.merge(MuonTruthAssociationAlgCfg(flags))
541 
542  if flags.Tracking.doLargeD0:
543  result.merge(MuonTruthAssociationAlgCfg(flags, name="MuonTruthAssociationAlgLRT",
544  MuonContainerName="MuonsLRT",
545  RecoLinkName="recoMuonLinkLRT",
546  TrackContainers=trk_cols))
547 
548  if flags.Muon.runCommissioningChain:
549  result.merge(MuonTruthAssociationAlgCfg(flags, name="MuonTruthAssociationAlg_EMEO",
550  MuonContainerName="EMEO_Muons",
551  RecoLinkName="",
552  TrackContainers=trk_cols))
553 
554  if flags.MuonCombined.doMuGirl and flags.MuonCombined.doMuGirlLowBeta:
555  result.merge(MuonTruthAssociationAlgCfg(flags, name="MuonTruthAssociationAlgStau",
556  MuonContainerName="Staus",
557  RecoLinkName="",
558  TrackContainers=trk_cols))
559 
560  return result
561 
563  from OutputStreamAthenaPool.OutputStreamConfig import addToESD, addToAOD
564  result = ComponentAccumulator()
565 
566  # FIXME! Fix for ATLASRECTS-5151. Remove when better solution found.
567  from TrkEventCnvTools.TrkEventCnvToolsConfig import (
568  TrkEventCnvSuperToolCfg)
569  result.merge(TrkEventCnvSuperToolCfg(flags))
570 
571  # Avoid old-style import from from IsolationAlgs.IsoUpdatedTrackCones import iso_vars
572  # But shouldn't be here.
573  iso_vars = []
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}")
582 
583  aod_items = []
584  # Segments
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."]
593 
594  particle_col, trk_col = GetCombinedTrkContainers(flags)
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
600  result.merge(CaloThinCellsByClusterAlgCfg(flags, streamName="StreamAOD",
601  clusters="MuonClusterCollection",
602  samplings=["TileGap1", "TileGap2", "TileGap3", "TileBar0", "TileExt0", "HEC0"]))
603 
604  # Adding the xAOD content by default
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]
609 
610  aod_items += ["xAOD::MuonContainer#Muons"]
611  aod_items += ["xAOD::MuonContainer#MuonsLRT"]
612 
613  # FIXME! Next two lines are hack to remove derivation framework variables that are added by DRAW building and are supposed to be transient
614  wp_decors = ["DFCommonMuonsTight", "DFCommonGoodMuon", "DFCommonMuonsMedium",
615  "DFCommonMuonsLoose", "InnerDetectorPt", "MuonSpectrometerPt", "isMedium_DRAWZmumu"]
616  # Remove GlobalFELinks and related variables - these are links between FlowElement (FE) containers created in jet finding and muons.
617  # Since these transient FE containers are not in the ESD/AOD, we should not write out these links.
618  gpf_vars = ["chargedGlobalFELinks", "neutralGlobalFELinks",
619  "deltaR_muon_clus_GlobalFEalg", "muon_efrac_matched_GlobalFE"]
620 
621  excludedMuonAuxData = ".-"+".-".join(iso_vars+wp_decors+gpf_vars)
622 
623  aod_items += ["xAOD::MuonAuxContainer#MuonsAux" + excludedMuonAuxData]
624  aod_items += ["xAOD::MuonAuxContainer#MuonsLRTAux" + excludedMuonAuxData]
625 
626  # stau
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."]
631 
632  if flags.Muon.runCommissioningChain:
633  aod_items += ["xAOD::MuonContainer#EMEO_Muons"]
634  aod_items += ["xAOD::MuonAuxContainer#EMEO_MuonsAux" +
635  excludedMuonAuxData]
636  # +++++ ESD +++++
637 
638  # Tracks
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"]
643  # Truth
644  if flags.Input.isMC:
645  esd_items += ["DetailedTrackTruthCollection#ExtrapolatedMuonTracksTruth"]
646  esd_items += ["DetailedTrackTruthCollection#CombinedMuonTracksTruth"]
647  esd_items += ["DetailedTrackTruthCollection#ExtrapolatedMuonTrackParticlesTruth"]
648  esd_items += ["DetailedTrackTruthCollection#CombinedMuonTrackParticlesTruth"]
649 
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"]
654 
655  esd_items += aod_items
656 
657  result.merge(addToESD(flags, esd_items))
658  result.merge(addToAOD(flags, aod_items))
659 
660  # Leaving in for the moment, because we might still need this. Will remove once it's confirmed we don't
661  # if flags.Output.doWriteESD:
662  #
663  # if runOnESD:
664  # # Need to make it possible to write Object ... so rename read containers
665  # from AthenaCommon.Logging import log
666  # from SGComps.AddressRemappingConfig import AddressRemappingCfg
667  # rename_maps = list(map(lambda item:'%s->%s' % (item, 'old_'+item.split('#')[1]), esd_items))
668  # log.info('Since we are running on ESD, rename inputs as follows:'+str(rename_maps))
669  # cfg.merge( AddressRemappingCfg(rename_maps) )
670 
671  return result
672 
673 
675  from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg
676 
677  # Many components need these services, so setup once here.
678  result = MuonIdHelperSvcCfg(flags)
679 
680  from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
681  result.merge(CaloTopoClusterCfg(flags))
682  from TrackToCalo.CaloExtensionBuilderAlgCfg import CaloExtensionBuilderCfg
683  result.merge(CaloExtensionBuilderCfg(flags))
684 
685  from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
686  result.merge(TrackingGeometryCondAlgCfg(flags))
687  from MuonConfig.MuonRecToolsConfig import MuonEDMHelperSvcCfg
688  result.merge(MuonEDMHelperSvcCfg(flags))
689 
690  # Set up to read Tracks.
691  from TrkConfig.TrackCollectionReadConfig import TrackCollectionReadCfg
692  result.merge(TrackCollectionReadCfg(flags, 'Tracks'))
693 
694  # We do not need to schedule the Inner detector selector algs if none
695  # of the combined algs executed
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:
701 
702  result.merge(MuonCombinedInDetCandidateAlgCfg(flags))
703  if flags.Tracking.doLargeD0:
704  result.merge(LRT_MuonCombinedInDetCandidateAlgCfg(flags))
705 
706  result.merge(MuonCombinedMuonCandidateAlgCfg(flags))
707 
708  if flags.MuonCombined.doStatisticalCombination or flags.MuonCombined.doCombinedFit:
709  result.merge(MuonCombinedAlgCfg(flags))
710  if flags.Tracking.doLargeD0:
711  result.merge(LRT_MuonCombinedAlgCfg(flags))
712 
713  # Perform system extensions on ID tracks where MuidCo did not succeed
714  if flags.MuonCombined.doCombinedFit:
715  result.merge(MuonInDetToMuonSystemExtensionAlgCfg(flags))
716  if flags.Tracking.doLargeD0:
717  result.merge(LRT_MuonInDetToMuonSystemExtensionAlgCfg(flags))
718  if flags.MuonCombined.doMuGirl:
719  # Use only ID tracks rejected by MuidCo
720  result.merge(MuonInsideOutRecoAlgCfg(flags, name="MuonInsideOutRecoAlg",
721  InDetCandidateLocation="InDetCandidates"
722  if not flags.MuonCombined.doCombinedFit else "InDetCandidatesSystemExtened"))
723  if flags.MuonCombined.doMuGirlLowBeta:
724  if flags.Tracking.doLargeD0:
725  result.merge(MuonInDetExtensionMergerAlgCfg(flags))
726  # Use the InDetCandidateStaus as InDetCandidates as they've also the extensions
727  # from the MuidCo tracks
728  result.merge(MuGirlStauAlgCfg(flags))
729  if flags.Tracking.doLargeD0:
730  result.merge(LRT_MuGirlAlgCfg(flags))
731 
732  if flags.MuonCombined.doCaloTrkMuId:
733  result.merge(MuonCaloTagAlgCfg(flags))
734  if flags.Tracking.doLargeD0:
735  result.merge(LRT_MuonCaloTagAlgCfg(flags))
736 
737  if flags.MuonCombined.doMuonSegmentTagger:
738  result.merge(MuonSegmentTagAlgCfg(flags))
739  if flags.Tracking.doLargeD0:
740  result.merge(LRT_MuonSegmentTagAlgCfg(flags))
741 
742  if flags.Muon.runCommissioningChain:
743  result.merge(EMEO_MuonCombinedMuonCandidateAlgCfg(flags))
744  result.merge(EMEO_MuonCombinedAlgCfg(flags))
745 
746  result.merge(MuonSegContainerMergerAlgCfg(flags))
747  from MuonConfig.MuonSegmentFindingConfig import MuonSegmentCnvAlgCfg
748  result.merge(MuonSegmentCnvAlgCfg(flags, "MuonSegmentCnvAlg",
749  SegmentContainerName="TrkMuonSegments",
750  xAODContainerName="MuonSegments"))
751  if flags.MuonCombined.writeUnAssocSegments:
752  result.merge(MuonSegmentCnvAlgCfg(flags, "UnAssocMuonSegmentCnvAlg",
753  SegmentContainerName="UnAssocMuonTrkSegments",
754  xAODContainerName="UnAssocMuonSegments"))
755  if flags.MuonCombined.doMuGirlLowBeta:
756  result.merge(MuonSegmentCnvAlgCfg(flags, "MuonStauSegmentCnvAlg",
757  SegmentContainerName="TrkStauSegments",
758  xAODContainerName="StauSegments"))
759  if flags.Muon.runCommissioningChain:
760  result.merge(EMEO_MuonCreatorAlgCfg(flags))
761  # runs over outputs and create xAODMuon collection
762  result.merge(MuonCreatorAlgCfg(flags))
763  if flags.Tracking.doLargeD0:
764  result.merge(LRT_MuonCreatorAlgCfg(flags))
765 
766  if flags.MuonCombined.doMuGirlLowBeta:
767  # Has to be at end if not using sequencer. If we drop this requirement, can be moved above
768  result.merge(StauCreatorAlgCfg(flags))
769 
770  # FIXME
771  # I see errors related to unconfigured public tools. This is a quick fix, but should really move to where it is called.
772  from MuonConfig.MuonRecToolsConfig import MuonTrackScoringToolCfg
773  result.addPublicTool(result.popToolsAndMerge(
774  MuonTrackScoringToolCfg(flags)))
775  from TrkConfig.TrkTrackSummaryToolConfig import MuonCombinedTrackSummaryToolCfg
776  result.addPublicTool(result.popToolsAndMerge(
778 
779  # post processing
780  if flags.Input.isMC:
781  result.merge(CombinedMuonTrackTruthAlgsCfg(flags))
782  result.merge(CombinedMuonTruthAssociationAlgsCfg(flags))
783  if 'MuonSegments' not in flags.Input.Collections:
784  # Segment truth association decorations, but only if they are not already there (e.g. when running on ESDs)
785  from MuonConfig.MuonTruthAlgsConfig import MuonSegmentTruthAssociationAlgCfg
786  result.merge(MuonSegmentTruthAssociationAlgCfg(flags))
787 
788  result.addEventAlgo(CompFactory.ClusterMatching.CaloClusterMatchLinkAlg(
789  "MuonTCLinks", ClustersToDecorate="MuonClusterCollection"))
790  result.merge(MuonDecorationAlgsCfg(flags))
791  # Setup output
792  result.merge(CombinedMuonOutputCfg(flags))
793 
794  return result
795 
796 
797 if __name__ == "__main__":
798  # To run this, do e.g.
799  # python -m MuonCombinedConfig.MuonCombinedReconstructionConfig --run --threads=1
800 
801  from MuonConfig.MuonConfigUtils import SetupMuonStandaloneCA
802  from AthenaConfiguration.AllConfigFlags import initConfigFlags
803  flags = initConfigFlags()
804  args = flags.fillFromArgs()
805 
806  # Keep this commented in for now until ATLASRECTS-6858 is fixed
807  # only once !51435 is accepted.
808  flags.Input.Files = [
809  '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonCombinedConfig/myESD_q445_unslimmedTracks.pool.root']
810  # ConfigFlags.Input.Files = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v2/myESD.pool.root']
811 
812  flags.IOVDb.GlobalTag = "OFLCOND-MC23-SDR-RUN3-05"
813 
814  flags.Muon.useTGCPriorNextBC = False
815  # This fails due to "Hough data per sector vector not found"
816  flags.MuonCombined.doMuGirlLowBeta = False
817 
818  flags.lock()
819  flags.dump()
820 
821  cfg = SetupMuonStandaloneCA(args, flags)
822 
823  from MuonConfig.MuonPrepDataConvConfig import MuonPrepDataConvCfg
824  cfg.merge(MuonPrepDataConvCfg(flags))
825 
826  # "Fixes" to get this working standalone i.e. from ESD
827  # Configure topocluster algorithms, and associated conditions
829  cfg.merge(acc)
830 
831  # This causes a stall due to missing HoughDataPerSectorVec
832  cfg.getEventAlgo(
833  'MuonInDetToMuonSystemExtensionAlg').UseOnlyHitSectors = False
834 
835  # This causes a stall. See https://its.cern.ch/jira/browse/ATEAM-825
836  # Leaving here for the moment, for convenience investigating this bug.
837  # muonSegmentCnvTool = cfg.popToolsAndMerge( MuonSegmentConverterToolCfg(ConfigFlags, OutputLevel=0) )
838  # cfg.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonSegmentCnvAlg", MuonSegmentConverterTool=muonSegmentCnvTool))
839 
840  # Keep this in, since it makes debugging easier to simply uncomment and change Algo/Service name,
841  # from AthenaCommon.Constants import VERBOSE
842  # tmp = cfg.getEventAlgo("MuonCombinedMuonCandidateAlg")
843  # tmp.OutputLevel=VERBOSE
844  # tmp = cfg.getService("StoreGateSvc")
845  # tmp.OutpuDumptLevel=True
846 
847  # Need to make it possible to write Muons ... so rename read containers
848  from SGComps.AddressRemappingConfig import AddressRemappingCfg
849 
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")
857  ]
858  cfg.merge(AddressRemappingCfg(rename_maps))
859 
860  # Commented, because it should be added back in very soon.
861  # itemsToRecord = ["xAOD::MuonContainer#Muons", "xAOD::MuonAuxContainer#MuonsAux.-DFCommonMuonsTight.-DFCommonGoodMuon.-DFCommonMuonsMedium.-DFCommonMuonsLoose"]
862  # SetupMuonStandaloneOutput(cfg, ConfigFlags, itemsToRecord)
863  cfg.printConfig(withDetails=True, summariseProps=True)
864  # f=open("MuonCombinedReconstruction.pkl","wb")
865  # cfg.store(f)
866  # f.close()
867 
868  if not args.config_only:
869  sc = cfg.run(20)
870  if not sc.isSuccess():
871  import sys
872  sys.exit("Execution failed")
873  else:
874  cfg.wasMerged()
python.MuonCombinedReconstructionConfig.MuonCreatorAlgCfg
def MuonCreatorAlgCfg(flags, name="MuonCreatorAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:270
python.MuonRecToolsConfig.MuonAmbiProcessorCfg
def MuonAmbiProcessorCfg(flags, name="MuonAmbiProcessor", **kwargs)
Definition: MuonRecToolsConfig.py:144
python.TrkTruthAlgsConfig.TrackTruthSelectorCfg
def TrackTruthSelectorCfg(flags, name="Selector", tracks="", **kwargs)
Definition: TrkTruthAlgsConfig.py:28
python.TrkTruthAlgsConfig.TrackParticleTruthAlgCfg
def TrackParticleTruthAlgCfg(flags, name="TruthAlg", tracks="", **kwargs)
Definition: TrkTruthAlgsConfig.py:35
AddressRemappingConfig.AddressRemappingCfg
def AddressRemappingCfg(renameMaps=[], overwriteMaps=[])
Definition: AddressRemappingConfig.py:10
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
python.InDetTrackSelectorToolConfig.MuonCombinedInDetDetailedTrackSelectorToolCfg
def MuonCombinedInDetDetailedTrackSelectorToolCfg(flags, name="MuonCombinedInDetDetailedTrackSelectorTool", **kwargs)
Definition: InDetTrackSelectorToolConfig.py:125
python.MuonRecToolsConfig.MuonTrackScoringToolCfg
def MuonTrackScoringToolCfg(flags, name="MuonTrackScoringTool", **kwargs)
Definition: MuonRecToolsConfig.py:132
python.MuonCombinedReconstructionConfig.MuonSegContainerMergerAlgCfg
def MuonSegContainerMergerAlgCfg(flags, name="MuonSegContainerMergerAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:374
python.CaloThinCellsByClusterAlgConfig.CaloThinCellsByClusterAlgCfg
def CaloThinCellsByClusterAlgCfg(flags, streamName, clusters, samplings=[], cells='AllCalo')
Definition: CaloThinCellsByClusterAlgConfig.py:11
python.MuonCombinedReconstructionConfig.CombinedMuonTrackTruthAlgsCfg
def CombinedMuonTrackTruthAlgsCfg(flags)
Definition: MuonCombinedReconstructionConfig.py:518
AtlasTrackingGeometryCondAlgConfig.TrackingGeometryCondAlgCfg
def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMaterialValidation=False, **kwargs)
Definition: AtlasTrackingGeometryCondAlgConfig.py:131
python.MuonCombinedReconstructionConfig.MuonInDetToMuonSystemExtensionAlgCfg
def MuonInDetToMuonSystemExtensionAlgCfg(flags, name="MuonInDetToMuonSystemExtensionAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:174
python.MuonCombinedRecToolsConfig.MuonCreatorToolCfg
def MuonCreatorToolCfg(flags, name="MuonCreatorTool", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:138
python.MuonCombinedRecToolsConfig.MuonCandidateToolCfg
def MuonCandidateToolCfg(flags, name="MuonCandidateTool", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:221
python.MuonCombinedReconstructionConfig.MuonCombinedMuonCandidateAlgCfg
def MuonCombinedMuonCandidateAlgCfg(flags, name="MuonCombinedMuonCandidateAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:102
python.MuonCombinedReconstructionConfig.LRT_MuGirlAlgCfg
def LRT_MuGirlAlgCfg(flags, name="MuGirlAlg_LRT", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:68
python.MuonCombinedReconstructionConfig.CombinedMuonTruthAssociationAlgsCfg
def CombinedMuonTruthAssociationAlgsCfg(flags)
Definition: MuonCombinedReconstructionConfig.py:535
python.MuonConfigUtils.SetupMuonStandaloneCA
def SetupMuonStandaloneCA(args, flags)
Definition: MuonConfigUtils.py:41
python.MuonCombinedReconstructionConfig.MuGirlStauAlgCfg
def MuGirlStauAlgCfg(flags, name="MuGirlStauAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:79
python.MuonCombinedReconstructionConfig.MuonSegmentTagAlgCfg
def MuonSegmentTagAlgCfg(flags, name="MuonSegmentTagAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:28
python.MuonCombinedReconstructionConfig.CombinedMuonOutputCfg
def CombinedMuonOutputCfg(flags)
Definition: MuonCombinedReconstructionConfig.py:562
python.MuonCombinedReconstructionConfig.MuonCombinedInDetCandidateAlgCfg
def MuonCombinedInDetCandidateAlgCfg(flags, name="MuonCombinedInDetCandidateAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:148
python.TrkTrackSummaryToolConfig.MuonCombinedTrackSummaryToolCfg
def MuonCombinedTrackSummaryToolCfg(flags, name="CombinedMuonTrackSummary", **kwargs)
Definition: TrkTrackSummaryToolConfig.py:153
python.MuonTruthAlgsConfig.MuonDetailedTrackTruthMakerCfg
def MuonDetailedTrackTruthMakerCfg(flags, name="MuonDetailedTrackTruthMaker", **kwargs)
Definition: MuonConfig/python/MuonTruthAlgsConfig.py:6
python.MuonCombinedReconstructionConfig.MuonCaloTagAlgCfg
def MuonCaloTagAlgCfg(flags, name="MuonCaloTagAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:8
CaloExtensionBuilderAlgCfg.CaloExtensionBuilderCfg
def CaloExtensionBuilderCfg(flags)
Definition: CaloExtensionBuilderAlgCfg.py:35
python.TrkEventCnvToolsConfig.TrkEventCnvSuperToolCfg
def TrkEventCnvSuperToolCfg(flags, name='EventCnvSuperTool', **kwargs)
Definition: TrkEventCnvToolsConfig.py:51
python.MuonGeometryConfig.MuonIdHelperSvcCfg
def MuonIdHelperSvcCfg(flags)
Definition: MuonGeometryConfig.py:15
python.MuonCombinedReconstructionConfig.MuonDecorationAlgsCfg
def MuonDecorationAlgsCfg(flags)
Definition: MuonCombinedReconstructionConfig.py:479
python.MuonTruthAlgsConfig.MuonSegmentTruthAssociationAlgCfg
def MuonSegmentTruthAssociationAlgCfg(flags, name="MuonSegmentTruthAssociationAlg", **kwargs)
Definition: MuonConfig/python/MuonTruthAlgsConfig.py:56
python.MuonCombinedRecToolsConfig.MuonCombinedToolCfg
def MuonCombinedToolCfg(flags, name="MuonCombinedTool", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:271
python.MuonCombinedRecToolsConfig.MuonStauRecoToolCfg
def MuonStauRecoToolCfg(flags, name="MuonStauRecoTool", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:1086
python.CaloNoiseCondAlgConfig.CaloNoiseCondAlgCfg
def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise")
Definition: CaloNoiseCondAlgConfig.py:11
python.MuonCombinedReconstructionConfig.EMEO_MuonCombinedMuonCandidateAlgCfg
def EMEO_MuonCombinedMuonCandidateAlgCfg(flags, name="MuonCombinedMuonCandidateAlg_EMEO")
Definition: MuonCombinedReconstructionConfig.py:124
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.MuonCombinedReconstructionConfig.MuonPrecisionLayerDecorAlgCfg
def MuonPrecisionLayerDecorAlgCfg(flags, name="MuonPrecisionLayerDecorAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:472
python.MuonCombinedReconstructionConfig.LRT_MuonCombinedInDetCandidateAlgCfg
def LRT_MuonCombinedInDetCandidateAlgCfg(flags, name="MuonCombinedInDetCandidateAlg_LRT", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:203
python.MuonCombinedReconstructionConfig.MuonInsideOutRecoAlgCfg
def MuonInsideOutRecoAlgCfg(flags, name="MuonInsideOutRecoAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:47
python.MuonCombinedRecToolsConfig.MuonSegmentTagToolCfg
def MuonSegmentTagToolCfg(flags, name="MuonSegmentTagTool", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:1239
python.MuonSegmentFindingConfig.MuonLayerHoughAlgCfg
def MuonLayerHoughAlgCfg(flags, name="MuonLayerHoughAlg", **kwargs)
Definition: MuonSegmentFindingConfig.py:402
python.MuonSegmentFindingConfig.MuonSegmentCnvAlgCfg
def MuonSegmentCnvAlgCfg(flags, name="MuonSegmentCnvAlg", **kwargs)
Definition: MuonSegmentFindingConfig.py:567
python.MuonCombinedReconstructionConfig.LRT_MuonCaloTagAlgCfg
def LRT_MuonCaloTagAlgCfg(flags, name="MuonCaloTagAlg_LRT", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:22
python.MuonCombinedRecToolsConfig.EMEO_MuonCombinedToolCfg
def EMEO_MuonCombinedToolCfg(flags, name="MuonCombinedTool_EMEO", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:336
python.MuonCombinedReconstructionConfig.EMEO_MuonCombinedAlgCfg
def EMEO_MuonCombinedAlgCfg(flags, name="MuonCombinedAlg_EMEO", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:246
python.MuonCombinedReconstructionConfig.EMEO_MuonCreatorAlgCfg
def EMEO_MuonCreatorAlgCfg(flags, name="MuonCreatorAlg_EMEO", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:334
python.MuonCombinedReconstructionConfig.MuonTrkIDMSScatterDecorAlgCfg
def MuonTrkIDMSScatterDecorAlgCfg(flags, name="MuonCombIDMSScatterDecorAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:458
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.MuonCombinedReconstructionConfig.StauCreatorAlgCfg
def StauCreatorAlgCfg(flags, name="StauCreatorAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:354
python.MuonCombinedReconstructionConfig.LRT_MuonInDetToMuonSystemExtensionAlgCfg
def LRT_MuonInDetToMuonSystemExtensionAlgCfg(flags, name="MuonInDetToMuonSystemExtensionAlg_LRT", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:194
python.CaloTopoClusterConfig.CaloTopoClusterCfg
def CaloTopoClusterCfg(flags, cellsname="AllCalo", clustersname=None, clustersnapname="CaloTopoClusters")
Definition: CaloTopoClusterConfig.py:318
python.MuonRecToolsConfig.MuonEDMHelperSvcCfg
def MuonEDMHelperSvcCfg(flags, name="MuonEDMHelperSvc", **kwargs)
Definition: MuonRecToolsConfig.py:31
python.InDetTrackSelectorToolConfig.MuonCombinedInDetDetailedForwardTrackSelectorToolCfg
def MuonCombinedInDetDetailedForwardTrackSelectorToolCfg(flags, name='MuonCombinedInDetDetailedForwardTrackSelectorTool', **kwargs)
Definition: InDetTrackSelectorToolConfig.py:172
python.MuonCombinedReconstructionConfig.LRT_MuonSegmentTagAlgCfg
def LRT_MuonSegmentTagAlgCfg(flags, name="MuonSegmentTagAlg_LRT", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:40
python.MuonCombinedReconstructionConfig.LRT_MuonCreatorAlgCfg
def LRT_MuonCreatorAlgCfg(flags, name="MuonCreatorAlg_LRT", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:303
python.MuonCombinedRecToolsConfig.MuonCaloTagToolCfg
def MuonCaloTagToolCfg(flags, name='MuonCaloTagTool', **kwargs)
Definition: MuonCombinedRecToolsConfig.py:940
python.MuonCombinedReconstructionConfig.MuonInDetExtensionMergerAlgCfg
def MuonInDetExtensionMergerAlgCfg(flags, name="MuonInDetExtensionMergerAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:414
python.MuonCombinedRecToolsConfig.MuonInsideOutRecoToolCfg
def MuonInsideOutRecoToolCfg(flags, name="MuonInsideOutRecoTool", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:1004
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.MuonCombinedRecToolsConfig.EMEO_CombinedMuonTrackBuilderCfg
def EMEO_CombinedMuonTrackBuilderCfg(flags, name="MuonCombinedTrackBuilder_EMEO")
Definition: MuonCombinedRecToolsConfig.py:641
python.MuonCombinedReconstructionConfig.LRT_MuonCombinedAlgCfg
def LRT_MuonCombinedAlgCfg(flags, name="MuonCombinedAlg_LRT", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:261
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
python.MuonPrepDataConvConfig.MuonPrepDataConvCfg
def MuonPrepDataConvCfg(flags)
Definition: MuonPrepDataConvConfig.py:6
python.MuonCombinedReconstructionConfig.GetCombinedTrkContainers
def GetCombinedTrkContainers(flags)
Definition: MuonCombinedReconstructionConfig.py:427
str
Definition: BTagTrackIpAccessor.cxx:11
python.MuonCombinedReconstructionConfig.MuonTrkAEOTDecorAlgCfg
def MuonTrkAEOTDecorAlgCfg(flags, name="MuonCombAEOTDecorAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:465
python.MuonCombinedRecToolsConfig.MuonSystemExtensionToolCfg
def MuonSystemExtensionToolCfg(flags, **kwargs)
Definition: MuonCombinedRecToolsConfig.py:1161
python.InDetTrackSelectorToolConfig.MuonCombinedInDetDetailedTrackSelectorTool_LRTCfg
def MuonCombinedInDetDetailedTrackSelectorTool_LRTCfg(flags, name='MuonCombinedInDetDetailedTrackSelectorTool_LRT', **kwargs)
Definition: InDetTrackSelectorToolConfig.py:158
python.TrackCollectionReadConfig.TrackCollectionReadCfg
def TrackCollectionReadCfg(flags, key)
Definition: TrackCollectionReadConfig.py:28
python.MuonCombinedReconstructionConfig.MuonCombinedAlgCfg
def MuonCombinedAlgCfg(flags, name="MuonCombinedAlg", **kwargs)
Definition: MuonCombinedReconstructionConfig.py:227
python.MuonCombinedReconstructionConfig.MuonCombinedReconstructionCfg
def MuonCombinedReconstructionCfg(flags)
Definition: MuonCombinedReconstructionConfig.py:674
python.MuonTruthAlgsConfig.MuonTruthAssociationAlgCfg
def MuonTruthAssociationAlgCfg(flags, name="MuonTruthAssociationAlg", **kwargs)
Definition: MuonConfig/python/MuonTruthAlgsConfig.py:51