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

Constructor & Destructor Documentation

◆ __init__()

def python.AsgAnalysisConfig.EventCutFlowBlock.__init__ (   self)

Definition at line 603 of file AsgAnalysisConfig.py.

603  def __init__ (self) :
604  super (EventCutFlowBlock, self).__init__ ()
605  self.addOption ('containerName', '', type=str,
606  noneAction='error',
607  info="the name of the input container, typically EventInfo.")
608  self.addOption ('selectionName', '', type=str,
609  noneAction='error',
610  info="the name of an optional selection decoration to use.")
611  self.addOption ('customSelections', [], type=None,
612  info="the selections for which to generate cutflow histograms. If "
613  "a single string, corresponding to a particular event selection, "
614  "the event cutflow for that selection will be looked up. If a list "
615  "of strings, will use explicitly those selections. If left blank, "
616  "all selections attached to the container will be looked up.")
617  self.addOption ('postfix', '', type=str,
618  info="a postfix to apply in the naming of cutflow histograms. Set "
619  "it when defining multiple cutflows.")
620 

Member Function Documentation

◆ instanceName()

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

Definition at line 621 of file AsgAnalysisConfig.py.

621  def instanceName (self) :
622  """Return the instance name for this block"""
623  return self.containerName + '_' + self.selectionName + self.postfix
624 

◆ makeAlgs()

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

Definition at line 625 of file AsgAnalysisConfig.py.

625  def makeAlgs (self, config) :
626 
627  postfix = self.postfix
628  if postfix != '' and postfix[0] != '_' :
629  postfix = '_' + postfix
630 
631  alg = config.createAlgorithm( 'CP::EventCutFlowHistAlg', 'CutFlowDumperAlg' )
632  alg.histPattern = 'cflow_' + self.containerName + "_" + self.selectionName + postfix + '_%SYS%'
633  # find out which selection decorations to use
634  if isinstance(self.customSelections, str):
635  # user provides a dynamic reference to selections, corresponding to an EventSelection alg
636  alg.selections = config.getEventCutFlow(self.customSelections)
637  elif len(self.customSelections) > 0:
638  # user provides a list of hardcoded selections
639  alg.selections = self.customSelections
640  else:
641  # user provides nothing: get all available selections from EventInfo directly
642  alg.selections = config.getSelectionCutFlow (self.containerName, self.selectionName)
643  alg.selections = [sel+',as_char' for sel in alg.selections]
644  if self.selectionName:
645  alg.preselection = self.selectionName + '_%SYS%'
646  alg.eventInfo = config.readName (self.containerName)
647  alg.histTitle = "Event Cutflow: " + self.containerName + "." + self.selectionName
648 
649 

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