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

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PtEtaSelectionBlock.__init__ ( self)

Definition at line 559 of file AsgAnalysisConfig.py.

559 def __init__ (self) :
560 super (PtEtaSelectionBlock, self).__init__ ()
561 self.addOption ('containerName', '', type=str,
562 noneAction='error',
563 info="the name of the input container.")
564 self.addOption ('selectionName', '', type=str,
565 noneAction='error',
566 info="the name of the selection to append this to. If left empty, "
567 "the cuts are applied to every "
568 "object within the container. Specifying a name (e.g. `loose`) "
569 "applies the cut only to those object who also pass that selection.")
570 self.addOption ('minPt', None, type=float,
571 info=r"minimum $p_\mathrm{T}$ value to cut on (in MeV).")
572 self.addOption ('maxPt', None, type=float,
573 info=r"maximum $p_\mathrm{T}$ value to cut on (in MeV).")
574 self.addOption ('minEta', None, type=float,
575 info=r"minimum $\vert\eta\vert$ value to cut on.")
576 self.addOption ('maxEta', None, type=float,
577 info=r"maximum $\vert\eta\vert$ value to cut on.")
578 self.addOption ('maxRapidity', None, type=float,
579 info="maximum rapidity value to cut on.")
580 self.addOption ('etaGapLow', None, type=float,
581 info=r"low end of the $\vert\eta\vert$ gap.")
582 self.addOption ('etaGapHigh', None, type=float,
583 info=r"high end of the $\vert\eta\vert$ gap.")
584 self.addOption ('selectionDecoration', None, type=str,
585 info="the name of the decoration to set. If `None`, will be set "
586 "to `selectPtEta` followed by the selection name.")
587 self.addOption ('useClusterEta', False, type=bool,
588 info=r"whether to use the cluster $\eta$ (`etaBE(2)`) instead of the object "
589 r"$\eta$ (for electrons and photons).")
590 self.addOption ('useDressedProperties', False, type=bool,
591 info="whether to use the dressed kinematic properties "
592 "(for truth particles only).")
593

Member Function Documentation

◆ instanceName()

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

Definition at line 594 of file AsgAnalysisConfig.py.

594 def instanceName (self) :
595 """Return the instance name for this block"""
596 return self.containerName + "_" + self.selectionName
597

◆ makeAlgs()

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

Definition at line 598 of file AsgAnalysisConfig.py.

598 def makeAlgs (self, config) :
599
600 alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'PtEtaSelectionAlg' )
601 config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
602 if self.minPt is not None :
603 alg.selectionTool.minPt = self.minPt
604 if self.maxPt is not None:
605 alg.selectionTool.maxPt = self.maxPt
606 if self.minEta is not None:
607 alg.selectionTool.minEta = self.minEta
608 if self.maxEta is not None :
609 alg.selectionTool.maxEta = self.maxEta
610 if self.maxRapidity is not None :
611 alg.selectionTool.maxRapidity = self.maxRapidity
612 if self.etaGapLow is not None:
613 alg.selectionTool.etaGapLow = self.etaGapLow
614 if self.etaGapHigh is not None:
615 alg.selectionTool.etaGapHigh = self.etaGapHigh
616 if self.selectionDecoration is None:
617 self.selectionDecoration = 'selectPtEta' + (f'_{self.selectionName}' if self.selectionName else '')
618 alg.selectionTool.useClusterEta = self.useClusterEta
619 alg.selectionTool.useDressedProperties = self.useDressedProperties
620 alg.selectionDecoration = self.selectionDecoration
621 alg.particles = config.readName (self.containerName)
622 alg.preselection = config.getPreselection (self.containerName, '')
623 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration)
624
625
626

Member Data Documentation

◆ containerName

python.AsgAnalysisConfig.PtEtaSelectionBlock.containerName

Definition at line 623 of file AsgAnalysisConfig.py.

◆ selectionDecoration

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

Definition at line 617 of file AsgAnalysisConfig.py.

◆ selectionName

python.AsgAnalysisConfig.PtEtaSelectionBlock.selectionName

Definition at line 623 of file AsgAnalysisConfig.py.


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