ATLAS Offline Software
MCastCfg.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 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 LHCPeriod
6 
9 def setupMCastToolCfg(flags, name="MuonMomentumCorrections", **kwargs):
10  acc = ComponentAccumulator()
11  kwargs.setdefault("IsRun3Geo", flags.GeoModel.Run >= LHCPeriod.Run3 )
12  from MuonSelectorTools.MuonSelectorToolsConfig import MuonSelectionToolCfg
13  kwargs.setdefault("MuonSelectionTool", acc.popToolsAndMerge(MuonSelectionToolCfg(flags,
14  MaxEta=2.7,
15  MuQuality=1)))
16  the_tool = CompFactory.CP.MuonCalibTool(name, **kwargs)
17  acc.setPrivateTools(the_tool)
18  return acc
19 
20 def setupCalibratedMuonProviderCfg(flags, name="CalibratedMuonProvider", calibMode = 1, **kwargs):
21  acc = ComponentAccumulator()
22 
23  kwargs.setdefault("useRndRunNumber", flags.Input.isMC)
24  useRndNumber = kwargs["useRndRunNumber"] if "useRndRunNumber" in kwargs else False
25  kwargs.setdefault("Tool", acc.popToolsAndMerge(setupMCastToolCfg(flags,
26  calibMode = calibMode,
27  useRandomRunNumber=useRndNumber)))
28 
29  the_alg = CompFactory.CP.CalibratedMuonsProvider(name,**kwargs)
30  acc.addEventAlgo(the_alg, primary = True)
31  return acc
32 def setupCalibratedTracksProviderCfg(flags, name="CalibratedMuonTracksProvider",calibMode = 1, **kwargs):
33  acc = ComponentAccumulator()
34  kwargs.setdefault("useRndRunNumber", flags.Input.isMC)
35  useRndNumber = kwargs["useRndRunNumber"] if "useRndRunNumber" in kwargs else False
36  kwargs.setdefault("Tool", acc.popToolsAndMerge(setupMCastToolCfg(flags,
37  calibMode = calibMode,
38  useRandomRunNumber=useRndNumber)))
39 
40  the_alg = CompFactory.CP.CalibratedTracksProvider(name,**kwargs)
41  acc.addEventAlgo(the_alg, primary = True)
42  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MCastCfg.setupCalibratedMuonProviderCfg
def setupCalibratedMuonProviderCfg(flags, name="CalibratedMuonProvider", calibMode=1, **kwargs)
Definition: MCastCfg.py:20
python.MuonSelectorToolsConfig.MuonSelectionToolCfg
def MuonSelectionToolCfg(flags, name="MuonSelectionTool", **kwargs)
Standard configuration of the MuonSelectionTool used in reconstruction & validation jobs The snippet ...
Definition: MuonSelectorToolsConfig.py:16
MCastCfg.setupCalibratedTracksProviderCfg
def setupCalibratedTracksProviderCfg(flags, name="CalibratedMuonTracksProvider", calibMode=1, **kwargs)
Definition: MCastCfg.py:32
MCastCfg.setupMCastToolCfg
def setupMCastToolCfg(flags, name="MuonMomentumCorrections", **kwargs)
Example of configuration of the Muon Momentum corrections tool https://gitlab.cern....
Definition: MCastCfg.py:9