ATLAS Offline Software
Functions | Variables
python.InDetGNNHardScatterSelectionConfig Namespace Reference

Functions

def AsgPtEtaSelectionToolCfg (flags, name="AsgPtEtaSelectionTool", **kwargs)
 
def AsgPtEtaSelectionToolGapCfg (flags, name="AsgPtEtaSelectionTool", **kwargs)
 
def AsgViewFromSelectionAlgCfg (flags, name="AsgViewFromSelectionAlg", **kwargs)
 
def GNNHSSelectionAlgCfg (flags, input, minPt)
 
def GNNHSOverlapRemovalToolCfg (flags, name="GNNHS_OverlapRemovalToolCfg", **kwargs)
 
def GNNHSOverlapRemovalAlgCfg (flags, name="GNNHS_OverlapRemovalAlg", overlapInputNames=None, overlapOutputNames=None, **kwargs)
 
def GNNToolCfg (flags, name="HardScatterSelectionGNNTool", **kwargs)
 
def GNNHSVertexDecoratorAlgCfg (flags, name="GNNHS_VertexDecoratorAlg", **kwargs)
 
def GNNSequenceCfg (flags)
 

Variables

 flags = initConfigFlags()
 
 Files
 
 MaxEvents
 
 top_acc = MainServicesCfg(flags)
 
 OutputLevel
 
 withDetails
 
 True
 
 summariseProps
 
 sc = top_acc.run(1)
 

Function Documentation

◆ AsgPtEtaSelectionToolCfg()

def python.InDetGNNHardScatterSelectionConfig.AsgPtEtaSelectionToolCfg (   flags,
  name = "AsgPtEtaSelectionTool",
**  kwargs 
)

Definition at line 10 of file InDetGNNHardScatterSelectionConfig.py.

10 def AsgPtEtaSelectionToolCfg(flags, name="AsgPtEtaSelectionTool", **kwargs):
11  cfg = ComponentAccumulator()
12  kwargs.setdefault("maxEta", 2.5)
13  cfg.setPrivateTools(CompFactory.CP.AsgPtEtaSelectionTool(name, **kwargs))
14  return cfg
15 

◆ AsgPtEtaSelectionToolGapCfg()

def python.InDetGNNHardScatterSelectionConfig.AsgPtEtaSelectionToolGapCfg (   flags,
  name = "AsgPtEtaSelectionTool",
**  kwargs 
)

Definition at line 16 of file InDetGNNHardScatterSelectionConfig.py.

16 def AsgPtEtaSelectionToolGapCfg(flags, name="AsgPtEtaSelectionTool", **kwargs):
17  kwargs.setdefault("etaGapLow", 1.37)
18  kwargs.setdefault("etaGapHigh", 1.52)
19  return AsgPtEtaSelectionToolCfg(flags, name, **kwargs)
20 

◆ AsgViewFromSelectionAlgCfg()

def python.InDetGNNHardScatterSelectionConfig.AsgViewFromSelectionAlgCfg (   flags,
  name = "AsgViewFromSelectionAlg",
**  kwargs 
)

Definition at line 21 of file InDetGNNHardScatterSelectionConfig.py.

21 def AsgViewFromSelectionAlgCfg(flags, name="AsgViewFromSelectionAlg", **kwargs):
22  cfg = ComponentAccumulator()
23  kwargs.setdefault("selection", "selectPtEta")
24  kwargs.setdefault("deepCopy", False)
25  cfg.addEventAlgo(CompFactory.CP.AsgViewFromSelectionAlg(name, **kwargs))
26  return cfg
27 

◆ GNNHSOverlapRemovalAlgCfg()

def python.InDetGNNHardScatterSelectionConfig.GNNHSOverlapRemovalAlgCfg (   flags,
  name = "GNNHS_OverlapRemovalAlg",
  overlapInputNames = None,
  overlapOutputNames = None,
**  kwargs 
)

Definition at line 70 of file InDetGNNHardScatterSelectionConfig.py.

