ATLAS Offline Software
Loading...
Searching...
No Matches
python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig Class Reference
Inheritance diagram for python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig:
Collaboration diagram for python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig:

Public Member Functions

 __init__ (self)
 instanceName (self)
 makeAlgs (self, config)

Public Attributes

 containerName
 selectionName

Detailed Description

the ConfigBlock for the tau working point selection

Definition at line 112 of file DiTauAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.__init__ ( self)

Definition at line 115 of file DiTauAnalysisConfig.py.

115 def __init__ (self) :
116 super (DiTauWorkingPointSelectionConfig, self).__init__ ()
117 self.setBlockName('DiTauWorkingPointSelection')
118 self.addOption ('containerName', '', type=str,
119 noneAction='error',
120 info="the name of the input container.")
121 self.addOption ('selectionName', '', type=str,
122 noneAction='error',
123 info="the name of the ditau-jet selection to define (e.g. `tight` or "
124 "`loose`).")
125 self.addOption ('postfix', None, type=str,
126 info="a postfix to apply to decorations and algorithm names. "
127 "Typically not needed here as `selectionName` is used internally.")
128 self.addOption ('addSelectionToPreselection', True, type=bool,
129 info="whether to retain only ditau-jets satisfying the working point "
130 "requirements.")
131

Member Function Documentation

◆ instanceName()

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.instanceName ( self)
Return the instance name for this block

Definition at line 132 of file DiTauAnalysisConfig.py.

132 def instanceName (self) :
133 """Return the instance name for this block"""
134 if self.postfix is not None:
135 return self.containerName + '_' + self.selectionName + self.postfix
136 else:
137 return self.containerName + '_' + self.selectionName
138

◆ makeAlgs()

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.makeAlgs ( self,
config )

Definition at line 139 of file DiTauAnalysisConfig.py.

139 def makeAlgs (self, config) :
140
141 selectionPostfix = self.selectionName
142 if selectionPostfix != '' and selectionPostfix[0] != '_' :
143 selectionPostfix = '_' + selectionPostfix
144
145 postfix = self.postfix
146 if postfix is None :
147 postfix = self.selectionName
148 if postfix != '' and postfix[0] != '_' :
149 postfix = '_' + postfix
150
151 inputfile = 'TauAnalysisAlgorithms/ditau_selection_highpt.conf'
152 if "DiTauJetsLowPt" in self.containerName:
153 inputfile = 'TauAnalysisAlgorithms/ditau_selection_lowpt.conf'
154
155 # Set up the algorithm selecting taus:
156 alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'DiTauSelectionAlg' )
157 config.addPrivateTool( 'selectionTool', 'TauAnalysisTools::DiTauSelectionTool' )
158 alg.selectionTool.ConfigPath = inputfile
159 alg.selectionDecoration = 'selected_ditau' + selectionPostfix + ',as_char'
160 alg.particles = config.readName (self.containerName)
161 alg.preselection = config.getPreselection (self.containerName, self.selectionName)
162 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration,
163 preselection=self.addSelectionToPreselection)
164
165

Member Data Documentation

◆ containerName

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.containerName

Definition at line 152 of file DiTauAnalysisConfig.py.

◆ selectionName

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.selectionName

Definition at line 162 of file DiTauAnalysisConfig.py.


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