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)
 
def instanceName (self)
 
def makeAlgs (self, config)
 

Detailed Description

the ConfigBlock for output thinning

Definition at line 594 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.OutputThinningBlock.__init__ (   self)

Definition at line 597 of file AsgAnalysisConfig.py.

597  def __init__ (self) :
598  super (OutputThinningBlock, self).__init__ ()
599  self.addOption ('containerName', '', type=str,
600  noneAction='error',
601  info="the name of the input container.")
602  self.addOption ('postfix', '', type=str,
603  info="a postfix to apply to decorations and algorithm names. "
604  "Typically not needed here.")
605  self.addOption ('selection', '', type=str,
606  info="the name of an optional selection decoration to use.")
607  self.addOption ('selectionName', '', type=str,
608  info="the name of the selection to append this to. The default is "
609  "'' (empty string), meaning that the cuts are applied to every "
610  "object within the container. Specifying a name (e.g. loose) "
611  "applies the cut only to those object who also pass that selection.")
612  self.addOption ('outputName', None, type=str,
613  info="an optional name for the output container.")
614  # TODO: add info string
615  self.addOption ('deepCopy', False, type=bool,
616  info="")
617  self.addOption ('sortPt', False, type=bool,
618  info="whether to sort objects in pt")
619  # TODO: add info string
620  self.addOption ('noUniformSelection', False, type=bool,
621  info="")
622 

Member Function Documentation

◆ instanceName()

def python.AsgAnalysisConfig.OutputThinningBlock.instanceName (   self)
Return the instance name for this block

Definition at line 623 of file AsgAnalysisConfig.py.

623  def instanceName (self) :
624  """Return the instance name for this block"""
625  return self.containerName + '_' + self.selectionName + self.postfix
626 

◆ makeAlgs()

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

Definition at line 627 of file AsgAnalysisConfig.py.

627  def makeAlgs (self, config) :
628 
629  postfix = self.postfix
630  if postfix != '' and postfix[0] != '_' :
631  postfix = '_' + postfix
632 
633  selection = config.getFullSelection (self.containerName, self.selectionName)
634  if selection == '' :
635  selection = self.selection
636  elif self.selection != '' :
637  selection = selection + '&&' + self.selection
638 
639  if selection != '' and not self.noUniformSelection :
640  alg = config.createAlgorithm( 'CP::AsgUnionSelectionAlg', 'UnionSelectionAlg')
641  alg.preselection = selection
642  alg.particles = config.readName (self.containerName)
643  alg.selectionDecoration = 'outputSelect' + postfix
644  config.addSelection (self.containerName, alg.selectionDecoration, selection)
645  selection = 'outputSelect' + postfix
646 
647  alg = config.createAlgorithm( 'CP::AsgViewFromSelectionAlg', 'DeepCopyAlg' )
648  alg.input = config.readName (self.containerName)
649  if self.outputName is not None :
650  alg.output = self.outputName + '_%SYS%'
651  config.addOutputContainer (self.containerName, self.outputName)
652  else :
653  alg.output = config.copyName (self.containerName)
654  if selection != '' :
655  alg.selection = [selection]
656  else :
657  alg.selection = []
658  alg.deepCopy = self.deepCopy
659  if self.sortPt and not config.noSystematics() :
660  raise ValueError ("Sorting by pt is not supported with systematics")
661  alg.sortPt = self.sortPt
662 
663 

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