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()

python.MuonSelectorToolsConfig.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()

python.MuonSelectorToolsConfig.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
25 # Configure the Onnx tool FIRST
26 from AthOnnxComps.OnnxRuntimeFlags import OnnxRuntimeType
27 from AthOnnxComps.OnnxRuntimeInferenceConfig import OnnxRuntimeInferenceToolCfg
28
29 model_fname = "MuonSelectorTools/TightNN_Experimental_18062025/model_DNN3norm_MC20ade.onnx"
30 if flags.GeoModel.Run >= LHCPeriod.Run3:
31 model_fname = "MuonSelectorTools/TightNN_Experimental_18062025/model_DNN3norm_MC23ad.onnx"
32
33 execution_provider = OnnxRuntimeType.CPU
34 # Set defaults AFTER ort_tool is available
35 kwargs.setdefault("IsRun3Geo", flags.GeoModel.Run >= LHCPeriod.Run3)
36 kwargs.setdefault("ORTInferenceTool",
37 acc.popToolsAndMerge(OnnxRuntimeInferenceToolCfg(flags, model_fname, execution_provider, name=f"{name}_ORTInferenceTool")))
38
39
40 # Now construct the tool with all kwargs set
41 the_tool = CompFactory.CP.MuonSelectionTool(name, **kwargs)
42 acc.setPrivateTools(the_tool)
43 return acc
44