the ConfigBlock for a pt-eta selection
Definition at line 446 of file AsgAnalysisConfig.py.
◆ __init__()
def python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ |
( |
|
self | ) |
|
Definition at line 449 of file AsgAnalysisConfig.py.
450 super (PtEtaSelectionBlock, self).__init__ ()
451 self.addOption (
'containerName',
'', type=str,
453 info=
"the name of the input container.")
454 self.addOption (
'selectionName',
'', type=str,
456 info=
"the name of the selection to append this to. The default is "
457 "'' (empty string), meaning that the cuts are applied to every "
458 "object within the container. Specifying a name (e.g. loose) "
459 "applies the cut only to those object who also pass that selection.")
460 self.addOption (
'minPt',
None, type=float,
461 info=
"minimum pT value to cut on, in MeV. No default value.")
462 self.addOption (
'maxPt',
None, type=float,
463 info=
"maximum pT value to cut on, in MeV. No default value.")
464 self.addOption (
'minEta',
None, type=float,
465 info=
"minimum |eta| value to cut on. No default value.")
466 self.addOption (
'maxEta',
None, type=float,
467 info=
"maximum |eta| value to cut on. No default value.")
468 self.addOption (
'maxRapidity',
None, type=float,
469 info=
"maximum rapidity value to cut on. No default value.")
470 self.addOption (
'etaGapLow',
None, type=float,
471 info=
"low end of the |eta| gap. No default value.")
472 self.addOption (
'etaGapHigh',
None, type=float,
473 info=
"high end of the |eta| gap. No default value.")
474 self.addOption (
'selectionDecoration',
None, type=str,
475 info=
"the name of the decoration to set. If 'None', will be set "
476 "to 'selectPtEta' followed by the selection name.")
477 self.addOption (
'useClusterEta',
False, type=bool,
478 info=
"whether to use the cluster eta (etaBE(2)) instead of the object "
479 "eta (for electrons and photons). The default is False.")
480 self.addOption (
'useDressedProperties',
False, type=bool,
481 info=
"whether to use the dressed kinematic properties "
482 "(for truth particles only). The default is False.")
◆ instanceName()
def python.AsgAnalysisConfig.PtEtaSelectionBlock.instanceName |
( |
|
self | ) |
|
Return the instance name for this block
Definition at line 484 of file AsgAnalysisConfig.py.
484 def instanceName (self) :
485 """Return the instance name for this block"""
486 return self.containerName +
"_" + self.selectionName
◆ makeAlgs()
def python.AsgAnalysisConfig.PtEtaSelectionBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 488 of file AsgAnalysisConfig.py.
488 def makeAlgs (self, config) :
490 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'PtEtaSelectionAlg' )
491 config.addPrivateTool(
'selectionTool',
'CP::AsgPtEtaSelectionTool' )
492 if self.minPt
is not None :
493 alg.selectionTool.minPt = self.minPt
494 if self.maxPt
is not None:
495 alg.selectionTool.maxPt = self.maxPt
496 if self.minEta
is not None:
497 alg.selectionTool.minEta = self.minEta
498 if self.maxEta
is not None :
499 alg.selectionTool.maxEta = self.maxEta
500 if self.maxRapidity
is not None :
501 alg.selectionTool.maxRapidity = self.maxRapidity
502 if self.etaGapLow
is not None:
503 alg.selectionTool.etaGapLow = self.etaGapLow
504 if self.etaGapHigh
is not None:
505 alg.selectionTool.etaGapHigh = self.etaGapHigh
506 if self.selectionDecoration
is None:
507 self.selectionDecoration =
'selectPtEta' + (f
'_{self.selectionName}' if self.selectionName
else '')
508 alg.selectionTool.useClusterEta = self.useClusterEta
509 alg.selectionTool.useDressedProperties = self.useDressedProperties
510 alg.selectionDecoration = self.selectionDecoration
511 alg.particles = config.readName (self.containerName)
512 alg.preselection = config.getPreselection (self.containerName,
'')
513 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
◆ selectionDecoration
python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionDecoration |
The documentation for this class was generated from the following file: