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