the ConfigBlock for a pt-eta selection
Definition at line 496 of file AsgAnalysisConfig.py.
◆ __init__()
| def python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ |
( |
|
self | ) |
|
Definition at line 499 of file AsgAnalysisConfig.py.
500 super (PtEtaSelectionBlock, self).__init__ ()
501 self.addOption (
'containerName',
'', type=str,
503 info=
"the name of the input container.")
504 self.addOption (
'selectionName',
'', type=str,
506 info=
"the name of the selection to append this to. The default is "
507 "'' (empty string), meaning that the cuts are applied to every "
508 "object within the container. Specifying a name (e.g. loose) "
509 "applies the cut only to those object who also pass that selection.")
510 self.addOption (
'minPt',
None, type=float,
511 info=
"minimum pT value to cut on, in MeV. No default value.")
512 self.addOption (
'maxPt',
None, type=float,
513 info=
"maximum pT value to cut on, in MeV. No default value.")
514 self.addOption (
'minEta',
None, type=float,
515 info=
"minimum |eta| value to cut on. No default value.")
516 self.addOption (
'maxEta',
None, type=float,
517 info=
"maximum |eta| value to cut on. No default value.")
518 self.addOption (
'maxRapidity',
None, type=float,
519 info=
"maximum rapidity value to cut on. No default value.")
520 self.addOption (
'etaGapLow',
None, type=float,
521 info=
"low end of the |eta| gap. No default value.")
522 self.addOption (
'etaGapHigh',
None, type=float,
523 info=
"high end of the |eta| gap. No default value.")
524 self.addOption (
'selectionDecoration',
None, type=str,
525 info=
"the name of the decoration to set. If 'None', will be set "
526 "to 'selectPtEta' followed by the selection name.")
527 self.addOption (
'useClusterEta',
False, type=bool,
528 info=
"whether to use the cluster eta (etaBE(2)) instead of the object "
529 "eta (for electrons and photons). The default is False.")
530 self.addOption (
'useDressedProperties',
False, type=bool,
531 info=
"whether to use the dressed kinematic properties "
532 "(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 534 of file AsgAnalysisConfig.py.
534 def instanceName (self) :
535 """Return the instance name for this block"""
536 return self.containerName +
"_" + self.selectionName
◆ makeAlgs()
| def python.AsgAnalysisConfig.PtEtaSelectionBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 538 of file AsgAnalysisConfig.py.
538 def makeAlgs (self, config) :
540 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'PtEtaSelectionAlg' )
541 config.addPrivateTool(
'selectionTool',
'CP::AsgPtEtaSelectionTool' )
542 if self.minPt
is not None :
543 alg.selectionTool.minPt = self.minPt
544 if self.maxPt
is not None:
545 alg.selectionTool.maxPt = self.maxPt
546 if self.minEta
is not None:
547 alg.selectionTool.minEta = self.minEta
548 if self.maxEta
is not None :
549 alg.selectionTool.maxEta = self.maxEta
550 if self.maxRapidity
is not None :
551 alg.selectionTool.maxRapidity = self.maxRapidity
552 if self.etaGapLow
is not None:
553 alg.selectionTool.etaGapLow = self.etaGapLow
554 if self.etaGapHigh
is not None:
555 alg.selectionTool.etaGapHigh = self.etaGapHigh
556 if self.selectionDecoration
is None:
557 self.selectionDecoration =
'selectPtEta' + (f
'_{self.selectionName}' if self.selectionName
else '')
558 alg.selectionTool.useClusterEta = self.useClusterEta
559 alg.selectionTool.useDressedProperties = self.useDressedProperties
560 alg.selectionDecoration = self.selectionDecoration
561 alg.particles = config.readName (self.containerName)
562 alg.preselection = config.getPreselection (self.containerName,
'')
563 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
◆ selectionDecoration
| python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionDecoration |
The documentation for this class was generated from the following file: