the ConfigBlock for output thinning
Definition at line 476 of file AsgAnalysisConfig.py.
◆ __init__()
def python.AsgAnalysisConfig.OutputThinningBlock.__init__ |
( |
|
self, |
|
|
|
containerName = '' , |
|
|
|
configName = '' |
|
) |
| |
Definition at line 479 of file AsgAnalysisConfig.py.
479 def __init__ (self, containerName='', configName='') :
481 super (OutputThinningBlock, self).__init__ ()
482 self.addOption (
'containerName', containerName, type=str,
484 info=
"the name of the input container.")
485 self.addOption (
'postfix',
'', type=str,
486 info=
"a postfix to apply to decorations and algorithm names. "
487 "Typically not needed here.")
488 self.addOption (
'selection',
'', type=str,
489 info=
"the name of an optional selection decoration to use.")
490 self.addOption (
'selectionName',
'', type=str,
491 info=
"the name of the selection to append this to. The default is "
492 "'' (empty string), meaning that the cuts are applied to every "
493 "object within the container. Specifying a name (e.g. loose) "
494 "applies the cut only to those object who also pass that selection.")
495 self.addOption (
'outputName',
None, type=str,
496 info=
"an optional name for the output container.")
498 self.addOption (
'deepCopy',
False, type=bool,
500 self.addOption (
'sortPt',
False, type=bool,
501 info=
"whether to sort objects in pt")
503 self.addOption (
'noUniformSelection',
False, type=bool,
◆ makeAlgs()
def python.AsgAnalysisConfig.OutputThinningBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 506 of file AsgAnalysisConfig.py.
506 def makeAlgs (self, config) :
508 postfix = self.postfix
509 if postfix !=
'' and postfix[0] !=
'_' :
510 postfix =
'_' + postfix
512 selection = config.getFullSelection (self.containerName, self.selectionName)
514 selection = self.selection
515 elif self.selection !=
'' :
516 selection = selection +
'&&' + self.selection
518 if selection !=
'' and not self.noUniformSelection :
519 alg = config.createAlgorithm(
'CP::AsgUnionSelectionAlg',
'UnionSelectionAlg' + self.containerName + postfix)
520 alg.preselection = selection
521 alg.particles = config.readName (self.containerName)
522 alg.selectionDecoration =
'outputSelect' + postfix
523 selection =
'outputSelect' + postfix
525 alg = config.createAlgorithm(
'CP::AsgViewFromSelectionAlg',
'DeepCopyAlg' + self.containerName + postfix )
526 alg.input = config.readName (self.containerName)
527 if self.outputName
is not None :
528 alg.output = self.outputName +
'_%SYS%'
529 config.addOutputContainer (self.containerName, self.outputName)
531 alg.output = config.copyName (self.containerName)
533 alg.selection = [selection]
536 alg.deepCopy = self.deepCopy
537 if self.sortPt
and not config.noSystematics() :
538 raise ValueError (
"Sorting by pt is not supported with systematics")
539 alg.sortPt = self.sortPt
The documentation for this class was generated from the following file: