ATLAS Offline Software
Loading...
Searching...
No Matches
InDetHardScatterSelectionToolConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2# Configuration of InDetHardScatterSelectionTool package
3
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from AthenaConfiguration.ComponentFactory import CompFactory
6from TrkConfig.VertexFindingFlags import VertexSortingSetup
7
8def InDetHardScatterSelectionToolCfg(flags, name="InDetHardScatterSelectionTool", **kwargs):
9 """Configure the InDet hard scatter selection tool"""
10 acc = ComponentAccumulator()
11
12 sortingSetup = flags.Tracking.PriVertex.sortingSetup
13 selectionMode = -1
14 if sortingSetup is VertexSortingSetup.SumPt2Sorting:
15 selectionMode = 0
16 elif sortingSetup is VertexSortingSetup.SumPtSorting:
17 selectionMode = 1
18 elif sortingSetup is VertexSortingSetup.JetWeightedSorting:
19 selectionMode = 2
20 kwargs.setdefault("JetContainer", "AntiKt4EMTopoJets")
21 elif sortingSetup is VertexSortingSetup.GNNSorting:
22 selectionMode = 3
23
24 kwargs.setdefault("SelectionMode", selectionMode)
25
26 acc.setPrivateTools(
27 CompFactory.InDet.InDetHardScatterSelectionTool(name, **kwargs))
28 return acc
InDetHardScatterSelectionToolCfg(flags, name="InDetHardScatterSelectionTool", **kwargs)