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

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ ( self)

Definition at line 524 of file AsgAnalysisConfig.py.

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

Member Function Documentation

◆ instanceName()

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

Definition at line 559 of file AsgAnalysisConfig.py.

559 def instanceName (self) :
560 """Return the instance name for this block"""
561 return self.containerName + "_" + self.selectionName
562

◆ makeAlgs()

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

Definition at line 563 of file AsgAnalysisConfig.py.

563 def makeAlgs (self, config) :
564
565 alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'PtEtaSelectionAlg' )
566 config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
567 if self.minPt is not None :
568 alg.selectionTool.minPt = self.minPt
569 if self.maxPt is not None:
570 alg.selectionTool.maxPt = self.maxPt
571 if self.minEta is not None:
572 alg.selectionTool.minEta = self.minEta
573 if self.maxEta is not None :
574 alg.selectionTool.maxEta = self.maxEta
575 if self.maxRapidity is not None :
576 alg.selectionTool.maxRapidity = self.maxRapidity
577 if self.etaGapLow is not None:
578 alg.selectionTool.etaGapLow = self.etaGapLow
579 if self.etaGapHigh is not None:
580 alg.selectionTool.etaGapHigh = self.etaGapHigh
581 if self.selectionDecoration is None:
582 self.selectionDecoration = 'selectPtEta' + (f'_{self.selectionName}' if self.selectionName else '')
583 alg.selectionTool.useClusterEta = self.useClusterEta
584 alg.selectionTool.useDressedProperties = self.useDressedProperties
585 alg.selectionDecoration = self.selectionDecoration
586 alg.particles = config.readName (self.containerName)
587 alg.preselection = config.getPreselection (self.containerName, '')
588 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
589
590
591

Member Data Documentation

◆ containerName

python.AsgAnalysisConfig.PtEtaSelectionBlock.containerName

Definition at line 588 of file AsgAnalysisConfig.py.

◆ selectionDecoration

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

Definition at line 582 of file AsgAnalysisConfig.py.

◆ selectionName

python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionName

Definition at line 588 of file AsgAnalysisConfig.py.


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