the ConfigBlock for a pt-eta selection
Definition at line 470 of file AsgAnalysisConfig.py.
◆ __init__()
| def python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ |
( |
|
self | ) |
|
Definition at line 473 of file AsgAnalysisConfig.py.
474 super (PtEtaSelectionBlock, self).__init__ ()
475 self.addOption (
'containerName',
'', type=str,
477 info=
"the name of the input container.")
478 self.addOption (
'selectionName',
'', type=str,
480 info=
"the name of the selection to append this to. The default is "
481 "'' (empty string), meaning that the cuts are applied to every "
482 "object within the container. Specifying a name (e.g. loose) "
483 "applies the cut only to those object who also pass that selection.")
484 self.addOption (
'minPt',
None, type=float,
485 info=
"minimum pT value to cut on, in MeV. No default value.")
486 self.addOption (
'maxPt',
None, type=float,
487 info=
"maximum pT value to cut on, in MeV. No default value.")
488 self.addOption (
'minEta',
None, type=float,
489 info=
"minimum |eta| value to cut on. No default value.")
490 self.addOption (
'maxEta',
None, type=float,
491 info=
"maximum |eta| value to cut on. No default value.")
492 self.addOption (
'maxRapidity',
None, type=float,
493 info=
"maximum rapidity value to cut on. No default value.")
494 self.addOption (
'etaGapLow',
None, type=float,
495 info=
"low end of the |eta| gap. No default value.")
496 self.addOption (
'etaGapHigh',
None, type=float,
497 info=
"high end of the |eta| gap. No default value.")
498 self.addOption (
'selectionDecoration',
None, type=str,
499 info=
"the name of the decoration to set. If 'None', will be set "
500 "to 'selectPtEta' followed by the selection name.")
501 self.addOption (
'useClusterEta',
False, type=bool,
502 info=
"whether to use the cluster eta (etaBE(2)) instead of the object "
503 "eta (for electrons and photons). The default is False.")
504 self.addOption (
'useDressedProperties',
False, type=bool,
505 info=
"whether to use the dressed kinematic properties "
506 "(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 508 of file AsgAnalysisConfig.py.
508 def instanceName (self) :
509 """Return the instance name for this block"""
510 return self.containerName +
"_" + self.selectionName
◆ makeAlgs()
| def python.AsgAnalysisConfig.PtEtaSelectionBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 512 of file AsgAnalysisConfig.py.
512 def makeAlgs (self, config) :
514 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'PtEtaSelectionAlg' )
515 config.addPrivateTool(
'selectionTool',
'CP::AsgPtEtaSelectionTool' )
516 if self.minPt
is not None :
517 alg.selectionTool.minPt = self.minPt
518 if self.maxPt
is not None:
519 alg.selectionTool.maxPt = self.maxPt
520 if self.minEta
is not None:
521 alg.selectionTool.minEta = self.minEta
522 if self.maxEta
is not None :
523 alg.selectionTool.maxEta = self.maxEta
524 if self.maxRapidity
is not None :
525 alg.selectionTool.maxRapidity = self.maxRapidity
526 if self.etaGapLow
is not None:
527 alg.selectionTool.etaGapLow = self.etaGapLow
528 if self.etaGapHigh
is not None:
529 alg.selectionTool.etaGapHigh = self.etaGapHigh
530 if self.selectionDecoration
is None:
531 self.selectionDecoration =
'selectPtEta' + (f
'_{self.selectionName}' if self.selectionName
else '')
532 alg.selectionTool.useClusterEta = self.useClusterEta
533 alg.selectionTool.useDressedProperties = self.useDressedProperties
534 alg.selectionDecoration = self.selectionDecoration
535 alg.particles = config.readName (self.containerName)
536 alg.preselection = config.getPreselection (self.containerName,
'')
537 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
◆ selectionDecoration
| python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionDecoration |
The documentation for this class was generated from the following file: