141 def makeAlgs (self, config) :
142
143 import logging
144 log = logging.getLogger('OverlapRemovalConfig')
145
146 if self.addToAllSelections is None:
147
148
149
150
151
152
153
154 numORblocks = OverlapAnalysisConfig.get_instance_count()
155 if numORblocks == 1:
156
157 self.addToAllSelections = True
158 if self.addPreselection is None:
159 self.addPreselection = False
160 else:
161
162 self.addToAllSelections = False
163 if self.addPreselection is None:
164 self.addPreselection = True
165
166 if self.selectionName is not None:
167 selectionName = self.selectionName
168 outputLabel = self.outputLabel + '_' + selectionName
169 inputLabel = self.inputLabel + '_' + selectionName
170 select_or_decoration = 'select_or_' + self.selectionName
171 else:
172 if self.addToAllSelections:
173 selectionName = ""
174 select_or_decoration = 'select_or'
175 else:
176 selectionName = self.outputLabel
177 select_or_decoration = 'select_' + self.outputLabel
178 outputLabel = self.outputLabel
179 inputLabel = self.inputLabel
180
181
182 if OverlapAnalysisConfig.get_instance_count() > 1:
183
184 if self.addToAllSelections:
185 log.warning("More than one OverlapRemoval config scheduled but 'addToAllSelections' is set to True. This is probably not what you want.")
186
187 if self.electrons and not self.electronsSelectionName:
188 raise ValueError("More than one OverlapRemoval config scheduled: please explicitly specify the selection name of the OR decision for electrons with 'electronsSelectionName'.")
189
190 if self.muons and not self.muonsSelectionName:
191 raise ValueError("More than one OverlapRemoval config scheduled: please explicitly specify the selection name of the OR decision for muons with 'muonsSelectionName'.")
192
193 if self.photons and not self.photonsSelectionName:
194 raise ValueError("More than one OverlapRemoval config scheduled: please explicitly specify the selection name of the OR decision for photons with 'photonsSelectionName'.")
195
196 if self.taus and not self.tausSelectionName:
197 raise ValueError("More than one OverlapRemoval config scheduled: please explicitly specify the selection name of the OR decision for tau-jets with 'tausSelectionName'.")
198
199 if self.jets and not self.jetsSelectionName:
200 raise ValueError("More than one OverlapRemoval config scheduled: please explicitly specify the selection name of the OR decision for jets with 'jetsSelectionName'.")
201
202 if self.fatJets and not self.fatJetsSelectionName:
203 raise ValueError("More than one OverlapRemoval config scheduled: please explicitly specify the selection name of the OR decision for large-R jets with 'fatJetsSelectionName'.")
204
205
206
207
208 if self.jetsSelectionName is not None:
209 jetsSelectionName = self.jetsSelectionName
210 else:
211 jetsSelectionName = selectionName
212 if self.fatJetsSelectionName is not None:
213 fatJetsSelectionName = self.fatJetsSelectionName
214 else:
215 fatJetsSelectionName = selectionName
216 if self.electronsSelectionName is not None:
217 electronsSelectionName = self.electronsSelectionName
218 else:
219 electronsSelectionName = selectionName
220 if self.muonsSelectionName is not None:
221 muonsSelectionName = self.muonsSelectionName
222 else:
223 muonsSelectionName = selectionName
224 if self.photonsSelectionName is not None:
225 photonsSelectionName = self.photonsSelectionName
226 else:
227 photonsSelectionName = selectionName
228 if self.tausSelectionName is not None:
229 tausSelectionName = self.tausSelectionName
230 else:
231 tausSelectionName = selectionName
232
233
234
235
236
237
238
239
240
241
242
243
244 def enableOutput(containerName, selectionName):
245
246 if self.forceOROutputFlags:
247 return True
248
249
250 if selectionName == '':
251 return False
252
253
254 if selectionName in config.getSelectionNames(containerName.split(".")[0]):
255 return False
256
257
258 return True
259
260
261
262
263
264 electrons = None
265 if self.electrons != "" :
266 if self.nominalOnlyUnifiedSelection:
267 self.makeUnionPreselectionAlg(config, self.electrons)
268 alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORElectronsSelectAlg' )
269 electrons, alg.preselection = config.readNameAndSelection (self.electrons)
270 alg.particles = electrons
271 alg.selectionDecoration = inputLabel + ',as_char'
272 if enableOutput(self.electrons, electronsSelectionName):
273 outputName = "select_" + self.electronsSelectionName if self.electronsSelectionName else select_or_decoration
274 config.addOutputVar (self.electrons.
split(
'.')[0],
275 outputLabel + '_%SYS%',
276 outputName if not self.forceOROutputFlagName else "select_" + self.forceOROutputFlagName,
277 noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection)
278 if self.nominalOnlyUnifiedSelection:
279 alg.preselection = 'unifiedSelectForOR'
280
281 photons = None
282 if self.photons != "" :
283 if self.nominalOnlyUnifiedSelection:
284 self.makeUnionPreselectionAlg(config, self.photons)
285 alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORPhotonsSelectAlg' )
286 photons, alg.preselection = config.readNameAndSelection (self.photons)
287 alg.particles = photons
288 alg.selectionDecoration = inputLabel + ',as_char'
289 if enableOutput(self.photons, photonsSelectionName):
290 outputName = "select_" + self.photonsSelectionName if self.photonsSelectionName else select_or_decoration
291 config.addOutputVar (self.photons.
split(
'.')[0],
292 outputLabel + '_%SYS%',
293 outputName if not self.forceOROutputFlagName else "select_" + self.forceOROutputFlagName,
294 noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection)
295 if self.nominalOnlyUnifiedSelection:
296 alg.preselection = 'unifiedSelectForOR'
297
298 muons = None
299 if self.muons != "" :
300 if self.nominalOnlyUnifiedSelection:
301 self.makeUnionPreselectionAlg(config, self.muons)
302 alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORMuonsSelectAlg' )
303 muons, alg.preselection = config.readNameAndSelection (self.muons)
304 alg.particles = muons
305 alg.selectionDecoration = inputLabel + ',as_char'
306 if enableOutput(self.muons, muonsSelectionName):
307 outputName = "select_" + self.muonsSelectionName if self.muonsSelectionName else select_or_decoration
308 config.addOutputVar (self.muons.
split(
'.')[0],
309 outputLabel + '_%SYS%',
310 outputName if not self.forceOROutputFlagName else "select_" + self.forceOROutputFlagName,
311 noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection)
312 if self.nominalOnlyUnifiedSelection:
313 alg.preselection = 'unifiedSelectForOR'
314
315 taus = None
316 if self.taus != "" :
317 if self.nominalOnlyUnifiedSelection:
318 self.makeUnionPreselectionAlg(config, self.taus)
319 alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORTausSelectAlg' )
320 taus, alg.preselection = config.readNameAndSelection (self.taus)
321 alg.particles = taus
322 alg.selectionDecoration = inputLabel + ',as_char'
323 if enableOutput(self.taus, tausSelectionName):
324 outputName = "select_" + self.tausSelectionName if self.tausSelectionName else select_or_decoration
325 config.addOutputVar (self.taus.
split(
'.')[0],
326 outputLabel + '_%SYS%',
327 outputName if not self.forceOROutputFlagName else "select_" + self.forceOROutputFlagName,
328 noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection)
329 if self.nominalOnlyUnifiedSelection:
330 alg.preselection = 'unifiedSelectForOR'
331
332 jets = None
333 if self.jets != "" :
334 if self.nominalOnlyUnifiedSelection:
335 self.makeUnionPreselectionAlg(config, self.jets)
336 alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORJetsSelectAlg' )
337 jets, alg.preselection = config.readNameAndSelection (self.jets)
338 alg.particles = jets
339 alg.selectionDecoration = inputLabel + ',as_char'
340 if enableOutput(self.jets, jetsSelectionName):
341 outputName = "select_" + self.jetsSelectionName if self.jetsSelectionName else select_or_decoration
342 config.addOutputVar (self.jets.
split(
'.')[0],
343 outputLabel + '_%SYS%',
344 outputName if not self.forceOROutputFlagName else "select_" + self.forceOROutputFlagName,
345 noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection)
346 if self.nominalOnlyUnifiedSelection:
347 alg.preselection = 'unifiedSelectForOR'
348
349 fatJets = None
350 if self.fatJets != "" :
351 if self.nominalOnlyUnifiedSelection:
352 self.makeUnionPreselectionAlg(config, self.fatJets)
353 alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORFatJetsSelectAlg' )
354 fatJets, alg.preselection = config.readNameAndSelection (self.fatJets)
355 alg.particles = fatJets
356 alg.selectionDecoration = inputLabel + ',as_char'
357 if enableOutput(self.fatJets, fatJetsSelectionName):
358 outputName = "select_" + self.fatJetsSelectionName if self.fatJetsSelectionName else select_or_decoration
359 config.addOutputVar (self.fatJets.
split(
'.')[0],
360 outputLabel + '_%SYS%',
361 outputName if not self.forceOROutputFlagName else "select_" + self.forceOROutputFlagName,
362 noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection)
363 if self.nominalOnlyUnifiedSelection:
364 alg.preselection = 'unifiedSelectForOR'
365
366
367
368
369
370 alg = config.createAlgorithm( 'CP::OverlapRemovalAlg', 'OverlapRemovalAlg' )
371 alg.OutputLabel = outputLabel
372 if self.nominalOnly or self.nominalOnlyUnifiedSelection :
373 alg.affectingSystematicsFilter = '.*'
374 if electrons :
375 alg.electrons = electrons
376 alg.electronsDecoration = outputLabel + '_%SYS%,as_char'
377 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.electronsDecoration, preselection=
False, comesFrom=
'or', writeToOutput=
False)
378 if muons :
379 alg.muons = muons
380 alg.muonsDecoration = outputLabel + '_%SYS%,as_char'
381 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.muonsDecoration, preselection=
False, comesFrom=
'or', writeToOutput=
False)
382 if taus :
383 alg.taus = taus
384 alg.tausDecoration = outputLabel + '_%SYS%,as_char'
385 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.tausDecoration, preselection=
False, comesFrom=
'or', writeToOutput=
False)
386 if jets :
387 alg.jets = jets
388 alg.jetsDecoration = outputLabel + '_%SYS%,as_char'
389 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.jetsDecoration, preselection=
False, comesFrom=
'or', writeToOutput=
False)
390 if photons :
391 alg.photons = photons
392 alg.photonsDecoration = outputLabel + '_%SYS%,as_char'
393 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.photonsDecoration, preselection=
False, comesFrom=
'or', writeToOutput=
False)
394 if fatJets :
395 alg.fatJets = fatJets
396 alg.fatJetsDecoration = outputLabel + '_%SYS%,as_char'
397 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.fatJetsDecoration, preselection=
False, comesFrom=
'or', writeToOutput=
False)
398
399
400 config.addPrivateTool( 'overlapTool', 'ORUtils::OverlapRemovalTool' )
401 alg.overlapTool.InputLabel = inputLabel
402 alg.overlapTool.OutputLabel = outputLabel
403
404
405
406
407
408
409 alg.overlapTool.OutputPassValue = True
410
411
412 if electrons and self.doEleEleOR:
413 config.addPrivateTool( 'overlapTool.EleEleORT',
414 'ORUtils::EleEleOverlapTool' )
415 alg.overlapTool.EleEleORT.InputLabel = inputLabel
416 alg.overlapTool.EleEleORT.OutputLabel = outputLabel
417 alg.overlapTool.EleEleORT.LinkOverlapObjects = self.linkOverlapObjects
418 alg.overlapTool.EleEleORT.OutputPassValue = True
419
420
421 if electrons and muons and self.doEleMuOR:
422 config.addPrivateTool( 'overlapTool.EleMuORT',
423 'ORUtils::EleMuSharedTrkOverlapTool' )
424 alg.overlapTool.EleMuORT.InputLabel = inputLabel
425 alg.overlapTool.EleMuORT.OutputLabel = outputLabel
426 alg.overlapTool.EleMuORT.LinkOverlapObjects = self.linkOverlapObjects
427 alg.overlapTool.EleMuORT.OutputPassValue = True
428
429
430 if electrons and jets and self.doEleJetOR:
431 config.addPrivateTool( 'overlapTool.EleJetORT',
432 'ORUtils::EleJetOverlapTool' )
433 alg.overlapTool.EleJetORT.InputLabel = inputLabel
434 alg.overlapTool.EleJetORT.OutputLabel = outputLabel
435 alg.overlapTool.EleJetORT.LinkOverlapObjects = self.linkOverlapObjects
436 alg.overlapTool.EleJetORT.BJetLabel = self.bJetLabel
437 alg.overlapTool.EleJetORT.InnerDR = self.InnerDR
438 alg.overlapTool.EleJetORT.OuterDR = self.OuterDR
439 alg.overlapTool.EleJetORT.UseSlidingDR = self.boostedLeptons
440 alg.overlapTool.EleJetORT.EnableUserPriority = self.enableUserPriority
441 alg.overlapTool.EleJetORT.OutputPassValue = True
442
443
444 if muons and jets and self.doMuJetOR:
445 config.addPrivateTool( 'overlapTool.MuJetORT',
446 'ORUtils::MuJetOverlapTool' )
447 alg.overlapTool.MuJetORT.InputLabel = inputLabel
448 alg.overlapTool.MuJetORT.OutputLabel = outputLabel
449 alg.overlapTool.MuJetORT.LinkOverlapObjects = self.linkOverlapObjects
450 alg.overlapTool.MuJetORT.BJetLabel = self.bJetLabel
451 alg.overlapTool.MuJetORT.InnerDR = self.InnerDR
452 alg.overlapTool.MuJetORT.OuterDR = self.OuterDR
453 alg.overlapTool.MuJetORT.UseSlidingDR = self.boostedLeptons
454 alg.overlapTool.MuJetORT.EnableUserPriority = self.enableUserPriority
455 alg.overlapTool.MuJetORT.OutputPassValue = True
456 alg.overlapTool.MuJetORT.AllowNoPV = self.allowNoPV
457
458
459 if taus and electrons and self.doTauEleOR:
460 config.addPrivateTool( 'overlapTool.TauEleORT',
461 'ORUtils::DeltaROverlapTool' )
462 alg.overlapTool.TauEleORT.InputLabel = inputLabel
463 alg.overlapTool.TauEleORT.OutputLabel = outputLabel
464 alg.overlapTool.TauEleORT.LinkOverlapObjects = self.linkOverlapObjects
465 alg.overlapTool.TauEleORT.DR = 0.2
466 alg.overlapTool.TauEleORT.OutputPassValue = True
467
468
469 if taus and muons and self.doTauMuOR:
470 config.addPrivateTool( 'overlapTool.TauMuORT',
471 'ORUtils::DeltaROverlapTool' )
472 alg.overlapTool.TauMuORT.InputLabel = inputLabel
473 alg.overlapTool.TauMuORT.OutputLabel = outputLabel
474 alg.overlapTool.TauMuORT.LinkOverlapObjects = self.linkOverlapObjects
475 alg.overlapTool.TauMuORT.DR = 0.2
476 alg.overlapTool.TauMuORT.OutputPassValue = True
477
478
479 if taus and jets and self.doTauJetOR:
480 if self.doTauAntiTauJetOR:
481 config.addPrivateTool( 'overlapTool.TauJetORT',
482 'ORUtils::TauAntiTauJetOverlapTool' )
483 alg.overlapTool.TauJetORT.TauLabel = self.antiTauIDTauLabel
484 alg.overlapTool.TauJetORT.AntiTauLabel = self.antiTauLabel
485 alg.overlapTool.TauJetORT.BJetLabel = self.antiTauBJetLabel
486 else:
487 config.addPrivateTool( 'overlapTool.TauJetORT',
488 'ORUtils::DeltaROverlapTool' )
489
490 alg.overlapTool.TauJetORT.InputLabel = inputLabel
491 alg.overlapTool.TauJetORT.OutputLabel = outputLabel
492 alg.overlapTool.TauJetORT.LinkOverlapObjects = self.linkOverlapObjects
493 alg.overlapTool.TauJetORT.DR = 0.2
494 alg.overlapTool.TauJetORT.EnableUserPriority = self.enableUserPriority
495 alg.overlapTool.TauJetORT.OutputPassValue = True
496
497
498 if photons and electrons and self.doPhEleOR:
499 config.addPrivateTool( 'overlapTool.PhoEleORT',
500 'ORUtils::DeltaROverlapTool' )
501 alg.overlapTool.PhoEleORT.InputLabel = inputLabel
502 alg.overlapTool.PhoEleORT.OutputLabel = outputLabel
503 alg.overlapTool.PhoEleORT.LinkOverlapObjects = self.linkOverlapObjects
504 alg.overlapTool.PhoEleORT.OutputPassValue = True
505 if self.favourPhotonOverLepton:
506 alg.overlapTool.PhoEleORT.SwapContainerPrecedence = True
507
508
509 if photons and muons and self.doPhMuOR:
510 config.addPrivateTool( 'overlapTool.PhoMuORT',
511 'ORUtils::DeltaROverlapTool' )
512 alg.overlapTool.PhoMuORT.InputLabel = inputLabel
513 alg.overlapTool.PhoMuORT.OutputLabel = outputLabel
514 alg.overlapTool.PhoMuORT.LinkOverlapObjects = self.linkOverlapObjects
515 alg.overlapTool.PhoMuORT.OutputPassValue = True
516 if self.favourPhotonOverLepton:
517 alg.overlapTool.PhoMuORT.SwapContainerPrecedence = True
518
519
520 if photons and jets and self.doPhJetOR:
521 config.addPrivateTool( 'overlapTool.PhoJetORT',
522 'ORUtils::DeltaROverlapTool' )
523 alg.overlapTool.PhoJetORT.InputLabel = inputLabel
524 alg.overlapTool.PhoJetORT.OutputLabel = outputLabel
525 alg.overlapTool.PhoJetORT.LinkOverlapObjects = self.linkOverlapObjects
526 alg.overlapTool.PhoJetORT.EnableUserPriority = self.enableUserPriority
527 alg.overlapTool.PhoJetORT.OutputPassValue = True
528
529
530 if electrons and fatJets and self.doEleFatJetOR:
531 config.addPrivateTool( 'overlapTool.EleFatJetORT',
532 'ORUtils::DeltaROverlapTool' )
533 alg.overlapTool.EleFatJetORT.InputLabel = inputLabel
534 alg.overlapTool.EleFatJetORT.OutputLabel = outputLabel
535 alg.overlapTool.EleFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
536 alg.overlapTool.EleFatJetORT.DR = 1.0
537 alg.overlapTool.EleFatJetORT.OutputPassValue = True
538
539
540 if jets and fatJets and self.doJetFatJetOR:
541 config.addPrivateTool( 'overlapTool.JetFatJetORT',
542 'ORUtils::DeltaROverlapTool' )
543 alg.overlapTool.JetFatJetORT.InputLabel = inputLabel
544 alg.overlapTool.JetFatJetORT.OutputLabel = outputLabel
545 alg.overlapTool.JetFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
546 alg.overlapTool.JetFatJetORT.DR = 1.0
547 alg.overlapTool.JetFatJetORT.OutputPassValue = True
548
549 if self.nominalOnly or self.nominalOnlyUnifiedSelection :
550 if electrons :
551 alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORElectronsCopyAlg')
552 alg.particles = electrons
553 alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
554 if muons :
555 alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORMuonsCopyAlg')
556 alg.particles = muons
557 alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
558 if taus :
559 alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORTausCopyAlg')
560 alg.particles = taus
561 alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
562 if jets :
563 alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORJetsCopyAlg')
564 alg.particles = jets
565 alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
566 if photons :
567 alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORPhotonsCopyAlg')
568 alg.particles = photons
569 alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
570 if fatJets :
571 alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORFatJetsCopyAlg')
572 alg.particles = fatJets
573 alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
574
575
576 if self.addPreselection:
577 if self.preselectLabel is not None :
578 preselectLabel = self.preselectLabel
579 else :
580 preselectLabel = outputLabel
581
582 if electrons :
583 alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORElectronsPreselectionAlg')
584 alg.particles = electrons
585 alg.preselection =
'&&'.join (config.getPreselection (self.electrons.
split(
'.')[0], electronsSelectionName, asList=
True)
586 + [outputLabel + '_%SYS%,as_char'])
587 alg.selectionDecoration = preselectLabel
588 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or', writeToOutput=
False)
589 if muons :
590 alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORMuonsPreselectionAlg')
591 alg.particles = muons
592 alg.preselection =
'&&'.join (config.getPreselection (self.muons.
split(
'.')[0], muonsSelectionName, asList=
True)
593 + [outputLabel + '_%SYS%,as_char'])
594 alg.selectionDecoration = preselectLabel
595 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or', writeToOutput=
False)
596 if taus :
597 alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORTausPreselectionAlg')
598 alg.particles = taus
599 alg.preselection =
'&&'.join (config.getPreselection (self.taus.
split(
'.')[0], tausSelectionName, asList=
True)
600 + [outputLabel + '_%SYS%,as_char'])
601 alg.selectionDecoration = preselectLabel
602 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or', writeToOutput=
False)
603 if jets :
604 alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORJetsPreselectionAlg')
605 alg.particles = jets
606 alg.preselection =
'&&'.join (config.getPreselection (self.jets.
split(
'.')[0], jetsSelectionName, asList=
True)
607 + [outputLabel + '_%SYS%,as_char'])
608 alg.selectionDecoration = preselectLabel
609 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or', writeToOutput=
False)
610 if photons :
611 alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORPhotonsPreselectionAlg')
612 alg.particles = photons
613 alg.preselection =
'&&'.join (config.getPreselection (self.photons.
split(
'.')[0], photonsSelectionName, asList=
True)
614 + [outputLabel + '_%SYS%,as_char'])
615 alg.selectionDecoration = preselectLabel
616 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or', writeToOutput=
False)
617 if fatJets :
618 alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORFatJetsPreselectionAlg')
619 alg.particles = fatJets
620 alg.preselection =
'&&'.join (config.getPreselection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, asList=
True)
621 + [outputLabel + '_%SYS%,as_char'])
622 alg.selectionDecoration = preselectLabel
623 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or', writeToOutput=
False)
624
625
std::vector< std::string > split(const std::string &s, const std::string &t=":")