ATLAS Offline Software
Loading...
Searching...
No Matches
python.AsgAnalysisConfig.PtEtaSelectionBlock Class Reference
Inheritance diagram for python.AsgAnalysisConfig.PtEtaSelectionBlock:
Collaboration diagram for python.AsgAnalysisConfig.PtEtaSelectionBlock:

Public Member Functions

 __init__ (self)
 instanceName (self)
 makeAlgs (self, config)

Public Attributes

str selectionDecoration = 'selectPtEta' + (f'_{self.selectionName}' if self.selectionName else '')
 containerName
 selectionName

Detailed Description

the ConfigBlock for a pt-eta selection

Definition at line 509 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ ( self)

Definition at line 512 of file AsgAnalysisConfig.py.

512 def __init__ (self) :
513 super (PtEtaSelectionBlock, self).__init__ ()
514 self.addOption ('containerName', '', type=str,
515 noneAction='error',
516 info="the name of the input container.")
517 self.addOption ('selectionName', '', type=str,
518 noneAction='error',
519 info="the name of the selection to append this to. If left empty, "
520 "the cuts are applied to every "
521 "object within the container. Specifying a name (e.g. `loose`) "
522 "applies the cut only to those object who also pass that selection.")
523 self.addOption ('minPt', None, type=float,
524 info=r"minimum $p_\mathrm{T}$ value to cut on, in MeV.")
525 self.addOption ('maxPt', None, type=float,
526 info=r"maximum $p_\mathrm{T}$ value to cut on, in MeV.")
527 self.addOption ('minEta', None, type=float,
528 info=r"minimum $\vert\eta\vert$ value to cut on.")
529 self.addOption ('maxEta', None, type=float,
530 info=r"maximum $\vert\eta\vert$ value to cut on.")
531 self.addOption ('maxRapidity', None, type=float,
532 info="maximum rapidity value to cut on.")
533 self.addOption ('etaGapLow', None, type=float,
534 info=r"low end of the $\vert\eta\vert$ gap.")
535 self.addOption ('etaGapHigh', None, type=float,
536 info=r"high end of the $\vert\eta\vert$ gap.")
537 self.addOption ('selectionDecoration', None, type=str,
538 info="the name of the decoration to set. If `None`, will be set "
539 "to `selectPtEta` followed by the selection name.")
540 self.addOption ('useClusterEta', False, type=bool,
541 info=r"whether to use the cluster $\eta$ (`etaBE(2)`) instead of the object "
542 r"$\eta$ (for electrons and photons).")
543 self.addOption ('useDressedProperties', False, type=bool,
544 info="whether to use the dressed kinematic properties "
545 "(for truth particles only).")
546

Member Function Documentation

◆ instanceName()

python.AsgAnalysisConfig.PtEtaSelectionBlock.instanceName ( self)
Return the instance name for this block

Definition at line 547 of file AsgAnalysisConfig.py.

547 def instanceName (self) :
548 """Return the instance name for this block"""
549 return self.containerName + "_" + self.selectionName
550

◆ makeAlgs()

python.AsgAnalysisConfig.PtEtaSelectionBlock.makeAlgs ( self,
config )

Definition at line 551 of file AsgAnalysisConfig.py.

551 def makeAlgs (self, config) :
552
553 alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'PtEtaSelectionAlg' )
554 config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
555 if self.minPt is not None :
556 alg.selectionTool.minPt = self.minPt
557 if self.maxPt is not None:
558 alg.selectionTool.maxPt = self.maxPt
559 if self.minEta is not None:
560 alg.selectionTool.minEta = self.minEta
561 if self.maxEta is not None :
562 alg.selectionTool.maxEta = self.maxEta
563 if self.maxRapidity is not None :
564 alg.selectionTool.maxRapidity = self.maxRapidity
565 if self.etaGapLow is not None:
566 alg.selectionTool.etaGapLow = self.etaGapLow
567 if self.etaGapHigh is not None:
568 alg.selectionTool.etaGapHigh = self.etaGapHigh
569 if self.selectionDecoration is None:
570 self.selectionDecoration = 'selectPtEta' + (f'_{self.selectionName}' if self.selectionName else '')
571 alg.selectionTool.useClusterEta = self.useClusterEta
572 alg.selectionTool.useDressedProperties = self.useDressedProperties
573 alg.selectionDecoration = self.selectionDecoration
574 alg.particles = config.readName (self.containerName)
575 alg.preselection = config.getPreselection (self.containerName, '')
576 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
577
578
579

Member Data Documentation

◆ containerName

python.AsgAnalysisConfig.PtEtaSelectionBlock.containerName

Definition at line 576 of file AsgAnalysisConfig.py.

◆ selectionDecoration

str python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionDecoration = 'selectPtEta' + (f'_{self.selectionName}' if self.selectionName else '')

Definition at line 570 of file AsgAnalysisConfig.py.

◆ selectionName

python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionName

Definition at line 576 of file AsgAnalysisConfig.py.


The documentation for this class was generated from the following file: