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