70 def GNNHSOverlapRemovalAlgCfg(flags, name="GNNHS_OverlapRemovalAlg",
71  overlapInputNames = None, overlapOutputNames = None, **kwargs):
72  cfg = ComponentAccumulator()
73 
74  kwargs.setdefault("OutputLabel", "passesOR")
75  kwargs.setdefault("affectingSystematicsFilter", ".*")
76 
77  for obj in overlapInputNames:
78  kwargs.setdefault(obj, overlapInputNames[obj])
79  kwargs.setdefault(obj+"Decoration", kwargs["OutputLabel"] + ",as_char")
80 
81  kwargs.setdefault("overlapTool", cfg.popToolsAndMerge(GNNHSOverlapRemovalToolCfg(flags)))
82 
83  cfg.addEventAlgo(CompFactory.CP.OverlapRemovalAlg(name, **kwargs))
84 
85  for obj in overlapInputNames:
86  cfg.addEventAlgo(CompFactory.CP.AsgViewFromSelectionAlg(
87  name = "GNNHS_"+obj+"_ORSelectionAlg",
88  input = overlapInputNames[obj],
89  output = overlapOutputNames[obj],
90  selection = [kwargs["OutputLabel"]+",as_char"],
91  deepCopy = False))
92 
93  return cfg
94 
95 
96 # GNNTool + VertexDecoratorAlg configs
97 

◆ GNNHSOverlapRemovalToolCfg()

def python.InDetGNNHardScatterSelectionConfig.GNNHSOverlapRemovalToolCfg (   flags,
  name = "GNNHS_OverlapRemovalToolCfg",
**  kwargs 
)

Definition at line 48 of file InDetGNNHardScatterSelectionConfig.py.

48 def GNNHSOverlapRemovalToolCfg(flags, name="GNNHS_OverlapRemovalToolCfg", **kwargs):
49  cfg = ComponentAccumulator()
50 
51  kwargs.setdefault("InputLabel", "selectPtEta")
52  kwargs.setdefault("OutputLabel", "passesOR")
53  kwargs.setdefault("OutputPassValue", True)
54 
55  subtool_kwargs={}
56  for prop in ["InputLabel", "OutputLabel", "OutputPassValue"]:
57  subtool_kwargs[prop] = kwargs[prop]
58 
59  kwargs.setdefault("EleEleORT", CompFactory.ORUtils.EleEleOverlapTool(**subtool_kwargs))
60  kwargs.setdefault("EleMuORT", CompFactory.ORUtils.EleMuSharedTrkOverlapTool(**subtool_kwargs))
61  kwargs.setdefault("EleJetORT", CompFactory.ORUtils.EleJetOverlapTool(**subtool_kwargs))
62  kwargs.setdefault("MuJetORT", CompFactory.ORUtils.MuJetOverlapTool(**subtool_kwargs))
63  kwargs.setdefault("PhoEleORT", CompFactory.ORUtils.DeltaROverlapTool(**subtool_kwargs))
64  kwargs.setdefault("PhoMuORT", CompFactory.ORUtils.DeltaROverlapTool(**subtool_kwargs))
65  kwargs.setdefault("PhoJetORT", CompFactory.ORUtils.DeltaROverlapTool(**subtool_kwargs))
66 
67  cfg.setPrivateTools(CompFactory.ORUtils.OverlapRemovalTool(name, **kwargs))
68  return cfg
69 

◆ GNNHSSelectionAlgCfg()

def python.InDetGNNHardScatterSelectionConfig.GNNHSSelectionAlgCfg (   flags,
  input,
  minPt 
)

Definition at line 28 of file InDetGNNHardScatterSelectionConfig.py.

28 def GNNHSSelectionAlgCfg(flags, input, minPt):
29  cfg = ComponentAccumulator()
30 
31  selectionTool = None
32  if input in ["Electrons", "Photons", "AntiKt4EMTopoJets"]:
33  selectionTool = cfg.popToolsAndMerge(
34  AsgPtEtaSelectionToolGapCfg(flags, minPt = minPt))
35  elif input in ["Muons"]:
36  selectionTool = cfg.popToolsAndMerge(
37  AsgPtEtaSelectionToolCfg(flags, minPt = minPt))
38 
39  cfg.addEventAlgo(CompFactory.CP.AsgSelectionAlg(
40  name = "GNNHS_"+input+"_SelectionAlg",
41  selectionTool = selectionTool,
42  selectionDecoration = "selectPtEta,as_char",
43  particles = input))
44 
45  return cfg
46 
47 

◆ GNNHSVertexDecoratorAlgCfg()

