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