149 def makeAlgs (self, config) :
150
151 selectionPostfix = self.selectionName
152 if selectionPostfix != '' and selectionPostfix[0] != '_' :
153 selectionPostfix = '_' + selectionPostfix
154
155 postfix = self.postfix
156 if postfix is None :
157 postfix = self.selectionName
158 if postfix != '' and postfix[0] != '_' :
159 postfix = '_' + postfix
160
161 if "DiTauJetsLowPt" in self.containerName:
162 inputfile = 'TauAnalysisAlgorithms/ditau_selection_lowpt.conf'
163 else:
164 if self.quality not in ['Tight', 'Medium', 'Loose', 'NoID'] :
165 raise ValueError (f"invalid ditau quality: \"{self.quality}\", allowed values are Tight, Medium, Loose, NoID")
166 if self.quality == 'NoID':
167 inputfile = 'TauAnalysisAlgorithms/ditau_selection_highpt.conf'
168 else:
169 inputfile = 'TauAnalysisAlgorithms/ditau_selection_highpt_'+self.quality.lower()+'.conf'
170
171
172 alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'DiTauSelectionAlg' )
173 config.addPrivateTool( 'selectionTool', 'TauAnalysisTools::DiTauSelectionTool' )
174 alg.selectionTool.ConfigPath = inputfile
175 alg.selectionDecoration = 'selected_ditau' + selectionPostfix + ',as_char'
176 alg.particles = config.readName (self.containerName)
177 alg.preselection = config.getPreselection (self.containerName, self.selectionName)
178 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration,
179 preselection=self.addSelectionToPreselection)
180
181