Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
DerivationFrameworkCaloConfig Namespace Reference

Functions

def MaxCellDecoratorCfg (flags, **kwargs)
 
def GainDecoratorCfg (flags, **kwargs)
 
def EgammaCoreCellRecoveryCfg (flags, **kwargs)
 
def CaloFillRectangularClusterCfg (flags, **kwargs)
 
def ClusterEnergyPerLayerDecoratorCfg (flags, **kwargs)
 
def MaxCellDecoratorKernelCfg (flags, name="MaxCellDecoratorKernel", **kwargs)
 
def CaloDecoratorKernelCfg (flags, name="CaloDecoratorKernel", **kwargs)
 
def CaloClusterThinningCfg (flags, **kwargs)
 
def JetCaloClusterThinningCfg (flags, **kwargs)
 
def getGainLayerNames (tool)
 additional utilities to return the list of decorations added by the tools More...
 
def getGainDecorations (acc, flags, kernel, collections=None, info=["E", "nCells"])
 
def getClusterEnergyPerLayerDecorations (acc, kernel)
 

Function Documentation

◆ CaloClusterThinningCfg()

def DerivationFrameworkCaloConfig.CaloClusterThinningCfg (   flags,
**  kwargs 
)

Definition at line 104 of file DerivationFrameworkCaloConfig.py.

104 def CaloClusterThinningCfg(flags, **kwargs):
105  acc = ComponentAccumulator()
106  CaloClusterThinning = CompFactory.DerivationFramework.CaloClusterThinning
107  acc.addPublicTool(CaloClusterThinning(**kwargs), primary=True)
108  return acc
109 

◆ CaloDecoratorKernelCfg()

def DerivationFrameworkCaloConfig.CaloDecoratorKernelCfg (   flags,
  name = "CaloDecoratorKernel",
**  kwargs 
)

Definition at line 82 of file DerivationFrameworkCaloConfig.py.

82 def CaloDecoratorKernelCfg(flags, name="CaloDecoratorKernel", **kwargs):
83  acc = MaxCellDecoratorKernelCfg(flags)
84 
85  augmentationTools = [
86  acc.addPublicTool(acc.popToolsAndMerge(GainDecoratorCfg(flags)))
87  ]
88 
89  # might need some modification if cell-level reweighting is implemented
90  cluster_sizes = (3, 7), (5, 5), (7, 11)
91  for neta, nphi in cluster_sizes:
92  cename = "ClusterEnergyPerLayerDecorator_%sx%s" % (neta, nphi)
93  ClusterEnergyPerLayerDecorator = acc.popToolsAndMerge(
94  ClusterEnergyPerLayerDecoratorCfg(flags, neta=neta, nphi=nphi, name=cename)
95  )
96  augmentationTools.append(acc.addPublicTool(ClusterEnergyPerLayerDecorator))
97 
98  kwargs.setdefault("AugmentationTools", augmentationTools)
99 
100  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, **kwargs))
101  return acc
102 
103 

◆ CaloFillRectangularClusterCfg()

def DerivationFrameworkCaloConfig.CaloFillRectangularClusterCfg (   flags,
**  kwargs 
)

Definition at line 41 of file DerivationFrameworkCaloConfig.py.

41 def CaloFillRectangularClusterCfg(flags, **kwargs):
42  acc = ComponentAccumulator()
43  kwargs.setdefault("cells_name", flags.Egamma.Keys.Input.CaloCells)
44  kwargs.setdefault("fill_cluster", True)
45  acc.setPrivateTools(CompFactory.CaloFillRectangularCluster(**kwargs))
46  return acc
47 
48 

◆ ClusterEnergyPerLayerDecoratorCfg()

def DerivationFrameworkCaloConfig.ClusterEnergyPerLayerDecoratorCfg (   flags,
**  kwargs 
)

Definition at line 49 of file DerivationFrameworkCaloConfig.py.

49 def ClusterEnergyPerLayerDecoratorCfg(flags, **kwargs):
50  acc = ComponentAccumulator()
51  kwargs.setdefault("SGKey_electrons", flags.Egamma.Keys.Output.Electrons)
52  kwargs.setdefault("SGKey_photons", flags.Egamma.Keys.Output.Photons)
53  kwargs.setdefault("SGKey_caloCells", flags.Egamma.Keys.Input.CaloCells)
54  kwargs.setdefault("neta", 5)
55  kwargs.setdefault("nphi", 5)
56  toolArgs = {}
57  toolArgs.update({"eta_size": kwargs["neta"]})
58  toolArgs.update({"phi_size": kwargs["nphi"]})
59  kwargs.setdefault(
60  "CaloFillRectangularClusterTool",
61  acc.popToolsAndMerge(CaloFillRectangularClusterCfg(flags, **toolArgs)),
62  )
63  acc.setPrivateTools(
64  CompFactory.DerivationFramework.ClusterEnergyPerLayerDecorator(**kwargs)
65  )
66  return acc
67 
68 

