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

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.OutputThinningBlock.__init__ (   self)

Definition at line 629 of file AsgAnalysisConfig.py.

629  def __init__ (self) :
630  super (OutputThinningBlock, self).__init__ ()
631  self.addOption ('containerName', '', type=str,
632  noneAction='error',
633  info="the name of the input container.")
634  self.addOption ('postfix', '', type=str,
635  info="a postfix to apply to decorations and algorithm names. "
636  "Typically not needed here.")
637  self.addOption ('selection', '', type=str,
638  info="the name of an optional selection decoration to use.")
639  self.addOption ('selectionName', '', type=str,
640  info="the name of the selection to append this to. The default is "
641  "'' (empty string), meaning that the cuts are applied to every "
642  "object within the container. Specifying a name (e.g. loose) "
643  "applies the cut only to those object who also pass that selection.")
644  self.addOption ('outputName', None, type=str,
645  info="an optional name for the output container.")
646  # TODO: add info string
647  self.addOption ('deepCopy', False, type=bool,
648  info="")
649  self.addOption ('sortPt', False, type=bool,
650  info="whether to sort objects in pt")
651  # TODO: add info string
652  self.addOption ('noUniformSelection', False, type=bool,
653  info="")
654 

Member Function Documentation

◆ instanceName()

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

Definition at line 655 of file AsgAnalysisConfig.py.

655  def instanceName (self) :
656  """Return the instance name for this block"""
657  return self.containerName + '_' + self.selectionName + self.postfix
658 

◆ makeAlgs()

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

Definition at line 659 of file AsgAnalysisConfig.py.

659  def makeAlgs (self, config) :
660 
661  postfix = self.postfix
662  if postfix != '' and postfix[0] != '_' :
663  postfix = '_' + postfix
664 
665  selection = config.getFullSelection (self.containerName, self.selectionName)
666  if selection == '' :
667  selection = self.selection
668  elif self.selection != '' :
669  selection = selection + '&&' + self.selection
670 
671  if selection != '' and not self.noUniformSelection :
672  alg = config.createAlgorithm( 'CP::AsgUnionSelectionAlg', 'UnionSelectionAlg')
673  alg.preselection = selection
674  alg.particles = config.readName (self.containerName)
675  alg.selectionDecoration = 'outputSelect' + postfix
676  config.addSelection (self.containerName, alg.selectionDecoration, selection)
677  selection = 'outputSelect' + postfix
678 
679  alg = config.createAlgorithm( 'CP::AsgViewFromSelectionAlg', 'DeepCopyAlg' )
680  alg.input = config.readName (self.containerName)
681  if self.outputName is not None :
682  alg.output = self.outputName + '_%SYS%'
683  config.addOutputContainer (self.containerName, self.outputName)
684  else :
685  alg.output = config.copyName (self.containerName)
686  if selection != '' :
687  alg.selection = [selection]
688  else :
689  alg.selection = []
690  alg.deepCopy = self.deepCopy
691  if self.sortPt and not config.noSystematics() :
692  raise ValueError ("Sorting by pt is not supported with systematics")
693  alg.sortPt = self.sortPt
694 
695 

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