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

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.OutputThinningBlock.__init__ (   self)

Definition at line 653 of file AsgAnalysisConfig.py.

653  def __init__ (self) :
654  super (OutputThinningBlock, self).__init__ ()
655  self.addOption ('containerName', '', type=str,
656  noneAction='error',
657  info="the name of the input container.")
658  self.addOption ('postfix', '', type=str,
659  info="a postfix to apply to decorations and algorithm names. "
660  "Typically not needed here.")
661  self.addOption ('selection', '', type=str,
662  info="the name of an optional selection decoration to use.")
663  self.addOption ('selectionName', '', type=str,
664  info="the name of the selection to append this to. The default is "
665  "'' (empty string), meaning that the cuts are applied to every "
666  "object within the container. Specifying a name (e.g. loose) "
667  "applies the cut only to those object who also pass that selection.")
668  self.addOption ('outputName', None, type=str,
669  info="an optional name for the output container.")
670  # TODO: add info string
671  self.addOption ('deepCopy', False, type=bool,
672  info="")
673  self.addOption ('sortPt', False, type=bool,
674  info="whether to sort objects in pt")
675  # TODO: add info string
676  self.addOption ('noUniformSelection', False, type=bool,
677  info="")
678 

Member Function Documentation

◆ instanceName()

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

Definition at line 679 of file AsgAnalysisConfig.py.

679  def instanceName (self) :
680  """Return the instance name for this block"""
681  return self.containerName + '_' + self.selectionName + self.postfix
682 

◆ makeAlgs()

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

Definition at line 683 of file AsgAnalysisConfig.py.

683  def makeAlgs (self, config) :
684 
685  postfix = self.postfix
686  if postfix != '' and postfix[0] != '_' :
687  postfix = '_' + postfix
688 
689  selection = config.getFullSelection (self.containerName, self.selectionName)
690  if selection == '' :
691  selection = self.selection
692  elif self.selection != '' :
693  selection = selection + '&&' + self.selection
694 
695  if selection != '' and not self.noUniformSelection :
696  alg = config.createAlgorithm( 'CP::AsgUnionSelectionAlg', 'UnionSelectionAlg')
697  alg.preselection = selection
698  alg.particles = config.readName (self.containerName)
699  alg.selectionDecoration = 'outputSelect' + postfix
700  config.addSelection (self.containerName, alg.selectionDecoration, selection)
701  selection = 'outputSelect' + postfix
702 
703  alg = config.createAlgorithm( 'CP::AsgViewFromSelectionAlg', 'DeepCopyAlg' )
704  alg.input = config.readName (self.containerName)
705  if self.outputName is not None :
706  alg.output = self.outputName + '_%SYS%'
707  config.addOutputContainer (self.containerName, self.outputName)
708  else :
709  alg.output = config.copyName (self.containerName)
710  if selection != '' :
711  alg.selection = [selection]
712  else :
713  alg.selection = []
714  alg.deepCopy = self.deepCopy
715  if self.sortPt and not config.noSystematics() :
716  raise ValueError ("Sorting by pt is not supported with systematics")
717  alg.sortPt = self.sortPt
718 
719 

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