def python.InDetGNNHardScatterSelectionConfig.GNNHSVertexDecoratorAlgCfg (   flags,
  name = "GNNHS_VertexDecoratorAlg",
**  kwargs 
)

Definition at line 103 of file InDetGNNHardScatterSelectionConfig.py.

103 def GNNHSVertexDecoratorAlgCfg(flags, name="GNNHS_VertexDecoratorAlg", **kwargs):
104  cfg = ComponentAccumulator()
105 
106  kwargs.setdefault("photonsIn", "Photons")
107 
108  if "gnnTool" not in kwargs:
109  kwargs.setdefault("gnnTool", cfg.popToolsAndMerge(
110  GNNToolCfg(flags,
111  nnFile="InDetGNNHardScatterSelection/v0/HSGN2_export_090824.onnx")))
112 
113  if "TrackVertexAssociationTool" not in kwargs:
114  from TrackVertexAssociationTool.TrackVertexAssociationToolConfig import TTVAToolCfg
115  kwargs.setdefault("TrackVertexAssociationTool", cfg.popToolsAndMerge(
116  TTVAToolCfg(flags, "TrackVertexAssociationTool_GNNHS")))
117 
118  cfg.addEventAlgo(
119  CompFactory.InDetGNNHardScatterSelection.VertexDecoratorAlg(name, **kwargs))
120  return cfg
121 
122 
123 # Global Sequence

◆ GNNSequenceCfg()

def python.InDetGNNHardScatterSelectionConfig.GNNSequenceCfg (   flags)

Definition at line 124 of file InDetGNNHardScatterSelectionConfig.py.

124 def GNNSequenceCfg(flags):
125  cfg = ComponentAccumulator()
126 
127  sysSvc = CompFactory.CP.SystematicsSvc("SystematicsSvc")
128  selectionSvc = CompFactory.CP.SelectionNameSvc("SelectionNameSvc")
129  cfg.addService(sysSvc)
130  cfg.addService(selectionSvc)
131 
132  inputCollections = {
133  "jets": "AntiKt4EMTopoJets",
134  "electrons": "Electrons",
135  "muons": "Muons",
136  "photons": "Photons",
137  }
138 
139  from PhotonVertexSelection.PhotonVertexSelectionConfig import (
140  DecoratePhotonPointingAlgCfg)
141  cfg.merge(DecoratePhotonPointingAlgCfg(flags, PhotonContainerKey=inputCollections["photons"]))
142 
143  ptThresholds = {
144  "jets": 15000,
145  "electrons": 4500,
146  "muons": 3000,
147  "photons": 10000,
148  }
149 
150  for obj in inputCollections:
151  cfg.merge(GNNHSSelectionAlgCfg(flags, input = inputCollections[obj],
152  minPt = ptThresholds[obj]))
153 
154  overlapOutputNames = {
155  "muons": f'{inputCollections["muons"]}_OR',
156  "electrons": f'{inputCollections["electrons"]}_OR',
157  "photons": f'{inputCollections["photons"]}_OR',
158  "jets": f'{inputCollections["jets"]}_OR',
159  }
160 
161  cfg.merge(GNNHSOverlapRemovalAlgCfg(flags, overlapInputNames = inputCollections,
162  overlapOutputNames = overlapOutputNames))
163 
164  cfg.merge(GNNHSVertexDecoratorAlgCfg(
165  flags,
166  electronsIn=overlapOutputNames["electrons"],
167  muonsIn=overlapOutputNames["muons"],
168  photonsIn=overlapOutputNames["photons"],
169  jetsIn=overlapOutputNames["jets"]))
170 
171  return cfg
172 
173 

◆ GNNToolCfg()

def python.InDetGNNHardScatterSelectionConfig.GNNToolCfg (   flags,
  name = "HardScatterSelectionGNNTool",
**  kwargs 
)

Definition at line 98 of file InDetGNNHardScatterSelectionConfig.py.

98 def GNNToolCfg(flags, name="HardScatterSelectionGNNTool", **kwargs):
99  acc = ComponentAccumulator()
100  acc.setPrivateTools(CompFactory.InDetGNNHardScatterSelection.GNNTool(name, **kwargs))
101  return acc
102 

Variable Documentation

◆ Files

python.InDetGNNHardScatterSelectionConfig.Files

Definition at line 180 of file InDetGNNHardScatterSelectionConfig.py.

