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

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ ( self)

Definition at line 654 of file AsgAnalysisConfig.py.

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

Member Function Documentation

◆ instanceName()

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

Definition at line 691 of file AsgAnalysisConfig.py.

691 def instanceName (self) :
692 """Return the instance name for this block"""
693 return self.containerName + "_" + self.selectionName
694

◆ makeAlgs()

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

Definition at line 695 of file AsgAnalysisConfig.py.

695 def makeAlgs (self, config) :
696
697 alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'PtEtaSelectionAlg' )
698 config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
699 if self.minPt is not None :
700 alg.selectionTool.minPt = self.minPt
701 if self.maxPt is not None:
702 alg.selectionTool.maxPt = self.maxPt
703 if self.minEta is not None:
704 alg.selectionTool.minEta = self.minEta
705 if self.maxEta is not None :
706 alg.selectionTool.maxEta = self.maxEta
707 if self.maxRapidity is not None :
708 alg.selectionTool.maxRapidity = self.maxRapidity
709 if self.etaGapLow is not None:
710 alg.selectionTool.etaGapLow = self.etaGapLow
711 if self.etaGapHigh is not None:
712 alg.selectionTool.etaGapHigh = self.etaGapHigh
713 if self.selectionDecoration is None:
714 self.selectionDecoration = 'selectPtEta' + (f'_{self.selectionName}' if self.selectionName else '')
715 alg.selectionTool.useClusterEta = self.useClusterEta
716 alg.selectionTool.useDressedProperties = self.useDressedProperties
717 alg.selectionDecoration = self.selectionDecoration
718 alg.particles = config.readName (self.containerName)
719 alg.preselection = config.getPreselection (self.containerName, '')
720 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
721
722
723

Member Data Documentation

◆ containerName

python.AsgAnalysisConfig.PtEtaSelectionBlock.containerName

Definition at line 720 of file AsgAnalysisConfig.py.

◆ selectionDecoration

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

Definition at line 714 of file AsgAnalysisConfig.py.

◆ selectionName

python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionName

Definition at line 720 of file AsgAnalysisConfig.py.


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