◆ EgammaCoreCellRecoveryCfg()

def DerivationFrameworkCaloConfig.EgammaCoreCellRecoveryCfg (   flags,
**  kwargs 
)

Definition at line 27 of file DerivationFrameworkCaloConfig.py.

27 def EgammaCoreCellRecoveryCfg(flags, **kwargs):
28  acc = ComponentAccumulator()
29  # needed for reading cells, do not rely on other config to do that
30  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
31  acc.merge(LArGMCfg(flags))
32  from TileGeoModel.TileGMConfig import TileGMCfg
33  acc.merge(TileGMCfg(flags))
34  #
35  acc.setPrivateTools(
36  CompFactory.DerivationFramework.EGammaClusterCoreCellRecovery(**kwargs)
37  )
38  return acc
39 
40 

◆ GainDecoratorCfg()

def DerivationFrameworkCaloConfig.GainDecoratorCfg (   flags,
**  kwargs 
)

Definition at line 18 of file DerivationFrameworkCaloConfig.py.

18 def GainDecoratorCfg(flags, **kwargs):
19  acc = ComponentAccumulator()
20  kwargs.setdefault("SGKey_electrons", flags.Egamma.Keys.Output.Electrons)
21  kwargs.setdefault("SGKey_photons", flags.Egamma.Keys.Output.Photons)
22  kwargs.setdefault("name", "GainDecor")
23  acc.setPrivateTools(CompFactory.DerivationFramework.GainDecorator(**kwargs))
24  return acc
25 
26 

◆ getClusterEnergyPerLayerDecorations()

def DerivationFrameworkCaloConfig.getClusterEnergyPerLayerDecorations (   acc,
  kernel 
)
getClusterEnergyPerLayerDecorationsLegacy( acc, kernel ) -> return a list of names of the
decorations added to the egamma object, given the ClusterEnergyPerLayerDecorations
object (e.g. Photons.E7x11_Lr0, ...)

Definition at line 164 of file DerivationFrameworkCaloConfig.py.

164 def getClusterEnergyPerLayerDecorations(acc, kernel):
165  """getClusterEnergyPerLayerDecorationsLegacy( acc, kernel ) -> return a list of names of the
166  decorations added to the egamma object, given the ClusterEnergyPerLayerDecorations
167  object (e.g. Photons.E7x11_Lr0, ...)"""
168  properties = "SGKey_photons", "SGKey_electrons"
169  ClusterEnergyPerLayerDecorators = []
170  for toolStr in acc.getEventAlgo(kernel).AugmentationTools:
171  toolStr = f"{toolStr}"
172  splitStr = toolStr.split("/")
173  tool = acc.getPublicTool(splitStr[1])
174  if splitStr[0] == "DerivationFramework::ClusterEnergyPerLayerDecorator":
175  ClusterEnergyPerLayerDecorators.append(tool)
176 
177  decorations = []
178  for tool in ClusterEnergyPerLayerDecorators:
179  collections = filter(bool, (getattr(tool, x) for x in properties))
180  for part in collections:
181  for layer in tool.layers:
182  decorations.extend(
183  [
184  "{part}.E{neta}x{nphi}_Lr{layer}".format(
185  part=part,
186  neta=tool.neta,
187  nphi=tool.nphi,
188  layer=layer,
189  )
190  ]
191  )
192  return decorations

◆ getGainDecorations()

def DerivationFrameworkCaloConfig.getGainDecorations (   acc,
  flags,
  kernel,
  collections = None,
  info = ["E", "nCells"] 
)
getGainDecorations( acc, kernel collections=["Electrons", "Photons"] ) ->
Return a list with the 'ExtraContent' to be added to the decorations to save the gain
information per layer

Definition at line 132 of file DerivationFrameworkCaloConfig.py.

133  acc,
134  flags,
135  kernel,
136  collections=None,
137  info=["E", "nCells"],
138 ):
139  """getGainDecorations( acc, kernel collections=["Electrons", "Photons"] ) ->
140  Return a list with the 'ExtraContent' to be added to the decorations to save the gain
141  information per layer"""
142 
143  if collections is None:
144  collections = [flags.Egamma.Keys.Output.Electrons, flags.Egamma.Keys.Output.Photons]
145 
146  GainDecoratorTool = None
147  for toolStr in acc.getEventAlgo(kernel).AugmentationTools:
148  toolStr = f"{toolStr}"
149  splitStr = toolStr.split("/")
150  tool = acc.getPublicTool(splitStr[1])
151  if splitStr[0] == "DerivationFramework::GainDecorator":
152  GainDecoratorTool = tool
153 
154  if GainDecoratorTool:
155  return [
156  "{part}.{info}".format(part=part, info=info)
157  for part in collections
158  for info in getGainLayerNames(GainDecoratorTool)
159  ]
160  else:
161  return ""
162 
163 

◆ getGainLayerNames()