◆ flags

python.InDetGNNHardScatterSelectionConfig.flags = initConfigFlags()

Definition at line 176 of file InDetGNNHardScatterSelectionConfig.py.

◆ MaxEvents

python.InDetGNNHardScatterSelectionConfig.MaxEvents

Definition at line 181 of file InDetGNNHardScatterSelectionConfig.py.

◆ OutputLevel

python.InDetGNNHardScatterSelectionConfig.OutputLevel

Definition at line 197 of file InDetGNNHardScatterSelectionConfig.py.

◆ sc

python.InDetGNNHardScatterSelectionConfig.sc = top_acc.run(1)

Definition at line 203 of file InDetGNNHardScatterSelectionConfig.py.

◆ summariseProps

python.InDetGNNHardScatterSelectionConfig.summariseProps

Definition at line 198 of file InDetGNNHardScatterSelectionConfig.py.

◆ top_acc

python.InDetGNNHardScatterSelectionConfig.top_acc = MainServicesCfg(flags)

Definition at line 185 of file InDetGNNHardScatterSelectionConfig.py.

◆ True

python.InDetGNNHardScatterSelectionConfig.True

Definition at line 198 of file InDetGNNHardScatterSelectionConfig.py.

◆ withDetails

python.InDetGNNHardScatterSelectionConfig.withDetails

Definition at line 198 of file InDetGNNHardScatterSelectionConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.InDetGNNHardScatterSelectionConfig.GNNHSOverlapRemovalToolCfg
def GNNHSOverlapRemovalToolCfg(flags, name="GNNHS_OverlapRemovalToolCfg", **kwargs)
Definition: InDetGNNHardScatterSelectionConfig.py:48
python.InDetGNNHardScatterSelectionConfig.AsgPtEtaSelectionToolCfg
def AsgPtEtaSelectionToolCfg(flags, name="AsgPtEtaSelectionTool", **kwargs)
Definition: InDetGNNHardScatterSelectionConfig.py:10
PhotonVertexSelectionConfig.DecoratePhotonPointingAlgCfg
def DecoratePhotonPointingAlgCfg(flags, name="DecoratePhotonPointingAlg", **kwargs)
Definition: PhotonVertexSelectionConfig.py:21
TrackVertexAssociationToolConfig.TTVAToolCfg
def TTVAToolCfg(flags, name, addDecoAlg=True, VertexContName="PrimaryVertices", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:15
python.InDetGNNHardScatterSelectionConfig.GNNHSSelectionAlgCfg
def GNNHSSelectionAlgCfg(flags, input, minPt)
Definition: InDetGNNHardScatterSelectionConfig.py:28
python.InDetGNNHardScatterSelectionConfig.GNNHSVertexDecoratorAlgCfg
def GNNHSVertexDecoratorAlgCfg(flags, name="GNNHS_VertexDecoratorAlg", **kwargs)
Definition: InDetGNNHardScatterSelectionConfig.py:103
python.InDetGNNHardScatterSelectionConfig.AsgViewFromSelectionAlgCfg
def AsgViewFromSelectionAlgCfg(flags, name="AsgViewFromSelectionAlg", **kwargs)
Definition: InDetGNNHardScatterSelectionConfig.py:21
python.InDetGNNHardScatterSelectionConfig.AsgPtEtaSelectionToolGapCfg
def AsgPtEtaSelectionToolGapCfg(flags, name="AsgPtEtaSelectionTool", **kwargs)
Definition: InDetGNNHardScatterSelectionConfig.py:16
python.InDetGNNHardScatterSelectionConfig.GNNHSOverlapRemovalAlgCfg
def GNNHSOverlapRemovalAlgCfg(flags, name="GNNHS_OverlapRemovalAlg", overlapInputNames=None, overlapOutputNames=None, **kwargs)
Definition: InDetGNNHardScatterSelectionConfig.py:70
python.InDetGNNHardScatterSelectionConfig.GNNSequenceCfg
def GNNSequenceCfg(flags)
Definition: InDetGNNHardScatterSelectionConfig.py:124
python.InDetGNNHardScatterSelectionConfig.GNNToolCfg
def GNNToolCfg(flags, name="HardScatterSelectionGNNTool", **kwargs)
Definition: InDetGNNHardScatterSelectionConfig.py:98