the ConfigBlock for an event-level cutflow
Definition at line 544 of file AsgAnalysisConfig.py.
◆ __init__()
def python.AsgAnalysisConfig.EventCutFlowBlock.__init__ |
( |
|
self | ) |
|
Definition at line 547 of file AsgAnalysisConfig.py.
548 super (EventCutFlowBlock, self).__init__ ()
549 self.addOption (
'containerName',
'', type=str,
551 info=
"the name of the input container, typically EventInfo.")
552 self.addOption (
'selectionName',
'', type=str,
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.")
◆ 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
◆ makeAlgs()
def python.AsgAnalysisConfig.EventCutFlowBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 569 of file AsgAnalysisConfig.py.
569 def makeAlgs (self, config) :
571 postfix = self.postfix
572 if postfix !=
'' and postfix[0] !=
'_' :
573 postfix =
'_' + postfix
575 alg = config.createAlgorithm(
'CP::EventCutFlowHistAlg',
'CutFlowDumperAlg' )
576 alg.histPattern =
'cflow_' + self.containerName +
"_" + self.selectionName + postfix +
'_%SYS%'
578 if isinstance(self.customSelections, str):
580 alg.selections = config.getEventCutFlow(self.customSelections)
581 elif len(self.customSelections) > 0:
583 alg.selections = self.customSelections
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
The documentation for this class was generated from the following file: