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

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.EventCutFlowBlock.__init__ (   self)

Definition at line 577 of file AsgAnalysisConfig.py.

577  def __init__ (self) :
578  super (EventCutFlowBlock, self).__init__ ()
579  self.addOption ('containerName', '', type=str,
580  noneAction='error',
581  info="the name of the input container, typically EventInfo.")
582  self.addOption ('selectionName', '', type=str,
583  noneAction='error',
584  info="the name of an optional selection decoration to use.")
585  self.addOption ('customSelections', [], type=None,
586  info="the selections for which to generate cutflow histograms. If "
587  "a single string, corresponding to a particular event selection, "
588  "the event cutflow for that selection will be looked up. If a list "
589  "of strings, will use explicitly those selections. If left blank, "
590  "all selections attached to the container will be looked up.")
591  self.addOption ('postfix', '', type=str,
592  info="a postfix to apply in the naming of cutflow histograms. Set "
593  "it when defining multiple cutflows.")
594 

Member Function Documentation

◆ instanceName()

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

Definition at line 595 of file AsgAnalysisConfig.py.

595  def instanceName (self) :
596  """Return the instance name for this block"""
597  return self.containerName + '_' + self.selectionName + self.postfix
598 

◆ makeAlgs()

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

Definition at line 599 of file AsgAnalysisConfig.py.

599  def makeAlgs (self, config) :
600 
601  postfix = self.postfix
602  if postfix != '' and postfix[0] != '_' :
603  postfix = '_' + postfix
604 
605  alg = config.createAlgorithm( 'CP::EventCutFlowHistAlg', 'CutFlowDumperAlg' )
606  alg.histPattern = 'cflow_' + self.containerName + "_" + self.selectionName + postfix + '_%SYS%'
607  # find out which selection decorations to use
608  if isinstance(self.customSelections, str):
609  # user provides a dynamic reference to selections, corresponding to an EventSelection alg
610  alg.selections = config.getEventCutFlow(self.customSelections)
611  elif len(self.customSelections) > 0:
612  # user provides a list of hardcoded selections
613  alg.selections = self.customSelections
614  else:
615  # user provides nothing: get all available selections from EventInfo directly
616  alg.selections = config.getSelectionCutFlow (self.containerName, self.selectionName)
617  alg.selections = [sel+',as_char' for sel in alg.selections]
618  if self.selectionName:
619  alg.preselection = self.selectionName + '_%SYS%'
620  alg.eventInfo = config.readName (self.containerName)
621  alg.histTitle = "Event Cutflow: " + self.containerName + "." + self.selectionName
622 
623 

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