the ConfigBlock for a pt-eta selection
Definition at line 329 of file AsgAnalysisConfig.py.
◆ __init__()
def python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ |
( |
|
self, |
|
|
|
containerName = '' , |
|
|
|
selectionName = '' |
|
) |
| |
Definition at line 332 of file AsgAnalysisConfig.py.
332 def __init__ (self, containerName='', selectionName='') :
333 super (PtEtaSelectionBlock, self).__init__ ()
334 self.addOption (
'containerName', containerName, type=str,
336 info=
"the name of the input container.")
337 self.addOption (
'selectionName', selectionName, type=str,
339 info=
"the name of the selection to append this to. The default is "
340 "'' (empty string), meaning that the cuts are applied to every "
341 "object within the container. Specifying a name (e.g. loose) "
342 "applies the cut only to those object who also pass that selection.")
343 self.addOption (
'postfix',
'', type=str,
344 info=
"a postfix to apply to decorations and algorithm names. "
345 "Typically not needed here since we tend apply a single set of "
346 "pT and eta cuts to a given type of object.")
347 self.addOption (
'minPt',
None, type=float,
348 info=
"minimum pT value to cut on, in MeV. No default value.")
349 self.addOption (
'maxPt',
None, type=float,
350 info=
"maximum pT value to cut on, in MeV. No default value.")
351 self.addOption (
'minEta',
None, type=float,
352 info=
"minimum |eta| value to cut on. No default value.")
353 self.addOption (
'maxEta',
None, type=float,
354 info=
"maximum |eta| value to cut on. No default value.")
355 self.addOption (
'etaGapLow',
None, type=float,
356 info=
"low end of the |eta| gap. No default value.")
357 self.addOption (
'etaGapHigh',
None, type=float,
358 info=
"high end of the |eta| gap. No default value.")
359 self.addOption (
'selectionDecoration',
'selectPtEta', type=str,
360 info=
"the name of the decoration to set.")
361 self.addOption (
'useClusterEta',
False, type=bool,
362 info=
"whether to use the cluster eta (etaBE(2)) instead of the object "
363 "eta (for electrons and photons). The default is False.")
364 self.addOption (
'useDressedProperties',
False, type=bool,
365 info=
"whether to use the dressed kinematic properties "
366 "(for truth particles only). The default is False.")
◆ makeAlgs()
def python.AsgAnalysisConfig.PtEtaSelectionBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 369 of file AsgAnalysisConfig.py.
369 def makeAlgs (self, config) :
371 postfix = self.postfix
372 if postfix !=
'' and postfix[0] !=
'_' :
373 postfix =
'_' + postfix
375 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'PtEtaSelectionAlg' + self.containerName + postfix )
376 config.addPrivateTool(
'selectionTool',
'CP::AsgPtEtaSelectionTool' )
377 if self.minPt
is not None :
378 alg.selectionTool.minPt = self.minPt
379 if self.maxPt
is not None:
380 alg.selectionTool.maxPt = self.maxPt
381 if self.minEta
is not None:
382 alg.selectionTool.minEta = self.minEta
383 if self.maxEta
is not None :
384 alg.selectionTool.maxEta = self.maxEta
385 if self.etaGapLow
is not None:
386 alg.selectionTool.etaGapLow = self.etaGapLow
387 if self.etaGapHigh
is not None:
388 alg.selectionTool.etaGapHigh = self.etaGapHigh
389 alg.selectionTool.useClusterEta = self.useClusterEta
390 alg.selectionTool.useDressedProperties = self.useDressedProperties
391 alg.selectionDecoration = self.selectionDecoration
392 alg.particles = config.readName (self.containerName)
393 alg.preselection = config.getPreselection (self.containerName,
'')
394 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
The documentation for this class was generated from the following file: