the ConfigBlock for output thinning
Definition at line 650 of file AsgAnalysisConfig.py.
◆ __init__()
| def python.AsgAnalysisConfig.OutputThinningBlock.__init__ |
( |
|
self | ) |
|
Definition at line 653 of file AsgAnalysisConfig.py.
654 super (OutputThinningBlock, self).__init__ ()
655 self.addOption (
'containerName',
'', type=str,
657 info=
"the name of the input container.")
658 self.addOption (
'postfix',
'', type=str,
659 info=
"a postfix to apply to decorations and algorithm names. "
660 "Typically not needed here.")
661 self.addOption (
'selection',
'', type=str,
662 info=
"the name of an optional selection decoration to use.")
663 self.addOption (
'selectionName',
'', type=str,
664 info=
"the name of the selection to append this to. The default is "
665 "'' (empty string), meaning that the cuts are applied to every "
666 "object within the container. Specifying a name (e.g. loose) "
667 "applies the cut only to those object who also pass that selection.")
668 self.addOption (
'outputName',
None, type=str,
669 info=
"an optional name for the output container.")
671 self.addOption (
'deepCopy',
False, type=bool,
673 self.addOption (
'sortPt',
False, type=bool,
674 info=
"whether to sort objects in pt")
676 self.addOption (
'noUniformSelection',
False, type=bool,
◆ instanceName()
| def python.AsgAnalysisConfig.OutputThinningBlock.instanceName |
( |
|
self | ) |
|
Return the instance name for this block
Definition at line 679 of file AsgAnalysisConfig.py.
679 def instanceName (self) :
680 """Return the instance name for this block"""
681 return self.containerName +
'_' + self.selectionName + self.postfix
◆ makeAlgs()
| def python.AsgAnalysisConfig.OutputThinningBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 683 of file AsgAnalysisConfig.py.
683 def makeAlgs (self, config) :
685 postfix = self.postfix
686 if postfix !=
'' and postfix[0] !=
'_' :
687 postfix =
'_' + postfix
689 selection = config.getFullSelection (self.containerName, self.selectionName)
691 selection = self.selection
692 elif self.selection !=
'' :
693 selection = selection +
'&&' + self.selection
695 if selection !=
'' and not self.noUniformSelection :
696 alg = config.createAlgorithm(
'CP::AsgUnionSelectionAlg',
'UnionSelectionAlg')
697 alg.preselection = selection
698 alg.particles = config.readName (self.containerName)
699 alg.selectionDecoration =
'outputSelect' + postfix
700 config.addSelection (self.containerName, alg.selectionDecoration, selection)
701 selection =
'outputSelect' + postfix
703 alg = config.createAlgorithm(
'CP::AsgViewFromSelectionAlg',
'DeepCopyAlg' )
704 alg.input = config.readName (self.containerName)
705 if self.outputName
is not None :
706 alg.output = self.outputName +
'_%SYS%'
707 config.addOutputContainer (self.containerName, self.outputName)
709 alg.output = config.copyName (self.containerName)
711 alg.selection = [selection]
714 alg.deepCopy = self.deepCopy
715 if self.sortPt
and not config.noSystematics() :
716 raise ValueError (
"Sorting by pt is not supported with systematics")
717 alg.sortPt = self.sortPt
The documentation for this class was generated from the following file: