ATLAS Offline Software
MuonTrackBuildingConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
6 from TrkConfig.TrkGlobalChi2FitterConfig import MCTBFitterCfg, MCTBSLFitterCfg
7 from MuonConfig.MuonRecToolsConfig import MuonTrackCleanerCfg, MuonSegmentMomentumFromFieldCfg, MuonSeededSegmentFinderCfg, MuonEDMPrinterToolCfg
8 from AthenaConfiguration.Enums import BeamType
9 from MuonConfig.MuonSegmentFindingConfig import MuonSegmentFittingToolCfg
10 
11 def MooTrackFitterCfg(flags, name = 'MooTrackFitter', prefix='', **kwargs):
12  # Based on https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py#L179
13  # (Tons of explicit configuration missing from there though)
14  Muon__MooTrackFitter=CompFactory.Muon.MooTrackFitter
15  MuonSegmentMomentum=CompFactory.MuonSegmentMomentum
16  from MuonConfig.MuonRecToolsConfig import MuonPhiHitSelectorCfg, MuonTrackToSegmentToolCfg, MuonTrackSummaryHelperToolCfg, MuPatHitToolCfg
17 
18  result = ComponentAccumulator()
19  mctb_fitter = result.getPrimaryAndMerge(MCTBFitterCfg(flags, name = prefix+'MCTBFitter'))
20  kwargs.setdefault("Fitter", mctb_fitter)
21 
22  mu_pat_hit_tool = result.popToolsAndMerge(MuPatHitToolCfg(flags))
23  result.addPublicTool(mu_pat_hit_tool)
24  kwargs.setdefault("HitTool", mu_pat_hit_tool)
25 
26  from TrkConfig.TrkExSTEP_PropagatorConfig import AtlasSTEP_PropagatorCfg
27  muon_prop = result.popToolsAndMerge(AtlasSTEP_PropagatorCfg(flags, name='MuonPropagator'))
28 
29  kwargs.setdefault("Propagator", muon_prop)
30  kwargs.setdefault("SLFit" , not (flags.BField.barrelToroidOn and flags.BField.endcapToroidOn) )
31  if flags.Muon.MuonTrigger:
32  kwargs.setdefault("SLFit", False)
33  kwargs.setdefault("ReducedChi2Cut", flags.Muon.Chi2NDofCut)
34 
35  momentum_estimator=""
36  if flags.Beam.Type is BeamType.Cosmics:
37  momentum_estimator = MuonSegmentMomentum(DoCosmics = True)
38  else:
39  momentum_estimator=result.popToolsAndMerge(MuonSegmentMomentumFromFieldCfg(flags))
40 
41  result.addPublicTool(momentum_estimator)
42  kwargs.setdefault("SegmentMomentum", momentum_estimator )
43 
44  kwargs.setdefault("MuonPrinterTool", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags) ))
45 
46  track_to_segment_tool = result.popToolsAndMerge(MuonTrackToSegmentToolCfg(flags))
47  kwargs.setdefault("TrackToSegmentTool", track_to_segment_tool)
48 
49  kwargs.setdefault("PhiHitSelector", result.popToolsAndMerge(MuonPhiHitSelectorCfg(flags)))
50  kwargs.setdefault("TrackCleaner", result.popToolsAndMerge(MuonTrackCleanerCfg(flags)))
51  kwargs.setdefault("SegmentInOverlapTool", result.popToolsAndMerge(MuonSegmentInOverlapResolvingToolCfg(flags)))
52 
53  # Leaving "SegmentInOverlapTool" as default, which is what happens in the current configuration.
54 
55  track_summary_helper = result.popToolsAndMerge(MuonTrackSummaryHelperToolCfg(flags))
56  kwargs.setdefault("TrackSummaryTool", track_summary_helper)
57 
58  kwargs.setdefault("CleanPhiHits", True)
59  kwargs.setdefault("UsePreciseHits", True)
60  kwargs.setdefault("UsePrefit", False)
61  kwargs.setdefault("SeedAtStartOfTrack", False)
62 
63  fitter = Muon__MooTrackFitter(prefix + name, **kwargs)
64  result.setPrivateTools(fitter)
65  return result
66 
67 @AccumulatorCache
68 def MooTrackBuilderCfg(flags, name="MooTrackBuilderTemplate", prefix="", doSegmentPhiMatching=True, **kwargs):
69  Muon__MooTrackBuilder=CompFactory.Muon.MooTrackBuilder
70  from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import MdtDriftCircleOnTrackCreatorCfg, TriggerChamberClusterOnTrackCreatorCfg
71  from MuonConfig.MuonRecToolsConfig import MuonTrackToSegmentToolCfg, MuonTrackExtrapolationToolCfg
72  from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
73 
74  # Based on this: https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py#L221
75  # ignoring all the name_prefix stuff for the moment, since I'm not sure it's necessary any more.
76  result = ComponentAccumulator()
77  moo_track_fitter = result.popToolsAndMerge(MooTrackFitterCfg(flags, name='MooTrackFitter', prefix=prefix))
78  kwargs.setdefault("Fitter", moo_track_fitter)
79 
80  # Now setup SL fitter (MooSLTrackFitter as defined here:
81  # https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py#L203)
82  mctbslfitter = result.popToolsAndMerge(MCTBSLFitterCfg(flags, name=prefix+'MCTBSLFitter'))
83 
84  # Just take the default configuration, as per https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py#L56
85  from TrkConfig.TrkExSTEP_PropagatorConfig import AtlasSTEP_PropagatorCfg
86  muon_prop = result.popToolsAndMerge(AtlasSTEP_PropagatorCfg(flags, name = 'MuonStraightLinePropagator'))
87 
88  moo_sl_track_fitter = result.popToolsAndMerge(MooTrackFitterCfg( flags, name="MooSLTrackFitter", prefix=prefix, Fitter = mctbslfitter, Propagator=muon_prop, ReducedChi2Cut=10.0, SLFit=True))
89 
90  kwargs.setdefault("SLFitter", moo_sl_track_fitter)
91  kwargs.setdefault("RecalibrateMDTHitsOnTrack", ( (not flags.Muon.doSegmentT0Fit) and flags.Beam.Type is BeamType.Collisions) )
92 
93  muon_seeded_segment_finder = result.popToolsAndMerge(MuonSeededSegmentFinderCfg(flags))
94  kwargs.setdefault("SeededSegmentFinder", muon_seeded_segment_finder)
95 
96  mdt_dcot_creator = result.popToolsAndMerge(MdtDriftCircleOnTrackCreatorCfg(flags))
97  kwargs.setdefault("MdtRotCreator", mdt_dcot_creator)
98 
99  muon_comp_cluster_creator = result.popToolsAndMerge(TriggerChamberClusterOnTrackCreatorCfg(flags))
100  kwargs.setdefault("CompetingClustersCreator", muon_comp_cluster_creator)
101 
102  kwargs.setdefault("Propagator", muon_prop)
103  kwargs.setdefault("ChamberHoleRecoveryTool",
104  result.popToolsAndMerge(MuonChamberHoleRecoveryToolCfg(flags)))
105 
106  result.merge(AtlasFieldCacheCondAlgCfg(flags) )
107 
108  kwargs.setdefault("TrackToSegmentTool", result.popToolsAndMerge(MuonTrackToSegmentToolCfg(flags)))
109  kwargs.setdefault("Printer", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags)))
110  kwargs.setdefault('Extrapolator', result.popToolsAndMerge( MuonTrackExtrapolationToolCfg(flags) ) )
111 
112  # FIXME - remove ErrorOptimisationTool from cxx?
113  # declareProperty("ErrorOptimisationTool","" );Extrapolator
114  kwargs.setdefault("CandidateTool", result.popToolsAndMerge(MuPatCandidateToolCfg(flags)))
115 
116  kwargs.setdefault("CandidateMatchingTool",
117  result.popToolsAndMerge(MooCandidateMatchingToolCfg(flags, name = 'MooCandidateMatchingTool',
118  doSegmentPhiMatching=doSegmentPhiMatching, prefix=prefix)))
119 
120  from TrkConfig.TrkTrackSummaryToolConfig import MuonTrackSummaryToolCfg
121  kwargs.setdefault("TrackSummaryTool", result.popToolsAndMerge(MuonTrackSummaryToolCfg(flags)))
122 
123  if "PullCalculator" not in kwargs:
124  from TrkConfig.TrkResidualPullCalculatorConfig import (
125  ResidualPullCalculatorCfg)
126  kwargs.setdefault("PullCalculator", result.popToolsAndMerge(
128 
129  result.setPrivateTools(Muon__MooTrackBuilder(name, **kwargs))
130  return result
131 
132 def MuonSegmentInOverlapResolvingToolCfg(flags, name="MuonSegmentInOverlapResolvingTool", **kwargs):
133  from MuonConfig.MuonRecToolsConfig import MuonEDMHelperSvcCfg
134  from TrkConfig.TrkExRungeKuttaPropagatorConfig import RungeKuttaPropagatorCfg
135  result = ComponentAccumulator()
136  kwargs.setdefault("edmHelper", result.getPrimaryAndMerge(MuonEDMHelperSvcCfg(flags)) )
137  kwargs.setdefault("Printer", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags)) )
138  kwargs.setdefault("AtlasRungeKuttaPropagator", result.popToolsAndMerge(
139  RungeKuttaPropagatorCfg(flags)))
140 
141  if "ResidualPullCalculator" not in kwargs:
142  from TrkConfig.TrkResidualPullCalculatorConfig import (
143  ResidualPullCalculatorCfg)
144  kwargs.setdefault("ResidualPullCalculator", result.popToolsAndMerge(
146 
147  result.setPrivateTools(CompFactory.Muon.MuonSegmentInOverlapResolvingTool(name, **kwargs))
148  return result
149 
150 # Taken from https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py#L268
151 # Not bothering with MuonSegmentMatchingToolTight - just pass in TightSegmentMatching=True
152 def MuonSegmentMatchingToolCfg(flags, name="MuonSegmentMatchingTool", **kwargs):
153  Muon__MuonSegmentMatchingTool=CompFactory.Muon.MuonSegmentMatchingTool
154 
155  kwargs.setdefault( "doThetaMatching", flags.Muon.useSegmentMatching)
156  kwargs.setdefault( "doPhiMatching", False )
157  if flags.Beam.Type is BeamType.Cosmics:
158  kwargs.setdefault("OverlapMatchAveragePhiHitPullCut", 200.)
159  kwargs.setdefault( "ToroidOn", False ) # Was "not jobproperties.BField.allToroidOn()" but do not have access to Field here.
160 
161  # There are two tools which this depends on which aren't properties and which weren't defined in old configuration
162  # Ignore for now, but FIXME one day
163 
164  # m_pairMatchingTool("Muon::MuonSegmentPairMatchingTool/MuonSegmentPairMatchingTool"),
165  # Also, residual pull calculator not yet configured. #FIXME
166 
167  result = MuonEDMPrinterToolCfg(flags)
168  kwargs.setdefault("Printer", result.getPrimary() )
169  kwargs.setdefault("MuonSegmentInOverlapResolvingTool", result.popToolsAndMerge(
171  kwargs.setdefault("MuonSegmentPairMatchingTool", CompFactory.Muon.MuonSegmentPairMatchingTool('MuonSegmentPairMatchingTool'))
172 
173  matching = Muon__MuonSegmentMatchingTool(name, **kwargs)
174  result.setPrivateTools(matching)
175  return result
176 
177 def MooCandidateMatchingToolCfg(flags, name="MooCandidateMatchingTool", doSegmentPhiMatching=False, prefix="", **kwargs):
178  Muon__MooCandidateMatchingTool=CompFactory.Muon.MooCandidateMatchingTool
179  from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
180 
181  result = ComponentAccumulator()
182 
183  # Won't explicitly configure MuonEDMHelperSvc
184  kwargs.setdefault("MuonPrinterTool", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags) ))
185  kwargs.setdefault("Extrapolator", result.popToolsAndMerge(AtlasExtrapolatorCfg(flags)))
186 
187  acc = MuonSegmentMatchingToolCfg(flags, name=prefix+"MuonSegmentMatchingTool", doPhiMatching = doSegmentPhiMatching)
188  muon_seg_matching = acc.getPrimary()
189  result.merge(acc)
190  kwargs.setdefault("SegmentMatchingTool", muon_seg_matching)
191 
192  acc = MuonSegmentMatchingToolCfg(flags, name = prefix+"MuonSegmentMatchingToolTight", TightSegmentMatching=True, doPhiMatching = doSegmentPhiMatching)
193  muon_seg_matching_tight = acc.getPrimary()
194  result.merge(acc)
195  kwargs.setdefault("SegmentMatchingToolTight", muon_seg_matching_tight)
196 
197  kwargs.setdefault("DoTrackSegmentMatching", flags.Muon.useTrackSegmentMatching)
198  kwargs.setdefault("RequireSameSide", flags.Beam.Type is not BeamType.Collisions)
199  if flags.Muon.useAlignmentCorrections:
200  kwargs.setdefault("AlignmentErrorPosX", 5.0)
201  kwargs.setdefault("AlignmentErrorPosY", 0.2)
202  kwargs.setdefault("AlignmentErrorAngleX", 0.002)
203  kwargs.setdefault("AlignmentErrorAngleY", 0.001)
204 
205  else: # no alignment corrections
206  kwargs.setdefault("AlignmentErrorPosX", 10.0)
207  kwargs.setdefault("AlignmentErrorPosY", 5.0)
208  kwargs.setdefault("AlignmentErrorAngleX", 0.004)
209  kwargs.setdefault("AlignmentErrorAngleY", 0.002)
210 
211  kwargs.setdefault("MuPatCandidateTool", result.popToolsAndMerge(MuPatCandidateToolCfg(flags)))
212 
213  moo_cand_matching_tool = Muon__MooCandidateMatchingTool(prefix+name,**kwargs)
214  result.setPrivateTools(moo_cand_matching_tool)
215  return result
216 
217 def MuonSegmentRegionRecoveryToolCfg(flags, name="MuonSegmentRegionRecoveryTool", **kwargs):
218  from TrkConfig.AtlasExtrapolatorConfig import MuonExtrapolatorCfg
219  from TrkConfig.TrkTrackSummaryToolConfig import MuonTrackSummaryToolCfg
220  from MuonConfig.MuonCondAlgConfig import MuonStationIntersectCondAlgCfg
221  from MuonCombinedConfig.MuonCombinedRecToolsConfig import CombinedMuonTrackBuilderFitCfg
222  from MuonConfig.MuonRecToolsConfig import MuonHitSummaryToolCfg
223 
224  # Based on https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py#L426
225 
226  result = ComponentAccumulator()
227  kwargs.setdefault("SeededSegmentFinder",
228  result.popToolsAndMerge(MuonSeededSegmentFinderCfg(flags)))
229 
230  kwargs.setdefault("TrackSegmentMatchingTool",
231  result.popToolsAndMerge(MooCandidateMatchingToolCfg(flags)))
232 
233  kwargs.setdefault("ChamberHoleRecoveryTool",
234  result.popToolsAndMerge(MuonChamberHoleRecoveryToolCfg(flags)))
235 
236  kwargs.setdefault("Extrapolator",
237  result.popToolsAndMerge(MuonExtrapolatorCfg(flags)))
238  if 'OnlyEO' in kwargs:
239  #MuonEORecoveryTool's CombinedMuonTrackBuilderFit apparently *should* have MuonHoleRecovery
240  kwargs.setdefault("Builder", result.popToolsAndMerge(
242  else:
243  kwargs.setdefault("Builder", result.popToolsAndMerge(
244  CombinedMuonTrackBuilderFitCfg(flags, MuonHoleRecovery= "")))
245 
246 
247  kwargs.setdefault("Fitter",
248  result.popToolsAndMerge(MCTBSLFitterCfg(flags, name='MCTBSLFitter')))
249  kwargs.setdefault("HitSummaryTool", result.popToolsAndMerge( MuonHitSummaryToolCfg(flags)))
250  kwargs.setdefault("EDMPrinter", result.getPrimaryAndMerge(
251  MuonEDMPrinterToolCfg(flags)))
252  result.merge( MuonStationIntersectCondAlgCfg(flags))
253 
254  # Not bothering to handle IDHelper or EDMHelper. Default is okay.
255 
256  from RegionSelector.RegSelToolConfig import regSelTool_MDT_Cfg, regSelTool_RPC_Cfg, regSelTool_TGC_Cfg
257  if flags.Detector.GeometryMDT:
258  kwargs.setdefault("MDTRegionSelector", result.popToolsAndMerge(regSelTool_MDT_Cfg(flags)))
259 
260  if flags.Detector.GeometryTGC:
261  kwargs.setdefault("TGCRegionSelector", result.popToolsAndMerge(regSelTool_TGC_Cfg(flags)))
262 
263  if flags.Detector.GeometryRPC:
264  kwargs.setdefault("RPCRegionSelector", result.popToolsAndMerge(regSelTool_RPC_Cfg(flags)))
265 
266  if flags.Detector.GeometryCSC:
267  from RegionSelector.RegSelToolConfig import regSelTool_CSC_Cfg
268  kwargs.setdefault("CSCRegionSelector", result.popToolsAndMerge(regSelTool_CSC_Cfg(flags)))
269 
270  if flags.Detector.GeometrysTGC:
271  from RegionSelector.RegSelToolConfig import regSelTool_STGC_Cfg
272  kwargs.setdefault("STGCRegionSelector", result.popToolsAndMerge(regSelTool_STGC_Cfg(flags)))
273 
274  if flags.Detector.GeometryMM:
275  from RegionSelector.RegSelToolConfig import regSelTool_MM_Cfg
276  kwargs.setdefault("MMRegionSelector", result.popToolsAndMerge(regSelTool_MM_Cfg(flags)))
277 
278  kwargs.setdefault("TrackSummaryTool", result.popToolsAndMerge(MuonTrackSummaryToolCfg(flags)))
279 
280  segment_region_recovery_tool = CompFactory.Muon.MuonSegmentRegionRecoveryTool(name, **kwargs)
281  result.setPrivateTools(segment_region_recovery_tool)
282  return result
283 
284 def MuPatCandidateToolCfg(flags, name="MuPatCandidateTool", **kwargs):
285  # https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuPatTools.py#L32
286 
287  from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import MdtDriftCircleOnTrackCreatorCfg, TriggerChamberClusterOnTrackCreatorCfg
288  from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonSegmentSelectionToolCfg
289  result = MdtDriftCircleOnTrackCreatorCfg(flags)
290  kwargs.setdefault("MdtRotCreator", result.getPrimary())
291 
292  if flags.Detector.GeometryCSC:
293  from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import CscClusterOnTrackCreatorCfg
294  kwargs.setdefault("CscRotCreator", result.popToolsAndMerge(CscClusterOnTrackCreatorCfg(flags)))
295  else:
296  kwargs.setdefault("CscRotCreator", "")
297 
298  kwargs.setdefault("CompetingClustersCreator", result.popToolsAndMerge(TriggerChamberClusterOnTrackCreatorCfg(flags)))
299 
300  kwargs.setdefault("MuonPrinterTool", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags) ))
301 
302  from MuonConfig.MuonRecToolsConfig import MuPatHitToolCfg
303  kwargs.setdefault("HitTool", result.getPrimaryAndMerge(MuPatHitToolCfg(flags)))
304  kwargs.setdefault("SegmentSelector", result.popToolsAndMerge(MuonSegmentSelectionToolCfg(flags)))
305 
306  result.setPrivateTools(CompFactory.Muon.MuPatCandidateTool(name, **kwargs))
307  return result
308 
309 def MuonChamberHoleRecoveryToolCfg(flags, name="MuonChamberHoleRecoveryTool", **kwargs):
310  result=ComponentAccumulator()
311  # Not setting explicitly MuonStationIntersectSvc
312 
313  from TrkConfig.AtlasExtrapolatorConfig import MuonExtrapolatorCfg
314  kwargs.setdefault("Extrapolator", result.popToolsAndMerge(MuonExtrapolatorCfg(flags)))
315 
316  from MuonConfig.MuonGeometryConfig import TrackingVolumesSvcCfg
317  kwargs.setdefault("TrackingVolumesSvc", result.getPrimaryAndMerge(TrackingVolumesSvcCfg(flags)))
318 
319  if not flags.Detector.GeometryMDT:
320  kwargs.setdefault("MdtPrepDataContainer","")
321  else:
322  from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import MdtDriftCircleOnTrackCreatorCfg, MuonClusterOnTrackCreatorCfg
323  kwargs.setdefault("MdtRotCreator", result.getPrimaryAndMerge(MdtDriftCircleOnTrackCreatorCfg(flags)))
324 
325  if not flags.Detector.GeometryRPC:
326  kwargs.setdefault("RpcPrepDataContainer","")
327  if not flags.Detector.GeometryTGC:
328  kwargs.setdefault("TgcPrepDataContainer","")
329 
330  kwargs.setdefault("AddMeasurements", not flags.Muon.doSegmentT0Fit )
331 
332 
333  if flags.Detector.GeometryCSC:
334  from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import CscClusterOnTrackCreatorCfg
335  kwargs.setdefault("CscRotCreator", result.popToolsAndMerge(CscClusterOnTrackCreatorCfg(flags)))
336  else:
337  kwargs.setdefault("CscPrepDataContainer","")
338 
339  kwargs.setdefault("ClusterRotCreator", result.popToolsAndMerge(MuonClusterOnTrackCreatorCfg(flags)))
340 
341  if not flags.Detector.GeometrysTGC:
342  kwargs.setdefault("sTgcPrepDataContainer","")
343 
344  if not flags.Detector.GeometryMM:
345  kwargs.setdefault("MMPrepDataContainer","")
346 
347  kwargs.setdefault('TgcPrepDataContainer', 'TGC_MeasurementsAllBCs' if not flags.Muon.useTGCPriorNextBC else 'TGC_Measurements')
348  kwargs.setdefault("EDMPrinter", result.getPrimaryAndMerge(MuonEDMPrinterToolCfg(flags) ))
349 
350  if "PullCalculator" not in kwargs:
351  from TrkConfig.TrkResidualPullCalculatorConfig import (
352  ResidualPullCalculatorCfg)
353  kwargs.setdefault("PullCalculator", result.popToolsAndMerge(
355 
356  result.setPrivateTools(CompFactory.Muon.MuonChamberHoleRecoveryTool(name, **kwargs))
357  return result
358 
359 def EMEO_MuonChamberHoleRecoveryToolCfg(flags, name = "MuonChamberRecovery_EMEO"):
360  return MuonChamberHoleRecoveryToolCfg(flags,
361  name=name,
362  sTgcPrepDataContainer="",
363  MMPrepDataContainer="")
364 
365 def MuonTrackSteeringCfg(flags, name="MuonTrackSteering", **kwargs):
366  Muon__MuonTrackSteering=CompFactory.Muon.MuonTrackSteering
367  # This is based on https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py#L35
368  result=ComponentAccumulator()
369 
370  # This was originally defined here: https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandaloneFlags.py#L137
371  MoorelikeStrategy=[
372  "BarrelCombined[CombineSegInStation,DoRefinement,DoAmbiSolving,CutSeedsOnTracks]:BML,BMS;BOL,BOS;BIL,BIS",
373  "EndcapCombined[CombineSegInStation,DoRefinement,DoAmbiSolving,CutSeedsOnTracks]:EML,EMS;EOL,EOS;EIL,EIS;CSL,CSS;EEL,EES;BEE",
374  "BarrelEndcap[CombineSegInStation,DoRefinement,DoAmbiSolving,CutSeedsOnTracks,BarrelEndcapFilter]:EML,EMS;EEL,EES;BML,BMS;EIL,EIS;BIL,BIS;BOL,BOS"]
375 
376  kwargs.setdefault("StrategyList", MoorelikeStrategy)
377 
378  # Set properties which were set in MuonStandalone.py, and which aren't default (fix this later, because we don't want to break existing configuration)
379  # extraFlags are ignored (don't believe they're necessary)
380 
381  result = MCTBSLFitterCfg(flags)
382  mctbslfitter = result.getPrimary()
383 
384  acc = MuonSegmentRegionRecoveryToolCfg(flags, name='MuonEORecoveryTool', OnlyEO = True, Fitter=mctbslfitter, UseFitterOutlierLogic=False)
385  muon_eo_recovery_tool = acc.getPrimary()
386  result.merge(acc)
387 
388  kwargs.setdefault("HoleRecoveryTool", muon_eo_recovery_tool)
389  kwargs.setdefault("SegSeedQCut", 2 if flags.Beam.Type != BeamType.Cosmics else 1)
390  kwargs.setdefault("Seg2ndQCut", 1)
391 
392  if "TrackBuilderTool" not in kwargs:
393  # Old config had: kwargs["TrackBuilderTool"] = getPublicToolClone("MooMuonTrackBuilder", "MooTrackBuilderTemplate",
394  # extraFlags=extraFlags)
395  # For some strange reason, MooTrackBuilderTemplate was just a MooTrackBuilder i.e. they had:
396  # addTool( "MuonRecExample.MooreTools.MooTrackBuilder", "MooTrackBuilderTemplate") but passing in extraFlags
397  # I have simplified this. Also, in the old configuration there was the possiblity to set optimiseMomentumResolutionUsingChi2 to true in extraflags (which were passed to TrackBuilderTool but not TrackRefinementTool) - however I don't think this was used, and have removed it.
398  # However some other things were set in extraFlags here: https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py#L39
399  # So I might well have made a mistake. TODO check
400  kwargs["TrackBuilderTool"] = result.popToolsAndMerge( MooTrackBuilderCfg(flags, name='MooMuonTrackBuilder', prefix="MuSt_"))
401 
402  if "TrackRefinementTool" not in kwargs:
403  kwargs["TrackRefinementTool"] = result.popToolsAndMerge( MooTrackBuilderCfg(flags, name='MooTrackBuilderTemplate', doSegmentPhiMatching=False))
404 
405  acc=MuPatCandidateToolCfg(flags)
406  cand_tool = acc.getPrimary()
407  result.merge(acc)
408  kwargs.setdefault("MuPatCandidateTool", cand_tool)
409 
410  from MuonConfig.MuonRecToolsConfig import MuonAmbiProcessorCfg
411  acc = MuonAmbiProcessorCfg(flags, name='MuonAmbiProcessor')
412  ambi = acc.getPrimary()
413  result.merge(acc)
414  kwargs.setdefault("AmbiguityTool", ambi)
415 
416  kwargs.setdefault("MooBuilderTool", result.popToolsAndMerge( MooTrackBuilderCfg(flags, name='MooMuonTrackBuilder', prefix="MuSt_")))
417 
418  kwargs.setdefault("CandidateMatchingTool",
419  result.popToolsAndMerge(MooCandidateMatchingToolCfg(flags, doSegmentPhiMatching=True)))
420 
421  kwargs.setdefault("MuonSegmentFittingTool",
422  result.popToolsAndMerge(MuonSegmentFittingToolCfg(flags)))
423  kwargs.setdefault("MuonTrackSelector",
424  result.popToolsAndMerge(MuonTrackSelectorCfg(flags)))
425 
426  kwargs.setdefault("HoleRecoveryTool",
427  result.popToolsAndMerge(MuonChamberHoleRecoveryToolCfg(flags)))
428 
429  from TrkConfig.TrkTrackSummaryToolConfig import MuonTrackSummaryToolCfg
430  kwargs.setdefault("TrackSummaryTool", result.popToolsAndMerge(MuonTrackSummaryToolCfg(flags)))
431  kwargs.setdefault("DoSummary", flags.Muon.printSummary)
432 
433 
434  track_maker_steering = Muon__MuonTrackSteering(name,**kwargs)
435  result.setPrivateTools(track_maker_steering)
436  return result
437 
438 def MuonTrackSelectorCfg(flags, name = "MuonTrackSelectorTool", **kwargs):
439  from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryHelperToolCfg
440 
441  result = ComponentAccumulator()
442  if flags.Beam.Type in [BeamType.Cosmics, BeamType.SingleBeam] or not flags.Input.isMC:
443  kwargs.setdefault("UseRPCHoles", False)
444  kwargs.setdefault("UseTGCHoles", False)
445  kwargs.setdefault("MaxMdtHolesOnTwoStationTrack", 10)
446  kwargs.setdefault("MaxMdtHolesOnTrack", 30)
447  kwargs.setdefault("HolesToHitsRatioCutPerStation", 2)
448  kwargs.setdefault("CountMDTOutlierAsHoles", False)
449  else:
450  kwargs.setdefault("MaxMdtHolesOnTwoStationTrack", 4)
451  kwargs.setdefault("MaxMdtHolesOnTrack", 5)
452  kwargs.setdefault("CountMDTOutlierAsHoles", True)
453 
454  kwargs.setdefault("TrackSummaryHelperTool", result.popToolsAndMerge(MuonTrackSummaryHelperToolCfg(flags)))
455 
456  theTool = CompFactory.Muon.MuonTrackSelectorTool(name, **kwargs)
457  result.setPrivateTools(theTool)
458  return result
459 
460 def EMEO_MuPatTrackBuilderCfg(flags, name="MuPatTrackBuilder_EMEO", **kwargs):
461  result = ComponentAccumulator()
462 
463  recovery_tool = result.getPrimaryAndMerge(EMEO_MuonChamberHoleRecoveryToolCfg(flags))
464  acc = MooTrackBuilderCfg(flags,
465  name = "MooMuonTrackBuilder_EMEO",
466  ChamberHoleRecoveryTool = recovery_tool)
467 
468  track_builder= result.getPrimaryAndMerge(acc)
469 
470  acc = MuonTrackSteeringCfg(flags,
471  name = "MuonTrackSteering_EMEO",
472  TrackBuilderTool = track_builder)
473  track_steering = acc.getPrimary()
474  result.merge(acc)
475 
476  kwargs.setdefault("TrackSteering", track_steering)
477  kwargs.setdefault("MuonSegmentCollection", "TrackMuonSegmentsEMEO")
478  kwargs.setdefault("SpectrometerTrackOutputLocation", "EMEO_MuonSpectrometerTracks")
479 
480  the_alg = CompFactory.MuPatTrackBuilder(name = name, **kwargs)
481  result.addEventAlgo(the_alg, primary = True)
482  return result
483 
484 def MuPatTrackBuilderCfg(flags, name = "MuPatTrackBuilder", **kwargs):
485  result=ComponentAccumulator()
486  acc = MuonTrackSteeringCfg(flags)
487  track_steering = acc.getPrimary()
488  result.merge(acc)
489 
490  kwargs.setdefault("TrackSteering", track_steering)
491  kwargs.setdefault("MuonSegmentCollection", "TrackMuonSegments")
492  kwargs.setdefault("SpectrometerTrackOutputLocation", "MuonSpectrometerTracks")
493 
494  track_builder = CompFactory.MuPatTrackBuilder(name=name, **kwargs)
495  result.addEventAlgo( track_builder, primary=True )
496 
497  return result
498 def MuonTrackBuildingCfg(flags, name = "MuPatTrackBuilder", **kwargs):
499  # This is based on https://gitlab.cern.ch/atlas/athena/blob/release/22.0.3/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py#L162
500  result=ComponentAccumulator()
501 
502  #Arguably this should be somewhere deeper - not quite sure where yet though. FIXME
503  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
504  result.merge( MuonGeoModelCfg(flags) )
505  from MuonConfig.MuonRecToolsConfig import MuonEDMHelperSvcCfg
506  result.merge(MuonEDMHelperSvcCfg(flags))
507 
508  # release 21 ESDs contain a Trk::SegmentCollection named 'MuonSegments' instead of 'TrackMuonSegments', the following 2 lines account for that
509  from MuonConfig.MuonSegmentNameFixConfig import MuonSegmentNameFixCfg
510  result.merge(MuonSegmentNameFixCfg(flags))
511  result.merge(MuPatTrackBuilderCfg(flags))
512 
513  if flags.Muon.runCommissioningChain:
514  result.merge(EMEO_MuPatTrackBuilderCfg(flags))
515  return result
516 
517 
518 if __name__=="__main__":
519  # To run this, do e.g.
520  # python -m MuonConfig.MuonTrackBuildingConfig --run --threads=
521  from MuonConfig.MuonConfigUtils import SetupMuonStandaloneConfigFlags, SetupMuonStandaloneOutput, SetupMuonStandaloneCA
522 
525 
526  # Run the actual test.
527  acc = MuonTrackBuildingCfg(args, flags)
528  cfg.merge(acc)
529 
530 
531  # This is a temporary fix - it should go someplace central as it replaces the functionality of addInputRename from here:
532  # https://gitlab.cern.ch/atlas/athena/blob/master/Control/SGComps/python/AddressRemappingSvc.py
533  AddressRemappingSvc, ProxyProviderSvc=CompFactory.getComps("AddressRemappingSvc","ProxyProviderSvc",)
536  pps.ProviderNames += [ 'AddressRemappingSvc' ]
537  ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("TrackCollection", "MuonSpectrometerTracks", "MuonSpectrometerTracks_old") ]
538 
539  cfg.addService(pps)
540  cfg.addService(ars)
541 
542  itemsToRecord = ["TrackCollection#MuonSpectrometerTracks"]
543  SetupMuonStandaloneOutput(cfg, flags, itemsToRecord)
544 
545  cfg.printConfig(withDetails = True)
546 
547  f=open("MuonTrackBuilding.pkl","wb")
548  cfg.store(f)
549  f.close()
550 
551  if not args.config_only:
552  sc = cfg.run(20)
553  if not sc.isSuccess():
554  import sys
555  sys.exit("Execution failed")
556 
python.MuonRecToolsConfig.MuonAmbiProcessorCfg
def MuonAmbiProcessorCfg(flags, name="MuonAmbiProcessor", **kwargs)
Definition: MuonRecToolsConfig.py:144
RegSelToolConfig.regSelTool_MDT_Cfg
def regSelTool_MDT_Cfg(flags)
Definition: RegSelToolConfig.py:134
AddressRemappingSvc
This class provides the interface to the LCG POOL persistency software.
Definition: AddressRemappingSvc.h:41
python.MuonRecToolsConfig.MuonTrackSummaryHelperToolCfg
def MuonTrackSummaryHelperToolCfg(flags, name="MuonTrackSummaryHelperTool", **kwargs)
Definition: MuonRecToolsConfig.py:123
python.MuonCondAlgConfig.MuonStationIntersectCondAlgCfg
def MuonStationIntersectCondAlgCfg(flags, name='MuonStationIntersectCondAlg', **kwargs)
Definition: MuonCondAlgConfig.py:337
python.MuonTrackBuildingConfig.MooTrackBuilderCfg
def MooTrackBuilderCfg(flags, name="MooTrackBuilderTemplate", prefix="", doSegmentPhiMatching=True, **kwargs)
Definition: MuonTrackBuildingConfig.py:68
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MuonRecToolsConfig.MuonSeededSegmentFinderCfg
def MuonSeededSegmentFinderCfg(flags, name="MuonSeededSegmentFinder", **kwargs)
Definition: MuonRecToolsConfig.py:64
RegSelToolConfig.regSelTool_STGC_Cfg
def regSelTool_STGC_Cfg(flags)
Definition: RegSelToolConfig.py:185
python.MuonRIO_OnTrackCreatorToolConfig.TriggerChamberClusterOnTrackCreatorCfg
def TriggerChamberClusterOnTrackCreatorCfg(flags, name="TriggerChamberClusterOnTrackCreator", **kwargs)
Definition: MuonRIO_OnTrackCreatorToolConfig.py:25
python.MuonRecToolsConfig.MuonEDMPrinterToolCfg
def MuonEDMPrinterToolCfg(flags, name="MuonEDMPrinterTool", **kwargs)
Definition: MuonRecToolsConfig.py:10
python.MuonTrackBuildingConfig.MuPatTrackBuilderCfg
def MuPatTrackBuilderCfg(flags, name="MuPatTrackBuilder", **kwargs)
Definition: MuonTrackBuildingConfig.py:484
python.TrkTrackSummaryToolConfig.MuonTrackSummaryToolCfg
def MuonTrackSummaryToolCfg(flags, name="MuonTrackSummaryTool", **kwargs)
Definition: TrkTrackSummaryToolConfig.py:143
ProxyProviderSvc
manages the address providers and add proxies on demand to the store
Definition: ProxyProviderSvc.h:42
python.MuonTrackBuildingConfig.MuPatCandidateToolCfg
def MuPatCandidateToolCfg(flags, name="MuPatCandidateTool", **kwargs)
Definition: MuonTrackBuildingConfig.py:284
python.MuonSegmentNameFixConfig.MuonSegmentNameFixCfg
def MuonSegmentNameFixCfg(flags)
Definition: MuonSegmentNameFixConfig.py:5
python.MuonConfigUtils.SetupMuonStandaloneCA
def SetupMuonStandaloneCA(args, flags)
Definition: MuonConfigUtils.py:41
RegSelToolConfig.regSelTool_TGC_Cfg
def regSelTool_TGC_Cfg(flags)
Definition: RegSelToolConfig.py:161
python.MuonTrackBuildingConfig.MuonTrackSelectorCfg
def MuonTrackSelectorCfg(flags, name="MuonTrackSelectorTool", **kwargs)
Definition: MuonTrackBuildingConfig.py:438
python.TrkGlobalChi2FitterConfig.MCTBSLFitterCfg
def MCTBSLFitterCfg(flags, name='MCTBSLFitter', **kwargs)
Definition: TrkGlobalChi2FitterConfig.py:253
python.MuonRecToolsConfig.MuPatHitToolCfg
def MuPatHitToolCfg(flags, name="MuPatHitTool", **kwargs)
Definition: MuonRecToolsConfig.py:231
python.AtlasExtrapolatorConfig.AtlasExtrapolatorCfg
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator')
Definition: AtlasExtrapolatorConfig.py:63
python.TrkExRungeKuttaPropagatorConfig.RungeKuttaPropagatorCfg
def RungeKuttaPropagatorCfg(flags, name='AtlasRungeKuttaPropagator', **kwargs)
Definition: TrkExRungeKuttaPropagatorConfig.py:9
python.MuonTrackBuildingConfig.MuonChamberHoleRecoveryToolCfg
def MuonChamberHoleRecoveryToolCfg(flags, name="MuonChamberHoleRecoveryTool", **kwargs)
Definition: MuonTrackBuildingConfig.py:309
python.MuonSegmentFindingConfig.MuonSegmentFittingToolCfg
def MuonSegmentFittingToolCfg(flags, name="MuonSegmentFittingTool", **kwargs)
Definition: MuonSegmentFindingConfig.py:94
python.MuonCombinedRecToolsConfig.CombinedMuonTrackBuilderFitCfg
def CombinedMuonTrackBuilderFitCfg(flags, name='CombinedMuonTrackBuilderFit', **kwargs)
Definition: MuonCombinedRecToolsConfig.py:820
python.MuonGeometryConfig.TrackingVolumesSvcCfg
def TrackingVolumesSvcCfg(flags, name="TrackingVolumesSvc", **kwargs)
Definition: MuonGeometryConfig.py:10
RegSelToolConfig.regSelTool_CSC_Cfg
def regSelTool_CSC_Cfg(flags)
Definition: RegSelToolConfig.py:173
python.MuonTrackBuildingConfig.MooTrackFitterCfg
def MooTrackFitterCfg(flags, name='MooTrackFitter', prefix='', **kwargs)
Definition: MuonTrackBuildingConfig.py:11
python.MuonTrackBuildingConfig.MuonTrackBuildingCfg
def MuonTrackBuildingCfg(flags, name="MuPatTrackBuilder", **kwargs)
Definition: MuonTrackBuildingConfig.py:498
python.TrkExSTEP_PropagatorConfig.AtlasSTEP_PropagatorCfg
def AtlasSTEP_PropagatorCfg(flags, name='AtlasSTEP_Propagator', **kwargs)
Definition: TrkExSTEP_PropagatorConfig.py:16
python.MuonRIO_OnTrackCreatorToolConfig.CscClusterOnTrackCreatorCfg
def CscClusterOnTrackCreatorCfg(flags, name="CscClusterOnTrackCreator", **kwargs)
Definition: MuonRIO_OnTrackCreatorToolConfig.py:34
python.MuonRecToolsConfig.MuonSegmentMomentumFromFieldCfg
def MuonSegmentMomentumFromFieldCfg(flags, name="MuonSegmentMomentumFromField", **kwargs)
Definition: MuonRecToolsConfig.py:107
python.MuonTrackBuildingConfig.EMEO_MuonChamberHoleRecoveryToolCfg
def EMEO_MuonChamberHoleRecoveryToolCfg(flags, name="MuonChamberRecovery_EMEO")
Definition: MuonTrackBuildingConfig.py:359
python.MuonTrackBuildingConfig.EMEO_MuPatTrackBuilderCfg
def EMEO_MuPatTrackBuilderCfg(flags, name="MuPatTrackBuilder_EMEO", **kwargs)
Definition: MuonTrackBuildingConfig.py:460
python.MuonCombinedRecToolsConfig.MuonSegmentSelectionToolCfg
def MuonSegmentSelectionToolCfg(flags, name="MuonSegmentSelectionTool", **kwargs)
Definition: MuonCombinedRecToolsConfig.py:1041
python.MuonRecToolsConfig.MuonTrackExtrapolationToolCfg
def MuonTrackExtrapolationToolCfg(flags, name="MuonTrackExtrapolationTool", **kwargs)
Definition: MuonRecToolsConfig.py:261
RegSelToolConfig.regSelTool_MM_Cfg
def regSelTool_MM_Cfg(flags)
Definition: RegSelToolConfig.py:191
python.MuonRecToolsConfig.MuonPhiHitSelectorCfg
def MuonPhiHitSelectorCfg(flags, name="MuonPhiHitSelector", **kwargs)
Definition: MuonRecToolsConfig.py:210
python.AtlasExtrapolatorConfig.MuonExtrapolatorCfg
def MuonExtrapolatorCfg(flags, name="MuonExtrapolator", **kwargs)
Definition: AtlasExtrapolatorConfig.py:376
python.MuonRecToolsConfig.MuonEDMHelperSvcCfg
def MuonEDMHelperSvcCfg(flags, name="MuonEDMHelperSvc", **kwargs)
Definition: MuonRecToolsConfig.py:31
python.MuonConfigUtils.SetupMuonStandaloneOutput
def SetupMuonStandaloneOutput(cfg, flags, itemsToRecord)
Definition: MuonConfigUtils.py:65
python.MuonTrackBuildingConfig.MuonSegmentInOverlapResolvingToolCfg
def MuonSegmentInOverlapResolvingToolCfg(flags, name="MuonSegmentInOverlapResolvingTool", **kwargs)
Definition: MuonTrackBuildingConfig.py:132
Trk::open
@ open
Definition: BinningType.h:40
python.MuonRecToolsConfig.MuonTrackCleanerCfg
def MuonTrackCleanerCfg(flags, name="MuonTrackCleaner", seg=False, **kwargs)
Definition: MuonRecToolsConfig.py:159
python.TrkGlobalChi2FitterConfig.MCTBFitterCfg
def MCTBFitterCfg(flags, name='MCTBFitter', **kwargs)
Definition: TrkGlobalChi2FitterConfig.py:238
python.MuonRIO_OnTrackCreatorToolConfig.MuonClusterOnTrackCreatorCfg
def MuonClusterOnTrackCreatorCfg(flags, name="MuonClusterOnTrackCreator", **kwargs)
Definition: MuonRIO_OnTrackCreatorToolConfig.py:96
python.MuonRIO_OnTrackCreatorToolConfig.MdtDriftCircleOnTrackCreatorCfg
def MdtDriftCircleOnTrackCreatorCfg(flags, name="MdtDriftCircleOnTrackCreator", **kwargs)
Definition: MuonRIO_OnTrackCreatorToolConfig.py:73
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
python.MuonConfigUtils.SetupMuonStandaloneConfigFlags
def SetupMuonStandaloneConfigFlags(default_input=['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/ESD.16747874._000011_100events.pool.root'])
Definition: MuonConfigUtils.py:6
python.MuonRecToolsConfig.MuonTrackToSegmentToolCfg
def MuonTrackToSegmentToolCfg(flags, name="MuonTrackToSegmentTool", **kwargs)
Definition: MuonRecToolsConfig.py:37
python.MuonTrackBuildingConfig.MuonTrackSteeringCfg
def MuonTrackSteeringCfg(flags, name="MuonTrackSteering", **kwargs)
Definition: MuonTrackBuildingConfig.py:365
MuonSegmentMomentum
Definition: MuonSegmentMomentum.h:18
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8
python.MuonTrackBuildingConfig.MuonSegmentRegionRecoveryToolCfg
def MuonSegmentRegionRecoveryToolCfg(flags, name="MuonSegmentRegionRecoveryTool", **kwargs)
Definition: MuonTrackBuildingConfig.py:217
python.TrkResidualPullCalculatorConfig.ResidualPullCalculatorCfg
def ResidualPullCalculatorCfg(flags, name='ResidualPullCalculator', **kwargs)
Definition: TrkResidualPullCalculatorConfig.py:6
RegSelToolConfig.regSelTool_RPC_Cfg
def regSelTool_RPC_Cfg(flags)
Definition: RegSelToolConfig.py:149
python.MuonRecToolsConfig.MuonHitSummaryToolCfg
def MuonHitSummaryToolCfg(flags, name="MuonHitSummaryTool", **kwargs)
Definition: MuonRecToolsConfig.py:54
python.MuonTrackBuildingConfig.MooCandidateMatchingToolCfg
def MooCandidateMatchingToolCfg(flags, name="MooCandidateMatchingTool", doSegmentPhiMatching=False, prefix="", **kwargs)
Definition: MuonTrackBuildingConfig.py:177
python.MuonTrackBuildingConfig.MuonSegmentMatchingToolCfg
def MuonSegmentMatchingToolCfg(flags, name="MuonSegmentMatchingTool", **kwargs)
Definition: MuonTrackBuildingConfig.py:152