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