Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
EGammaToolsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 # ==============================================================================
4 # Provides configs for the tools used for e-gamma decorations used in DAOD
5 # building
6 # ==============================================================================
7 
8 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory import CompFactory
10 
11 
12 # PhotonsDirectionTool
13 def PhotonsDirectionToolCfg(flags, name, **kwargs):
14  """Configure the PhotonsDirectionTool"""
15  acc = ComponentAccumulator()
16  PhotonsDirectionTool = CompFactory.DerivationFramework.PhotonsDirectionTool
17  acc.addPublicTool(PhotonsDirectionTool(name, **kwargs), primary=True)
18  return acc
19 
20 
21 # E-gamma selection tool wrapper
22 def EGSelectionToolWrapperCfg(flags, name, **kwargs):
23  """Configure the E-gamma selection tool wrapper"""
24  acc = ComponentAccumulator()
25  EGSelectionToolWrapper = CompFactory.DerivationFramework.EGSelectionToolWrapper
26  acc.addPublicTool(EGSelectionToolWrapper(name, **kwargs), primary=True)
27  return acc
28 
29 
30 # Electron likelihood tool wrapper
31 def EGElectronLikelihoodToolWrapperCfg(flags, name, **kwargs):
32  """Configure the electron likelihood tool wrapper"""
33  acc = ComponentAccumulator()
34  EGElectronLikelihoodToolWrapper = (
35  CompFactory.DerivationFramework.EGElectronLikelihoodToolWrapper
36  )
37  acc.addPublicTool(EGElectronLikelihoodToolWrapper(name, **kwargs), primary=True)
38  return acc
39 
40 
41 # Photon cleaning tool wrapper
42 def EGPhotonCleaningWrapperCfg(flags, name, **kwargs):
43  """Configure the photon cleaning tool wrapper"""
44  acc = ComponentAccumulator()
45  EGPhotonCleaningWrapper = CompFactory.DerivationFramework.EGPhotonCleaningWrapper
46  acc.addPublicTool(EGPhotonCleaningWrapper(name, **kwargs), primary=True)
47  return acc
48 
49 
50 # Electron ambiguity tool
51 def EGElectronAmbiguityToolCfg(flags, name, **kwargs):
52  """Configure the electron ambiguity tool"""
53  acc = ComponentAccumulator()
54  EGElectronAmbiguityTool = CompFactory.DerivationFramework.EGElectronAmbiguityTool
55  acc.addPublicTool(EGElectronAmbiguityTool(name, **kwargs), primary=True)
56  return acc
57 
58 
59 # Background electron classification tool
60 def BkgElectronClassificationCfg(flags, name, **kwargs):
61  """Configure the background electron classification tool"""
62  acc = ComponentAccumulator()
63  BkgElectronClassification = (
64  CompFactory.DerivationFramework.BkgElectronClassification
65  )
66  acc.addPublicTool(BkgElectronClassification(name, **kwargs), primary=True)
67  return acc
68 
69 
70 # Standard + LRT electron collection merger
71 def ElectronMergerCfg(flags, name, **kwargs):
72  """Configure the track particle merger tool"""
73  acc = ComponentAccumulator()
74  ElectronMerger = CompFactory.DerivationFramework.ElectronMergerTool
75  acc.addPublicTool(ElectronMerger(name, **kwargs), primary=True)
76  return acc
77 
78 
80  flags, name="PhotonVertexSelectionWrapper", **kwargs):
81  acc = ComponentAccumulator()
82 
83  if "PhotonPointingTool" not in kwargs:
84  from PhotonVertexSelection.PhotonVertexSelectionConfig import (
85  PhotonPointingToolCfg)
86  kwargs.setdefault("PhotonPointingTool", acc.popToolsAndMerge(
87  PhotonPointingToolCfg(flags)))
88 
89  acc.setPrivateTools(
90  CompFactory.DerivationFramework.PhotonVertexSelectionWrapper(
91  name, **kwargs))
92  return acc
93 
94 
96  flags, name="PhotonVertexSelectionWrapperKernel", **kwargs):
97  acc = ComponentAccumulator()
98 
99  augmentationTools = [
100  acc.addPublicTool(acc.popToolsAndMerge(PhotonVertexSelectionWrapperCfg(flags)))
101  ]
102  kwargs.setdefault("AugmentationTools", augmentationTools)
103 
104  acc.addEventAlgo(
105  CompFactory.DerivationFramework.DerivationKernel(name, **kwargs))
106  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.EGammaToolsConfig.EGSelectionToolWrapperCfg
def EGSelectionToolWrapperCfg(flags, name, **kwargs)
Definition: EGammaToolsConfig.py:22
python.EGammaToolsConfig.ElectronMergerCfg
def ElectronMergerCfg(flags, name, **kwargs)
Definition: EGammaToolsConfig.py:71
PhotonVertexSelectionConfig.PhotonPointingToolCfg
def PhotonPointingToolCfg(flags, name="PhotonPointingTool", **kwargs)
Definition: PhotonVertexSelectionConfig.py:7
python.EGammaToolsConfig.EGElectronAmbiguityToolCfg
def EGElectronAmbiguityToolCfg(flags, name, **kwargs)
Definition: EGammaToolsConfig.py:51
python.EGammaToolsConfig.EGPhotonCleaningWrapperCfg
def EGPhotonCleaningWrapperCfg(flags, name, **kwargs)
Definition: EGammaToolsConfig.py:42
python.EGammaToolsConfig.EGElectronLikelihoodToolWrapperCfg
def EGElectronLikelihoodToolWrapperCfg(flags, name, **kwargs)
Definition: EGammaToolsConfig.py:31
python.EGammaToolsConfig.BkgElectronClassificationCfg
def BkgElectronClassificationCfg(flags, name, **kwargs)
Definition: EGammaToolsConfig.py:60
python.EGammaToolsConfig.PhotonVertexSelectionWrapperCfg
def PhotonVertexSelectionWrapperCfg(flags, name="PhotonVertexSelectionWrapper", **kwargs)
Definition: EGammaToolsConfig.py:79
python.EGammaToolsConfig.PhotonsDirectionToolCfg
def PhotonsDirectionToolCfg(flags, name, **kwargs)
Definition: EGammaToolsConfig.py:13
python.EGammaToolsConfig.PhotonVertexSelectionWrapperKernelCfg
def PhotonVertexSelectionWrapperKernelCfg(flags, name="PhotonVertexSelectionWrapperKernel", **kwargs)
Definition: EGammaToolsConfig.py:95