ATLAS Offline Software
Public Member Functions | List of all members
python.AsgAnalysisConfig.EventCutFlowBlock Class Reference
Inheritance diagram for python.AsgAnalysisConfig.EventCutFlowBlock:
Collaboration diagram for python.AsgAnalysisConfig.EventCutFlowBlock:

Public Member Functions

def __init__ (self)
 
def instanceName (self)
 
def makeAlgs (self, config)
 

Detailed Description

the ConfigBlock for an event-level cutflow

Definition at line 544 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.EventCutFlowBlock.__init__ (   self)

Definition at line 547 of file AsgAnalysisConfig.py.

547  def __init__ (self) :
548  super (EventCutFlowBlock, self).__init__ ()
549  self.addOption ('containerName', '', type=str,
550  noneAction='error',
551  info="the name of the input container, typically EventInfo.")
552  self.addOption ('selectionName', '', type=str,
553  noneAction='error',
554  info="the name of an optional selection decoration to use.")
555  self.addOption ('customSelections', [], type=None,
556  info="the selections for which to generate cutflow histograms. If "
557  "a single string, corresponding to a particular event selection, "
558  "the event cutflow for that selection will be looked up. If a list "
559  "of strings, will use explicitly those selections. If left blank, "
560  "all selections attached to the container will be looked up.")
561  self.addOption ('postfix', '', type=str,
562  info="a postfix to apply in the naming of cutflow histograms. Set "
563  "it when defining multiple cutflows.")
564 

Member Function Documentation

◆ instanceName()

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

Definition at line 565 of file AsgAnalysisConfig.py.

565  def instanceName (self) :
566  """Return the instance name for this block"""
567  return self.containerName + '_' + self.selectionName + self.postfix
568 

◆ makeAlgs()

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

Definition at line 569 of file AsgAnalysisConfig.py.

569  def makeAlgs (self, config) :
570 
571  postfix = self.postfix
572  if postfix != '' and postfix[0] != '_' :
573  postfix = '_' + postfix
574 
575  alg = config.createAlgorithm( 'CP::EventCutFlowHistAlg', 'CutFlowDumperAlg' )
576  alg.histPattern = 'cflow_' + self.containerName + "_" + self.selectionName + postfix + '_%SYS%'
577  # find out which selection decorations to use
578  if isinstance(self.customSelections, str):
579  # user provides a dynamic reference to selections, corresponding to an EventSelection alg
580  alg.selections = config.getEventCutFlow(self.customSelections)
581  elif len(self.customSelections) > 0:
582  # user provides a list of hardcoded selections
583  alg.selections = self.customSelections
584  else:
585  # user provides nothing: get all available selections from EventInfo directly
586  alg.selections = config.getSelectionCutFlow (self.containerName, self.selectionName)
587  alg.selections = [sel+',as_char' for sel in alg.selections]
588  if self.selectionName:
589  alg.preselection = self.selectionName + '_%SYS%'
590  alg.eventInfo = config.readName (self.containerName)
591  alg.histTitle = "Event Cutflow: " + self.containerName + "." + self.selectionName
592 
593 

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