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 476 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 479 of file AsgAnalysisConfig.py.

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

Member Function Documentation

◆ makeAlgs()

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

Definition at line 506 of file AsgAnalysisConfig.py.

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

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