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

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.OutputThinningBlock.__init__ (   self)

Definition at line 603 of file AsgAnalysisConfig.py.

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

Member Function Documentation

◆ instanceName()

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

Definition at line 629 of file AsgAnalysisConfig.py.

629  def instanceName (self) :
630  """Return the instance name for this block"""
631  return self.containerName + '_' + self.selectionName + self.postfix
632 

◆ makeAlgs()

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

Definition at line 633 of file AsgAnalysisConfig.py.

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

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