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 665 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ ( self)

Definition at line 668 of file AsgAnalysisConfig.py.

668 def __init__ (self) :
669 super().__init__ ()
670 self.addOption ('containerName', '', type=str,
671 noneAction='error',
672 info="the name of the input container.",
673 meta={'role':'containerRef'})
674 self.addOption ('selectionName', '', type=str,
675 noneAction='error',
676 info="the name of the selection to append this to. If left empty, "
677 "the cuts are applied to every "
678 "object within the container. Specifying a name (e.g. `loose`) "
679 "applies the cut only to those object who also pass that selection.",
680 meta={'role':'selection'})
681 self.addOption ('minPt', None, type=float,
682 info=r"minimum $p_\mathrm{T}$ value to cut on (in MeV).")
683 self.addOption ('maxPt', None, type=float,
684 info=r"maximum $p_\mathrm{T}$ value to cut on (in MeV).")
685 self.addOption ('minEta', None, type=float,
686 info=r"minimum $\vert\eta\vert$ value to cut on.")
687 self.addOption ('maxEta', None, type=float,
688 info=r"maximum $\vert\eta\vert$ value to cut on.")
689 self.addOption ('maxRapidity', None, type=float,
690 info="maximum rapidity value to cut on.")
691 self.addOption ('etaGapLow', None, type=float,
692 info=r"low end of the $\vert\eta\vert$ gap.")
693 self.addOption ('etaGapHigh', None, type=float,
694 info=r"high end of the $\vert\eta\vert$ gap.")
695 self.addOption ('selectionDecoration', None, type=str,
696 info="the name of the decoration to set. If `None`, will be set "
697 "to `selectPtEta` followed by the selection name.")
698 self.addOption ('useClusterEta', False, type=bool,
699 info=r"whether to use the cluster $\eta$ (`etaBE(2)`) instead of the object "
700 r"$\eta$ (for electrons and photons).")
701 self.addOption ('useDressedProperties', False, type=bool,
702 info="whether to use the dressed kinematic properties "
703 "(for truth particles only).")
704

Member Function Documentation

◆ instanceName()

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

Definition at line 705 of file AsgAnalysisConfig.py.

705 def instanceName (self) :
706 """Return the instance name for this block"""
707 return self.containerName + "_" + self.selectionName
708

◆ makeAlgs()

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

Definition at line 709 of file AsgAnalysisConfig.py.

709 def makeAlgs (self, config) :
710
711 alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'PtEtaSelectionAlg' )
712 config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
713 if self.minPt is not None :
714 alg.selectionTool.minPt = self.minPt
715 if self.maxPt is not None:
716 alg.selectionTool.maxPt = self.maxPt
717 if self.minEta is not None:
718 alg.selectionTool.minEta = self.minEta
719 if self.maxEta is not None :
720 alg.selectionTool.maxEta = self.maxEta
721 if self.maxRapidity is not None :
722 alg.selectionTool.maxRapidity = self.maxRapidity
723 if self.etaGapLow is not None:
724 alg.selectionTool.etaGapLow = self.etaGapLow
725 if self.etaGapHigh is not None:
726 alg.selectionTool.etaGapHigh = self.etaGapHigh
727 if self.selectionDecoration is None:
728 self.selectionDecoration = 'selectPtEta' + (f'_{self.selectionName}' if self.selectionName else '')
729 alg.selectionTool.useClusterEta = self.useClusterEta
730 alg.selectionTool.useDressedProperties = self.useDressedProperties
731 alg.selectionDecoration = self.selectionDecoration
732 alg.particles = config.readName (self.containerName)
733 alg.preselection = config.getPreselection (self.containerName, '')
734 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
735
736
737

Member Data Documentation

◆ containerName

python.AsgAnalysisConfig.PtEtaSelectionBlock.containerName

Definition at line 734 of file AsgAnalysisConfig.py.

◆ selectionDecoration

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

Definition at line 728 of file AsgAnalysisConfig.py.

◆ selectionName

python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionName

Definition at line 734 of file AsgAnalysisConfig.py.


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