the ConfigBlock for an event-level cutflow
Definition at line 600 of file AsgAnalysisConfig.py.
◆ __init__()
| def python.AsgAnalysisConfig.EventCutFlowBlock.__init__ |
( |
|
self | ) |
|
Definition at line 603 of file AsgAnalysisConfig.py.
604 super (EventCutFlowBlock, self).__init__ ()
605 self.addOption (
'containerName',
'', type=str,
607 info=
"the name of the input container, typically EventInfo.")
608 self.addOption (
'selectionName',
'', type=str,
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.")
◆ 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
◆ makeAlgs()
| def python.AsgAnalysisConfig.EventCutFlowBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 625 of file AsgAnalysisConfig.py.
625 def makeAlgs (self, config) :
627 postfix = self.postfix
628 if postfix !=
'' and postfix[0] !=
'_' :
629 postfix =
'_' + postfix
631 alg = config.createAlgorithm(
'CP::EventCutFlowHistAlg',
'CutFlowDumperAlg' )
632 alg.histPattern =
'cflow_' + self.containerName +
"_" + self.selectionName + postfix +
'_%SYS%'
634 if isinstance(self.customSelections, str):
636 alg.selections = config.getEventCutFlow(self.customSelections)
637 elif len(self.customSelections) > 0:
639 alg.selections = self.customSelections
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
The documentation for this class was generated from the following file: