|
def | __init__ (self, containerName='', selectionName='') |
|
def | makeAlgs (self, config) |
|
the ConfigBlock for an event-level cutflow
Definition at line 426 of file AsgAnalysisConfig.py.
◆ __init__()
def python.AsgAnalysisConfig.EventCutFlowBlock.__init__ |
( |
|
self, |
|
|
|
containerName = '' , |
|
|
|
selectionName = '' |
|
) |
| |
Definition at line 429 of file AsgAnalysisConfig.py.
429 def __init__ (self, containerName='', selectionName='') :
430 super (EventCutFlowBlock, self).__init__ ()
431 self.addOption (
'containerName', containerName, type=str,
433 info=
"the name of the input container, typically EventInfo.")
434 self.addOption (
'selectionName', selectionName, type=str,
436 info=
"the name of an optional selection decoration to use.")
437 self.addOption (
'customSelections', [], type=
None,
438 info=
"the selections for which to generate cutflow histograms. If "
439 "a single string, corresponding to a particular event selection, "
440 "the event cutflow for that selection will be looked up. If a list "
441 "of strings, will use explicitly those selections. If left blank, "
442 "all selections attached to the container will be looked up.")
443 self.addOption (
'postfix',
'', type=str,
444 info=
"a postfix to apply in the naming of cutflow histograms. Set "
445 "it when defining multiple cutflows.")
◆ makeAlgs()
def python.AsgAnalysisConfig.EventCutFlowBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 447 of file AsgAnalysisConfig.py.
447 def makeAlgs (self, config) :
449 postfix = self.postfix
450 if postfix !=
'' and postfix[0] !=
'_' :
451 postfix =
'_' + postfix
453 alg = config.createAlgorithm(
'CP::EventCutFlowHistAlg',
'CutFlowDumperAlg_' + self.containerName +
'_' + self.selectionName + postfix )
454 alg.histPattern =
'cflow_' + self.containerName +
"_" + self.selectionName + postfix +
'_%SYS%'
456 if isinstance(self.customSelections, str):
458 alg.selections = config.getEventCutFlow(self.customSelections)
459 elif len(self.customSelections) > 0:
461 alg.selections = self.customSelections
464 alg.selections = config.getSelectionCutFlow (self.containerName, self.selectionName)
465 alg.selections = [sel+
',as_char' for sel
in alg.selections]
466 if self.selectionName:
467 alg.preselection = self.selectionName +
'_%SYS%'
468 alg.eventInfo = config.readName (self.containerName)
469 alg.histTitle =
"Event Cutflow: " + self.containerName +
"." + self.selectionName
The documentation for this class was generated from the following file: