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
 quality
 selectionName

Detailed Description

the ConfigBlock for the tau working point selection

Definition at line 114 of file DiTauAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.__init__ ( self)

Definition at line 117 of file DiTauAnalysisConfig.py.

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

Member Function Documentation

◆ instanceName()

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

Definition at line 134 of file DiTauAnalysisConfig.py.

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

◆ makeAlgs()

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

Definition at line 141 of file DiTauAnalysisConfig.py.

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

Member Data Documentation

◆ containerName

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.containerName

Definition at line 153 of file DiTauAnalysisConfig.py.

◆ quality

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.quality

Definition at line 156 of file DiTauAnalysisConfig.py.

◆ selectionName

python.DiTauAnalysisConfig.DiTauWorkingPointSelectionConfig.selectionName

Definition at line 168 of file DiTauAnalysisConfig.py.


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