ATLAS Offline Software
Loading...
Searching...
No Matches
python.MuonSelectorToolsConfig Namespace Reference

Functions

 MuonLoosenedNonCalibratedSelectionToolCfg (flags, name="MuonLoosenedNonCalibratedSelectionTool", **kwargs)
 MuonSelectionToolCfg (flags, name="MuonSelectionTool", **kwargs)

Function Documentation

◆ MuonLoosenedNonCalibratedSelectionToolCfg()

MuonLoosenedNonCalibratedSelectionToolCfg ( flags,
name = "MuonLoosenedNonCalibratedSelectionTool",
** kwargs )
Configure the muon selection tool

Definition at line 13 of file MuonSelectorToolsConfig.py.

13def MuonLoosenedNonCalibratedSelectionToolCfg(flags, name="MuonLoosenedNonCalibratedSelectionTool", **kwargs):
14 """Configure the muon selection tool"""
15 kwargs.setdefault("DisablePtCuts", True)
16 kwargs.setdefault("TurnOffMomCorr", True)
17 return MuonSelectionToolCfg(flags, name, **kwargs)
18
19
20#Pretty much copy of the above but without expert flags on disabling pt cuts and turning off momentum corrections. This is for use in physics analysis

◆ MuonSelectionToolCfg()

MuonSelectionToolCfg ( flags,
name = "MuonSelectionTool",
** kwargs )
Configure the muon selection tool

Definition at line 21 of file MuonSelectorToolsConfig.py.

21def MuonSelectionToolCfg(flags, name="MuonSelectionTool", **kwargs):
22 """Configure the muon selection tool"""
23 acc = ComponentAccumulator()
24 if flags.Muon.scheduleActsReco:
25 acc.setPrivateTools(CompFactory.CP.MuonPhaseIISelectionTool(name))
26 return acc
27
28 # Configure the Onnx tool FIRST
29 from AthOnnxComps.OnnxRuntimeFlags import OnnxRuntimeType
30 from AthOnnxComps.OnnxRuntimeInferenceConfig import OnnxRuntimeInferenceToolCfg
31
32 model_fname = "MuonSelectorTools/TightNN_Experimental_18062025/model_DNN3norm_MC20ade.onnx"
33 if flags.GeoModel.Run >= LHCPeriod.Run3:
34 model_fname = "MuonSelectorTools/TightNN_Experimental_18062025/model_DNN3norm_MC23ad.onnx"
35
36 execution_provider = OnnxRuntimeType.CPU
37 # Set defaults AFTER ort_tool is available
38 kwargs.setdefault("IsRun3Geo", flags.GeoModel.Run >= LHCPeriod.Run3)
39 kwargs.setdefault("ORTInferenceTool",
40 acc.popToolsAndMerge(OnnxRuntimeInferenceToolCfg(flags, model_fname, execution_provider, name=f"{name}_ORTInferenceTool")))
41
42
43 # Now construct the tool with all kwargs set
44 the_tool = CompFactory.CP.MuonSelectionTool(name, **kwargs)
45 acc.setPrivateTools(the_tool)
46 return acc
47