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