ATLAS Offline Software
ConfigAccumulator.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 import AnaAlgorithm.DualUseConfig as DualUseConfig
4 from AthenaConfiguration.Enums import LHCPeriod, FlagEnum
5 import re
6 
7 class DataType(FlagEnum):
8  """holds the various data types as an enum"""
9  Data = 'data'
10  FullSim = 'fullsim'
11  FastSim = 'fastsim'
12 
13 
15  """all the data for a given selection that has been registered
16 
17  the bits argument is for backward compatibility, does nothing, and will be
18  removed in the future."""
19 
20  def __init__ (self, selectionName, decoration,
21  *, bits=0, preselection=None, comesFrom = '',
22  writeToOutput=True) :
23  self.name = selectionName
24  self.decoration = decoration
25  if preselection is not None :
26  self.preselection = preselection
27  else :
28  self.preselection = (selectionName == '')
29  self.comesFrom = comesFrom
30  self.writeToOutput = writeToOutput
31 
32 
33 
34 class OutputConfig :
35  """all the data for a given variables in the output that has been registered"""
36 
37  def __init__ (self, origContainerName, variableName,
38  *, noSys, enabled) :
39  self.origContainerName = origContainerName
40  self.outputContainerName = None
41  self.variableName = variableName
42  self.noSys = noSys
43  self.enabled = enabled
44 
45 
46 
48  """all the auto-generated meta-configuration data for a single container
49 
50  This tracks the naming of all temporary containers, as well as all the
51  selection decorations."""
52 
53  def __init__ (self, name, sourceName, *, originalName = None, noSysSuffix) :
54  self.name = name
55  self.sourceName = sourceName
56  self.originalName = originalName
57  self.noSysSuffix = noSysSuffix
58  self.index = 0
59  self.maxIndex = None
60  self.viewIndex = 1
61  self.isMet = False
62  self.selections = []
63  self.outputs = {}
64 
65  def currentName (self) :
66  if self.index == 0 :
67  if self.sourceName is None :
68  raise Exception ("should not get here, reading container name before created: " + self.name)
69  return self.sourceName
70  if self.maxIndex and self.index == self.maxIndex :
71  return self.systematicsName(self.name, noSysSuffix=self.noSysSuffix)
72  return self.systematicsName(f"{self.name}_STEP{self.index}", noSysSuffix=self.noSysSuffix)
73 
74  @staticmethod
75  def systematicsName (name, *, noSysSuffix) :
76  """map an internal name to a name for systematics data handles
77 
78  Right now this just means appending a _%SYS% to the name."""
79  if not noSysSuffix :
80  return name + "_%SYS%"
81  else :
82  return name
83 
84  def nextPass (self) :
85  self.maxIndex = self.index
86  self.index = 0
87  self.viewIndex = 1
88  self.selections = []
89  self.outputs = {}
90 
91 
92 
94  """a class that accumulates a configuration from blocks into an
95  algorithm sequence
96 
97  This is used as argument to the ConfigurationBlock methods, which
98  need to be called in the correct order. This class will track all
99  meta-information that needs to be communicated between blocks
100  during configuration, and also add the created algorithms to the
101  sequence.
102 
103  Use/access of containers in the event store is handled via
104  references that this class hands out. This happens in a separate
105  step before the algorithms are created, as the naming of
106  containers will depend on where in the chain the container is
107  used.
108  """
109 
110  def __init__ (self, algSeq, dataType=None, isPhyslite=False, geometry=None, dsid=0,
111  campaign=None, runNumber=None, autoconfigFromFlags=None, noSysSuffix=False,
112  noSystematics=None, dataYear=0):
113  self._autoconfigFlags = autoconfigFromFlags
114  if autoconfigFromFlags is not None:
115  if autoconfigFromFlags.Input.isMC:
116  if autoconfigFromFlags.Sim.ISF.Simulator.usesFastCaloSim():
117  dataType = DataType.FastSim
118  else:
119  dataType = DataType.FullSim
120  else:
121  dataType = DataType.Data
122  isPhyslite = 'StreamDAOD_PHYSLITE' in autoconfigFromFlags.Input.ProcessingTags
123  if geometry is None:
124  geometry = autoconfigFromFlags.GeoModel.Run
125  if dsid == 0 and dataType is not DataType.Data:
126  dsid = autoconfigFromFlags.Input.MCChannelNumber
127  if campaign is None:
128  campaign = autoconfigFromFlags.Input.MCCampaign
129  if runNumber is None:
130  runNumber = int(autoconfigFromFlags.Input.RunNumbers[0])
131  if dataYear == 0:
132  dataYear = autoconfigFromFlags.Input.DataYear
133  generatorInfo = autoconfigFromFlags.Input.GeneratorsInfo
134  else:
135  # legacy mappings of string arguments
136  if isinstance(dataType, str):
137  if dataType == 'mc':
138  dataType = DataType.FullSim
139  elif dataType == 'afii':
140  dataType = DataType.FastSim
141  else:
142  dataType = DataType(dataType)
143  generatorInfo = None
144  if runNumber is None:
145  runNumber = 284500
146  # allow possible string argument for `geometry` and convert it to enum
147  geometry = LHCPeriod(geometry)
148  if geometry is LHCPeriod.Run1:
149  raise ValueError ("invalid Run geometry: %s" % geometry.value)
150  # store also the data year for data
151  self._dataType = dataType
152  self._isPhyslite = isPhyslite
153  self._geometry = geometry
154  self._dsid = dsid
155  self._campaign = campaign
156  self._runNumber = runNumber
157  self._dataYear = dataYear
158  self._generatorInfo = generatorInfo
159  self._algSeq = algSeq
160  self._noSystematics = noSystematics
161  self._noSysSuffix = noSysSuffix
164  self._pass = 0
165  self._algorithms = {}
166  self._currentAlg = None
167  self._selectionNameExpr = re.compile ('[A-Za-z_][A-Za-z_0-9]+')
168  self.setSourceName ('EventInfo', 'EventInfo')
169  self._eventcutflow = {}
170  self._muonCalibMode = -1
171 
172  # If we are in an Athena environment with ComponentAccumulator configuration
173  # then the AlgSequence, which is Gaudi.AthSequencer, does not support '+=',
174  # and we in any case want to produce an output ComponentAccumulator
175  self.CA = None
176  if DualUseConfig.useComponentAccumulator:
177  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
178  self.CA = ComponentAccumulator()
179  # if we have a component accumulator the user is not required to pass
180  # in a sequence, but if they do let's add it
181  if algSeq :
182  self.CA.addSequence(algSeq)
183 
184 
185  def noSystematics (self) :
186  """noSystematics flag used by CommonServices block"""
187  return self._noSystematics
188 
189  def autoconfigFlags (self) :
190  """auto configuration flags"""
191  return self._autoconfigFlags
192 
193  def dataType (self) :
194  """the data type we run on (data, fullsim, fastsim)"""
195  return self._dataType
196 
197  def isPhyslite (self) :
198  """whether we run on PHYSLITE"""
199  return self._isPhyslite
200 
201  def geometry (self) :
202  """the LHC Run period we run on"""
203  return self._geometry
204 
205  def dsid(self) :
206  """the mcChannelNumber or DSID of the sample we run on"""
207  return self._dsid
208 
209  def campaign(self) :
210  """the MC campaign we run on"""
211  return self._campaign
212 
213  def runNumber(self) :
214  """the MC runNumber"""
215  return self._runNumber
216 
217  def dataYear(self) :
218  """for data, the corresponding year; for MC, zero"""
219  return self._dataYear
220 
221  def generatorInfo(self) :
222  """the dictionary of MC generators and their versions for the sample we run on"""
223  return self._generatorInfo
224 
225  def createAlgorithm (self, type, name, reentrant=False) :
226  """create a new algorithm and register it as the current algorithm"""
227  if self._pass == 0 :
228  if name in self._algorithms :
229  raise Exception ('duplicate algorithms: ' + name)
230  if reentrant:
231  alg = DualUseConfig.createReentrantAlgorithm (type, name)
232  else:
233  alg = DualUseConfig.createAlgorithm (type, name)
234 
235  if DualUseConfig.useComponentAccumulator:
236  if self._algSeq :
237  self.CA.addEventAlgo(alg,self._algSeq.name)
238  else :
239  self.CA.addEventAlgo(alg)
240  else:
241  self._algSeq += alg
242  self._algorithms[name] = alg
243  self._currentAlg = alg
244  return alg
245  else :
246  if name not in self._algorithms :
247  raise Exception ('unknown algorithm requested: ' + name)
248  self._currentAlg = self._algorithms[name]
249  if self.CA and self._currentAlg != self.CA.getEventAlgo(name) :
250  raise Exception ('change to algorithm object: ' + name)
251  return self._algorithms[name]
252 
253 
254  def createService (self, type, name) :
255  '''create a new service and register it as the "current algorithm"'''
256  if self._pass == 0 :
257  if name in self._algorithms :
258  raise Exception ('duplicate service: ' + name)
259  service = DualUseConfig.createService (type, name)
260  # Avoid importing AthenaCommon.AppMgr in a CA Athena job
261  # as it modifies Gaudi behaviour
262  if DualUseConfig.isAthena:
263  if DualUseConfig.useComponentAccumulator:
264  self.CA.addService(service)
265  else:
266  # We're not, so let's remember this as a "normal" algorithm:
267  self._algSeq += service
268  self._algorithms[name] = service
269  self._currentAlg = service
270  return service
271  else :
272  if name not in self._algorithms :
273  raise Exception ('unknown service requested: ' + name)
274  self._currentAlg = self._algorithms[name]
275  return self._algorithms[name]
276 
277 
278  def createPublicTool (self, type, name) :
279  '''create a new public tool and register it as the "current algorithm"'''
280  if self._pass == 0 :
281  if name in self._algorithms :
282  raise Exception ('duplicate public tool: ' + name)
283  tool = DualUseConfig.createPublicTool (type, name)
284  # Avoid importing AthenaCommon.AppMgr in a CA Athena job
285  # as it modifies Gaudi behaviour
286  if DualUseConfig.isAthena:
287  if DualUseConfig.useComponentAccumulator:
288  self.CA.addPublicTool(tool)
289  else:
290  # We're not, so let's remember this as a "normal" algorithm:
291  self._algSeq += tool
292  self._algorithms[name] = tool
293  self._currentAlg = tool
294  return tool
295  else :
296  if name not in self._algorithms :
297  raise Exception ('unknown public tool requested: ' + name)
298  self._currentAlg = self._algorithms[name]
299  return self._algorithms[name]
300 
301 
302  def addPrivateTool (self, propertyName, toolType) :
303  """add a private tool to the current algorithm"""
304  if self._pass == 0 :
305  DualUseConfig.addPrivateTool (self._currentAlg, propertyName, toolType)
306 
307 
308  def setSourceName (self, containerName, sourceName,
309  *, originalName = None) :
310  """set the (default) name of the source/original container
311 
312  This is essentially meant to allow using e.g. the muon
313  configuration and the user not having to manually specify that
314  they want to use the Muons/AnalysisMuons container from the
315  input file.
316 
317  In addition it allows to set the original name of the
318  container (which may be different from the source name), which
319  is mostly/exclusively used for jet containers, so that
320  subsequent configurations know which jet container they
321  operate on.
322  """
323  if containerName not in self._containerConfig :
324  self._containerConfig[containerName] = ContainerConfig (containerName, sourceName, noSysSuffix = self._noSysSuffix, originalName = originalName)
325 
326 
327  def writeName (self, containerName, *, isMet=None) :
328  """register that the given container will be made and return
329  its name"""
330  if containerName not in self._containerConfig :
331  self._containerConfig[containerName] = ContainerConfig (containerName, sourceName = None, noSysSuffix = self._noSysSuffix)
332  if self._containerConfig[containerName].sourceName is not None :
333  raise Exception ("trying to write container configured for input: " + containerName)
334  if self._containerConfig[containerName].index != 0 :
335  raise Exception ("trying to write container twice: " + containerName)
336  self._containerConfig[containerName].index += 1
337  if isMet is not None :
338  self._containerConfig[containerName].isMet = isMet
339  return self._containerConfig[containerName].currentName()
340 
341 
342  def readName (self, containerName) :
343  """get the name of the "current copy" of the given container
344 
345  As extra copies get created during processing this will track
346  the correct name of the current copy. Optionally one can pass
347  in the name of the container before the first copy.
348  """
349  if containerName not in self._containerConfig :
350  raise Exception ("no source container for: " + containerName)
351  return self._containerConfig[containerName].currentName()
352 
353 
354  def copyName (self, containerName) :
355  """register that a copy of the container will be made and return
356  its name"""
357  if containerName not in self._containerConfig :
358  raise Exception ("unknown container: " + containerName)
359  self._containerConfig[containerName].index += 1
360  return self._containerConfig[containerName].currentName()
361 
362 
363  def wantCopy (self, containerName) :
364  """ask whether we want/need a copy of the container
365 
366  This usually only happens if no copy of the container has been
367  made yet and the copy is needed to allow modifications, etc.
368  """
369  if containerName not in self._containerConfig :
370  raise Exception ("no source container for: " + containerName)
371  return self._containerConfig[containerName].index == 0
372 
373 
374  def originalName (self, containerName) :
375  """get the "original" name of the given container
376 
377  This is mostly/exclusively used for jet containers, so that
378  subsequent configurations know which jet container they
379  operate on.
380  """
381  if containerName not in self._containerConfig :
382  raise Exception ("container unknown: " + containerName)
383  result = self._containerConfig[containerName].originalName
384  if result is None :
385  raise Exception ("no original name for: " + containerName)
386  return result
387 
388 
389  def isMetContainer (self, containerName) :
390  """whether the given container is registered as a MET container
391 
392  This is mostly/exclusively used for determining whether to
393  write out the whole container or just a single MET term.
394  """
395  if containerName not in self._containerConfig :
396  raise Exception ("container unknown: " + containerName)
397  return self._containerConfig[containerName].isMet
398 
399 
400  def readNameAndSelection (self, containerName, *, excludeFrom = None) :
401  """get the name of the "current copy" of the given container, and the
402  selection string
403 
404  This is mostly meant for MET and OR for whom the actual object
405  selection is relevant, and which as such allow to pass in the
406  working point as "ObjectName.WorkingPoint".
407  """
408  split = containerName.split (".")
409  if len(split) == 1 :
410  objectName = split[0]
411  selectionName = ''
412  elif len(split) == 2 :
413  objectName = split[0]
414  selectionName = split[1]
415  else :
416  raise Exception ('invalid object selection name: ' + containerName)
417  return self.readName (objectName), self.getFullSelection (objectName, selectionName, excludeFrom=excludeFrom)
418 
419 
420  def nextPass (self) :
421  """switch to the next configuration pass
422 
423  Configuration happens in two steps, with all the blocks processed
424  twice. This switches from the first to the second pass.
425  """
426  if self._pass != 0 :
427  raise Exception ("already performed final pass")
428  for name in self._containerConfig :
429  self._containerConfig[name].nextPass ()
430  self._pass = 1
431  self._currentAlg = None
432  self._outputContainers = {}
433 
434 
435  def getPreselection (self, containerName, selectionName, *, asList = False) :
436 
437  """get the preselection string for the given selection on the given
438  container
439  """
440  if selectionName != '' and not self._selectionNameExpr.fullmatch (selectionName) :
441  raise ValueError ('invalid selection name: ' + selectionName)
442  if containerName not in self._containerConfig :
443  return ""
444  config = self._containerConfig[containerName]
445  decorations = []
446  for selection in config.selections :
447  if (selection.name == '' or selection.name == selectionName) and \
448  selection.preselection :
449  decorations += [selection.decoration]
450  if asList :
451  return decorations
452  else :
453  return '&&'.join (decorations)
454 
455 
456  def getFullSelection (self, containerName, selectionName,
457  *, skipBase = False, excludeFrom = None) :
458 
459  """get the selection string for the given selection on the given
460  container
461 
462  This can handle both individual selections or selection
463  expressions (e.g. `loose||tight`) with the later being
464  properly expanded. Either way the base selection (i.e. the
465  selection without a name) will always be applied on top.
466 
467  containerName --- the container the selection is defined on
468  selectionName --- the name of the selection, or a selection
469  expression based on multiple named selections
470  skipBase --- will avoid the base selection, and should normally
471  not be used by the end-user.
472  excludeFrom --- a set of string names of selection sources to exclude
473  e.g. to exclude OR selections from MET
474  """
475  if containerName not in self._containerConfig :
476  return ""
477 
478  if excludeFrom is None :
479  excludeFrom = set()
480  elif not isinstance(excludeFrom, set) :
481  raise ValueError ('invalid excludeFrom argument (need set of strings): ' + str(excludeFrom))
482 
483  # Check if this is actually a selection expression,
484  # e.g. `A||B` and if so translate it into a complex expression
485  # for the user. I'm not trying to do any complex syntax
486  # recognition, but instead just produce an expression that the
487  # C++ parser ought to be able to read.
488  if selectionName != '' and \
489  not self._selectionNameExpr.fullmatch (selectionName) :
490  result = ''
491  while selectionName != '' :
492  match = self._selectionNameExpr.match (selectionName)
493  if not match :
494  result += selectionName[0]
495  selectionName = selectionName[1:]
496  else :
497  subname = match.group(0)
498  subresult = self.getFullSelection (containerName, subname, skipBase = True, excludeFrom=excludeFrom)
499  if subresult != '' :
500  result += '(' + subresult + ')'
501  else :
502  result += 'true'
503  selectionName = selectionName[len(subname):]
504  subresult = self.getFullSelection (containerName, '', excludeFrom=excludeFrom)
505  if subresult != '' :
506  result = subresult + '&&(' + result + ')'
507  return result
508 
509  config = self._containerConfig[containerName]
510  decorations = []
511  hasSelectionName = False
512  for selection in config.selections :
513  if ((selection.name == '' and not skipBase) or selection.name == selectionName) and (selection.comesFrom not in excludeFrom) :
514  decorations += [selection.decoration]
515  if selection.name == selectionName :
516  hasSelectionName = True
517  if not hasSelectionName and selectionName != '' :
518  raise KeyError ('invalid selection name: ' + containerName + '.' + selectionName)
519  return '&&'.join (decorations)
520 
521 
522  def getSelectionCutFlow (self, containerName, selectionName) :
523 
524  """get the individual selections as a list for producing the cutflow for
525  the given selection on the given container
526 
527  This can only handle individual selections, not selection
528  expressions (e.g. `loose||tight`).
529 
530  """
531  if containerName not in self._containerConfig :
532  return []
533 
534  # Check if this is actually a selection expression,
535  # e.g. `A||B` and if so translate it into a complex expression
536  # for the user. I'm not trying to do any complex syntax
537  # recognition, but instead just produce an expression that the
538  # C++ parser ought to be able to read.
539  if selectionName != '' and \
540  not self._selectionNameExpr.fullmatch (selectionName) :
541  raise ValueError ('not allowed to do cutflow on selection expression: ' + selectionName)
542 
543  config = self._containerConfig[containerName]
544  decorations = []
545  for selection in config.selections :
546  if (selection.name == '' or selection.name == selectionName) :
547  decorations += [selection.decoration]
548  return decorations
549 
550 
551  def addEventCutFlow (self, selection, decorations) :
552 
553  """register a new event cutflow, adding it to the dictionary with key 'selection'
554  and value 'decorations', a list of decorated selections
555  """
556  if self._pass == 0:
557  if selection in self._eventcutflow.keys():
558  raise ValueError ('the event cutflow dictionary already contains an entry ' + selection)
559  else:
560  self._eventcutflow[selection] = decorations
561 
562 
563  def getEventCutFlow (self, selection) :
564 
565  """get the list of decorated selections for an event cutflow, corresponding to
566  key 'selection'
567  """
568  return self._eventcutflow[selection]
569 
570 
571  def addSelection (self, containerName, selectionName, decoration,
572  **kwargs) :
573  """add another selection decoration to the selection of the given
574  name for the given container"""
575  if selectionName != '' and not self._selectionNameExpr.fullmatch (selectionName) :
576  raise ValueError ('invalid selection name: ' + selectionName)
577  if containerName not in self._containerConfig :
578  self._containerConfig[containerName] = ContainerConfig (containerName, containerName, noSysSuffix=self._noSysSuffix)
579  config = self._containerConfig[containerName]
580  selection = SelectionConfig (selectionName, decoration, **kwargs)
581  config.selections.append (selection)
582 
583 
584  def addOutputContainer (self, containerName, outputContainerName) :
585  """register a copy of a container used in outputs"""
586  if containerName not in self._containerConfig :
587  raise KeyError ("container unknown: " + containerName)
588  if outputContainerName in self._outputContainers :
589  raise KeyError ("duplicate output container name: " + outputContainerName)
590  self._outputContainers[outputContainerName] = containerName
591 
592 
593  def getOutputContainerOrigin (self, outputContainerName) :
594  """Get the name of the actual container, for which an output is registered"""
595  try:
596  return self._outputContainers[outputContainerName]
597  except KeyError:
598  try:
599  return self._containerConfig[outputContainerName].name
600  except KeyError:
601  raise KeyError ("output container unknown: " + outputContainerName)
602 
603 
604  def addOutputVar (self, containerName, variableName, outputName,
605  *, noSys=False, enabled=True) :
606  """add an output variable for the given container to the output
607  """
608 
609  if containerName not in self._containerConfig :
610  raise KeyError ("container unknown: " + containerName)
611  baseConfig = self._containerConfig[containerName].outputs
612  if outputName in baseConfig :
613  raise KeyError ("duplicate output variable name: " + outputName)
614  config = OutputConfig (containerName, variableName, noSys=noSys, enabled=enabled)
615  baseConfig[outputName] = config
616 
617 
618  def getOutputVars (self, containerName) :
619  """get the output variables for the given container"""
620  if containerName in self._outputContainers :
621  containerName = self._outputContainers[containerName]
622  if containerName not in self._containerConfig :
623  raise KeyError ("unknown container for output: " + containerName)
624  return self._containerConfig[containerName].outputs
625 
626 
627  def getSelectionNames (self, containerName) :
628  """Retrieve set of unique selections defined for a given container"""
629  if containerName not in self._containerConfig :
630  return []
631  config = self._containerConfig[containerName]
632  # because cuts are registered individually, selection names can repeat themselves
633  # but we are interested in unique names only
634  selectionNames = set()
635  for selection in config.selections:
636  # skip flags which should be disabled in output
637  if selection.writeToOutput:
638  selectionNames.add(selection.name)
639  return selectionNames
python.ConfigAccumulator.ConfigAccumulator.getPreselection
def getPreselection(self, containerName, selectionName, *asList=False)
Definition: ConfigAccumulator.py:435
python.ConfigAccumulator.ConfigAccumulator._campaign
_campaign
Definition: ConfigAccumulator.py:153
python.ConfigAccumulator.ConfigAccumulator.dsid
def dsid(self)
Definition: ConfigAccumulator.py:205
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.ConfigAccumulator.ContainerConfig.nextPass
def nextPass(self)
Definition: ConfigAccumulator.py:84
python.ConfigAccumulator.ContainerConfig.viewIndex
viewIndex
Definition: ConfigAccumulator.py:60
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.ConfigAccumulator.SelectionConfig.__init__
def __init__(self, selectionName, decoration, *bits=0, preselection=None, comesFrom='', writeToOutput=True)
Definition: ConfigAccumulator.py:20
python.ConfigAccumulator.ConfigAccumulator.createPublicTool
def createPublicTool(self, type, name)
Definition: ConfigAccumulator.py:278
python.ConfigAccumulator.ConfigAccumulator.getOutputContainerOrigin
def getOutputContainerOrigin(self, outputContainerName)
Definition: ConfigAccumulator.py:593
python.ConfigAccumulator.ConfigAccumulator.addSelection
def addSelection(self, containerName, selectionName, decoration, **kwargs)
Definition: ConfigAccumulator.py:571
python.ConfigAccumulator.ConfigAccumulator.isPhyslite
def isPhyslite(self)
Definition: ConfigAccumulator.py:197
python.ConfigAccumulator.ContainerConfig.originalName
originalName
Definition: ConfigAccumulator.py:56
python.ConfigAccumulator.ConfigAccumulator.setSourceName
def setSourceName(self, containerName, sourceName, *originalName=None)
Definition: ConfigAccumulator.py:308
python.ConfigAccumulator.SelectionConfig
Definition: ConfigAccumulator.py:14
python.ConfigAccumulator.OutputConfig.enabled
enabled
Definition: ConfigAccumulator.py:42
python.ConfigAccumulator.SelectionConfig.comesFrom
comesFrom
Definition: ConfigAccumulator.py:27
python.ConfigAccumulator.ConfigAccumulator.addOutputVar
def addOutputVar(self, containerName, variableName, outputName, *noSys=False, enabled=True)
Definition: ConfigAccumulator.py:604
python.ConfigAccumulator.ConfigAccumulator.campaign
def campaign(self)
Definition: ConfigAccumulator.py:209
python.ConfigAccumulator.ConfigAccumulator._selectionNameExpr
_selectionNameExpr
Definition: ConfigAccumulator.py:165
python.ConfigAccumulator.ConfigAccumulator._dsid
_dsid
Definition: ConfigAccumulator.py:152
python.ConfigAccumulator.ConfigAccumulator._containerConfig
_containerConfig
Definition: ConfigAccumulator.py:160
python.ConfigAccumulator.ConfigAccumulator._geometry
_geometry
Definition: ConfigAccumulator.py:151
python.ConfigAccumulator.ConfigAccumulator.readNameAndSelection
def readNameAndSelection(self, containerName, *excludeFrom=None)
Definition: ConfigAccumulator.py:400
python.ConfigAccumulator.ConfigAccumulator
Definition: ConfigAccumulator.py:93
python.ConfigAccumulator.ContainerConfig.systematicsName
def systematicsName(name, *noSysSuffix)
Definition: ConfigAccumulator.py:75
python.ConfigAccumulator.ConfigAccumulator.generatorInfo
def generatorInfo(self)
Definition: ConfigAccumulator.py:221
python.ConfigAccumulator.ConfigAccumulator.getEventCutFlow
def getEventCutFlow(self, selection)
Definition: ConfigAccumulator.py:563
python.ConfigAccumulator.ContainerConfig.currentName
def currentName(self)
Definition: ConfigAccumulator.py:65
python.ConfigAccumulator.ContainerConfig.maxIndex
maxIndex
Definition: ConfigAccumulator.py:59
python.ConfigAccumulator.ConfigAccumulator._algorithms
_algorithms
Definition: ConfigAccumulator.py:163
python.ConfigAccumulator.ConfigAccumulator.getSelectionNames
def getSelectionNames(self, containerName)
Definition: ConfigAccumulator.py:627
python.ConfigAccumulator.OutputConfig.outputContainerName
outputContainerName
Definition: ConfigAccumulator.py:39
python.ConfigAccumulator.SelectionConfig.writeToOutput
writeToOutput
Definition: ConfigAccumulator.py:28
python.ConfigAccumulator.ConfigAccumulator.copyName
def copyName(self, containerName)
Definition: ConfigAccumulator.py:354
python.ConfigAccumulator.ConfigAccumulator.getOutputVars
def getOutputVars(self, containerName)
Definition: ConfigAccumulator.py:618
python.ConfigAccumulator.ConfigAccumulator.addEventCutFlow
def addEventCutFlow(self, selection, decorations)
Definition: ConfigAccumulator.py:551
python.ConfigAccumulator.ConfigAccumulator._noSysSuffix
_noSysSuffix
Definition: ConfigAccumulator.py:159
python.ConfigAccumulator.ConfigAccumulator.__init__
def __init__(self, algSeq, dataType=None, isPhyslite=False, geometry=None, dsid=0, campaign=None, runNumber=None, autoconfigFromFlags=None, noSysSuffix=False, noSystematics=None, dataYear=0)
Definition: ConfigAccumulator.py:110
python.ConfigAccumulator.ConfigAccumulator.dataType
def dataType(self)
Definition: ConfigAccumulator.py:193
python.ConfigAccumulator.ConfigAccumulator._pass
_pass
Definition: ConfigAccumulator.py:162
python.ConfigAccumulator.ConfigAccumulator._isPhyslite
_isPhyslite
Definition: ConfigAccumulator.py:150
python.ConfigAccumulator.OutputConfig
Definition: ConfigAccumulator.py:34
python.ConfigAccumulator.ConfigAccumulator.noSystematics
def noSystematics(self)
Definition: ConfigAccumulator.py:185
python.ConfigAccumulator.ConfigAccumulator.runNumber
def runNumber(self)
Definition: ConfigAccumulator.py:213
python.ConfigAccumulator.ConfigAccumulator.geometry
def geometry(self)
Definition: ConfigAccumulator.py:201
python.ConfigAccumulator.OutputConfig.__init__
def __init__(self, origContainerName, variableName, *noSys, enabled)
Definition: ConfigAccumulator.py:37
python.ConfigAccumulator.ContainerConfig.__init__
def __init__(self, name, sourceName, *originalName=None, noSysSuffix)
Definition: ConfigAccumulator.py:53
python.ConfigAccumulator.ContainerConfig.isMet
isMet
Definition: ConfigAccumulator.py:61
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:224
python.ConfigAccumulator.ContainerConfig.index
index
Definition: ConfigAccumulator.py:58
python.ConfigAccumulator.ConfigAccumulator._dataType
_dataType
Definition: ConfigAccumulator.py:149
python.ConfigAccumulator.ConfigAccumulator._eventcutflow
_eventcutflow
Definition: ConfigAccumulator.py:167
python.ConfigAccumulator.ConfigAccumulator._runNumber
_runNumber
Definition: ConfigAccumulator.py:154
python.ConfigAccumulator.ConfigAccumulator._algSeq
_algSeq
Definition: ConfigAccumulator.py:157
python.ConfigAccumulator.SelectionConfig.preselection
preselection
Definition: ConfigAccumulator.py:24
python.ConfigAccumulator.ConfigAccumulator._outputContainers
_outputContainers
Definition: ConfigAccumulator.py:161
python.ConfigAccumulator.ConfigAccumulator.createAlgorithm
def createAlgorithm(self, type, name, reentrant=False)
Definition: ConfigAccumulator.py:225
python.ConfigAccumulator.ConfigAccumulator._currentAlg
_currentAlg
Definition: ConfigAccumulator.py:164
python.ConfigAccumulator.ConfigAccumulator.dataYear
def dataYear(self)
Definition: ConfigAccumulator.py:217
python.ConfigAccumulator.ConfigAccumulator.getFullSelection
def getFullSelection(self, containerName, selectionName, *skipBase=False, excludeFrom=None)
Definition: ConfigAccumulator.py:456
python.ConfigAccumulator.ConfigAccumulator.isMetContainer
def isMetContainer(self, containerName)
Definition: ConfigAccumulator.py:389
python.ConfigAccumulator.ConfigAccumulator._muonCalibMode
_muonCalibMode
Definition: ConfigAccumulator.py:168
python.ConfigAccumulator.ConfigAccumulator.addPrivateTool
def addPrivateTool(self, propertyName, toolType)
Definition: ConfigAccumulator.py:302
python.ConfigAccumulator.ContainerConfig.noSysSuffix
noSysSuffix
Definition: ConfigAccumulator.py:57
python.ConfigAccumulator.ContainerConfig.outputs
outputs
Definition: ConfigAccumulator.py:63
python.ConfigAccumulator.ConfigAccumulator.addOutputContainer
def addOutputContainer(self, containerName, outputContainerName)
Definition: ConfigAccumulator.py:584
python.ConfigAccumulator.ConfigAccumulator._noSystematics
_noSystematics
Definition: ConfigAccumulator.py:158
python.ConfigAccumulator.ConfigAccumulator._autoconfigFlags
_autoconfigFlags
Definition: ConfigAccumulator.py:111
python.ConfigAccumulator.ContainerConfig.name
name
Definition: ConfigAccumulator.py:54
python.ConfigAccumulator.SelectionConfig.name
name
Definition: ConfigAccumulator.py:21
python.ConfigAccumulator.OutputConfig.noSys
noSys
Definition: ConfigAccumulator.py:41
python.ConfigAccumulator.ConfigAccumulator._dataYear
_dataYear
Definition: ConfigAccumulator.py:155
python.ConfigAccumulator.ConfigAccumulator.getSelectionCutFlow
def getSelectionCutFlow(self, containerName, selectionName)
Definition: ConfigAccumulator.py:522
python.ConfigAccumulator.ConfigAccumulator.writeName
def writeName(self, containerName, *isMet=None)
Definition: ConfigAccumulator.py:327
python.ConfigAccumulator.ConfigAccumulator.createService
def createService(self, type, name)
Definition: ConfigAccumulator.py:254
python.ConfigAccumulator.ContainerConfig.sourceName
sourceName
Definition: ConfigAccumulator.py:55
python.ConfigAccumulator.ConfigAccumulator.originalName
def originalName(self, containerName)
Definition: ConfigAccumulator.py:374
python.ConfigAccumulator.ConfigAccumulator.autoconfigFlags
def autoconfigFlags(self)
Definition: ConfigAccumulator.py:189
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
python.ConfigAccumulator.DataType
Definition: ConfigAccumulator.py:7
python.ConfigAccumulator.OutputConfig.origContainerName
origContainerName
Definition: ConfigAccumulator.py:38
python.ConfigAccumulator.SelectionConfig.decoration
decoration
Definition: ConfigAccumulator.py:22
python.ConfigAccumulator.ConfigAccumulator.CA
CA
Definition: ConfigAccumulator.py:173
python.ConfigAccumulator.ContainerConfig.selections
selections
Definition: ConfigAccumulator.py:62
python.ConfigAccumulator.ContainerConfig
Definition: ConfigAccumulator.py:47
python.ConfigAccumulator.ConfigAccumulator.nextPass
def nextPass(self)
Definition: ConfigAccumulator.py:420
python.ConfigAccumulator.ConfigAccumulator.wantCopy
def wantCopy(self, containerName)
Definition: ConfigAccumulator.py:363
python.ConfigAccumulator.ConfigAccumulator._generatorInfo
_generatorInfo
Definition: ConfigAccumulator.py:156
python.ConfigAccumulator.ConfigAccumulator.readName
def readName(self, containerName)
Definition: ConfigAccumulator.py:342
python.ConfigAccumulator.OutputConfig.variableName
variableName
Definition: ConfigAccumulator.py:40