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

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ ( self)

Definition at line 515 of file AsgAnalysisConfig.py.

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

Member Function Documentation

◆ instanceName()

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

Definition at line 550 of file AsgAnalysisConfig.py.

550 def instanceName (self) :
551 """Return the instance name for this block"""
552 return self.containerName + "_" + self.selectionName
553

◆ makeAlgs()

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

Definition at line 554 of file AsgAnalysisConfig.py.

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

Member Data Documentation

◆ containerName

python.AsgAnalysisConfig.PtEtaSelectionBlock.containerName

Definition at line 579 of file AsgAnalysisConfig.py.

◆ selectionDecoration

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

Definition at line 573 of file AsgAnalysisConfig.py.

◆ selectionName

python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionName

Definition at line 579 of file AsgAnalysisConfig.py.


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