def DerivationFrameworkCaloConfig.getGainLayerNames (   tool)

additional utilities to return the list of decorations added by the tools

getGainLayerNames( tool ) -> return a list of names of the decorations added to the
egamma tool, given the GainDecorator tool

Definition at line 121 of file DerivationFrameworkCaloConfig.py.

121 def getGainLayerNames(tool):
122  """getGainLayerNames( tool ) -> return a list of names of the decorations added to the
123  egamma tool, given the GainDecorator tool"""
124  return [
125  tool.decoration_pattern.format(info=info, layer=layer, gain=gain)
126  for info in ["E", "nCells"]
127  for layer in tool.layers
128  for gain in tool.gain_names.values()
129  ]
130 
131 

◆ JetCaloClusterThinningCfg()

def DerivationFrameworkCaloConfig.JetCaloClusterThinningCfg (   flags,
**  kwargs 
)

Definition at line 110 of file DerivationFrameworkCaloConfig.py.

110 def JetCaloClusterThinningCfg(flags, **kwargs):
111  acc = ComponentAccumulator()
112  JetCaloClusterThinning = CompFactory.DerivationFramework.JetCaloClusterThinning
113  acc.addPublicTool(JetCaloClusterThinning(**kwargs), primary=True)
114  return acc
115 

◆ MaxCellDecoratorCfg()

def DerivationFrameworkCaloConfig.MaxCellDecoratorCfg (   flags,
**  kwargs 
)

Definition at line 7 of file DerivationFrameworkCaloConfig.py.

7 def MaxCellDecoratorCfg(flags, **kwargs):
9  kwargs.setdefault("SGKey_electrons", flags.Egamma.Keys.Output.Electrons)
10  kwargs.setdefault("SGKey_photons", flags.Egamma.Keys.Output.Photons)
11  acc.setPrivateTools(CompFactory.DerivationFramework.MaxCellDecorator(**kwargs))
12  from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
13 
14  acc.merge(LArOnOffIdMappingCfg(flags))
15  return acc
16 
17 

◆ MaxCellDecoratorKernelCfg()

def DerivationFrameworkCaloConfig.MaxCellDecoratorKernelCfg (   flags,
  name = "MaxCellDecoratorKernel",
**  kwargs 
)

Definition at line 69 of file DerivationFrameworkCaloConfig.py.

69 def MaxCellDecoratorKernelCfg(flags, name="MaxCellDecoratorKernel", **kwargs):
70  acc = ComponentAccumulator()
71 
72  augmentationTools = [
73  acc.addPublicTool(acc.popToolsAndMerge(MaxCellDecoratorCfg(flags)))
74  ]
75 
76  kwargs.setdefault("AugmentationTools", augmentationTools)
77 
78  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, **kwargs))
79  return acc
80 
81 
DerivationFrameworkCaloConfig.CaloClusterThinningCfg
def CaloClusterThinningCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:104
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
DerivationFrameworkCaloConfig.JetCaloClusterThinningCfg
def JetCaloClusterThinningCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:110
DerivationFrameworkCaloConfig.MaxCellDecoratorCfg
def MaxCellDecoratorCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:7
covarianceTool.filter
filter
Definition: covarianceTool.py:514
DerivationFrameworkCaloConfig.EgammaCoreCellRecoveryCfg
def EgammaCoreCellRecoveryCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:27
DerivationFrameworkCaloConfig.GainDecoratorCfg
def GainDecoratorCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:18
DerivationFrameworkCaloConfig.getGainLayerNames
def getGainLayerNames(tool)
additional utilities to return the list of decorations added by the tools
Definition: DerivationFrameworkCaloConfig.py:121
DerivationFrameworkCaloConfig.ClusterEnergyPerLayerDecoratorCfg
def ClusterEnergyPerLayerDecoratorCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:49
DerivationFrameworkCaloConfig.MaxCellDecoratorKernelCfg
def MaxCellDecoratorKernelCfg(flags, name="MaxCellDecoratorKernel", **kwargs)
Definition: DerivationFrameworkCaloConfig.py:69
LArCablingConfig.LArOnOffIdMappingCfg
def LArOnOffIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:62
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
DerivationFrameworkCaloConfig.CaloDecoratorKernelCfg
def CaloDecoratorKernelCfg(flags, name="CaloDecoratorKernel", **kwargs)
Definition: DerivationFrameworkCaloConfig.py:82
DerivationFrameworkCaloConfig.getClusterEnergyPerLayerDecorations
def getClusterEnergyPerLayerDecorations(acc, kernel)
Definition: DerivationFrameworkCaloConfig.py:164
DerivationFrameworkCaloConfig.getGainDecorations
def getGainDecorations(acc, flags, kernel, collections=None, info=["E", "nCells"])
Definition: DerivationFrameworkCaloConfig.py:132
DerivationFrameworkCaloConfig.CaloFillRectangularClusterCfg
def CaloFillRectangularClusterCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:41
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7