ATLAS Offline Software
Public Member Functions | List of all members
python.AsgAnalysisConfig.OutputThinningBlock Class Reference
Inheritance diagram for python.AsgAnalysisConfig.OutputThinningBlock:
Collaboration diagram for python.AsgAnalysisConfig.OutputThinningBlock:

Public Member Functions

def __init__ (self, containerName='', configName='')
 
def makeAlgs (self, config)
 

Detailed Description

the ConfigBlock for output thinning

Definition at line 468 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.OutputThinningBlock.__init__ (   self,
  containerName = '',
  configName = '' 
)

Definition at line 471 of file AsgAnalysisConfig.py.

471  def __init__ (self, containerName='', configName='') :
472  # configName is not used. To be removed.
473  super (OutputThinningBlock, self).__init__ ()
474  self.addOption ('containerName', containerName, type=str,
475  noneAction='error',
476  info="the name of the input container.")
477  self.addOption ('postfix', '', type=str,
478  info="a postfix to apply to decorations and algorithm names. "
479  "Typically not needed here.")
480  self.addOption ('selection', '', type=str,
481  info="the name of an optional selection decoration to use.")
482  self.addOption ('selectionName', '', type=str,
483  info="the name of the selection to append this to. The default is "
484  "'' (empty string), meaning that the cuts are applied to every "
485  "object within the container. Specifying a name (e.g. loose) "
486  "applies the cut only to those object who also pass that selection.")
487  self.addOption ('outputName', None, type=str,
488  info="an optional name for the output container.")
489  # TODO: add info string
490  self.addOption ('deepCopy', False, type=bool,
491  info="")
492  self.addOption ('sortPt', False, type=bool,
493  info="whether to sort objects in pt")
494  # TODO: add info string
495  self.addOption ('noUniformSelection', False, type=bool,
496  info="")
497 

Member Function Documentation

◆ makeAlgs()

def python.AsgAnalysisConfig.OutputThinningBlock.makeAlgs (   self,
  config 
)

Definition at line 498 of file AsgAnalysisConfig.py.

498  def makeAlgs (self, config) :
499 
500  postfix = self.postfix
501  if postfix != '' and postfix[0] != '_' :
502  postfix = '_' + postfix
503 
504  selection = config.getFullSelection (self.containerName, self.selectionName)
505  if selection == '' :
506  selection = self.selection
507  elif self.selection != '' :
508  selection = selection + '&&' + self.selection
509 
510  if selection != '' and not self.noUniformSelection :
511  alg = config.createAlgorithm( 'CP::AsgUnionSelectionAlg', 'UnionSelectionAlg' + self.containerName + postfix)
512  alg.preselection = selection
513  alg.particles = config.readName (self.containerName)
514  alg.selectionDecoration = 'outputSelect' + postfix
515  selection = 'outputSelect' + postfix
516 
517  alg = config.createAlgorithm( 'CP::AsgViewFromSelectionAlg', 'DeepCopyAlg' + self.containerName + postfix )
518  alg.input = config.readName (self.containerName)
519  if self.outputName is not None :
520  alg.output = self.outputName + '_%SYS%'
521  config.addOutputContainer (self.containerName, self.outputName)
522  else :
523  alg.output = config.copyName (self.containerName)
524  if selection != '' :
525  alg.selection = [selection]
526  else :
527  alg.selection = []
528  alg.deepCopy = self.deepCopy
529  if self.sortPt and not config.noSystematics() :
530  raise ValueError ("Sorting by pt is not supported with systematics")
531  alg.sortPt = self.sortPt
532 
533 

The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18