4 from AnalysisAlgorithmsConfig.ConfigBlock
import ConfigBlock
8 """the ConfigBlock for the OverlapRemoval configuration"""
11 super (OverlapAnalysisConfig, self).__init__ ()
12 self.setBlockName(
'OverlapRemoval')
13 self.addOption (
'inputLabel',
'', type=str,
14 info=
"any possible label used to pick up the selected objects with. This should not be a label already used elsewhere, e.g. preselectOR.")
15 self.addOption (
'outputLabel',
'passesOR', type=str,
16 info=
"decoration applied (internally) to the output objects, e.g. passesOR.")
17 self.addOption (
'selectionName',
None, type=str,
18 info=
"name of the common selection to which to append the OR decision, needed to distinguish between the various overlap removal strategies that may be set up. The default is '' (empty string), which applies the OR decision to the entire input containers.")
19 self.addOption (
'linkOverlapObjects',
False, type=bool,
20 info=
"whether to set up an element link between overlapping objects. The default is False.")
21 self.addOption (
'enableUserPriority',
False, type=bool,
22 info=
"whether to use the user's custom priority ranking, instead of the recommended one. If set to True, will respect the priorities set with inputLabel (e.g. in SUSYTools, every object gets priority 2, but pre-selected jets get priority 1). The default is False.")
23 self.addOption (
'bJetLabel',
'', type=str,
24 info=
"flag to select b-jets with. If left empty, no b-jets are used in the overlap removal. The default is '' (empty string).")
25 self.addOption (
'InnerDR', 0.2, type=float,
26 info=
"radius of the inner cone for removing jets. The default is 0.2.")
27 self.addOption (
'OuterDR', 0.4, type=float,
28 info=
"radius of the outer cone for removing leptons. The default is 0.4.")
29 self.addOption (
'boostedLeptons',
False, type=bool,
30 info=
"whether to enable boosted lepton overlap removal (toggles on the property UseSlidingDR of the ORUtils::EleJetOverlapTool and ORUtils::MuJetOverlapTool tools). The default is False.")
31 self.addOption (
'nominalOnly',
False, type=bool,
32 info=
"(experimental) toggle off the running of overlap removal on systematically-varied objects (instead, copy from nominal). The default is False.")
33 self.addOption (
'nominalOnlyUnifiedSelection',
False, type=bool,
34 info=
"(experimental) toggle off the running of overlap removal on systematically-varied objects (instead, copy from nominal), but consider the union of all systematically-varied object selections (not just nominal). The default is False.")
35 self.addOption (
'jets',
"", type=str,
36 info=
"the input jet container.")
37 self.addOption (
'fatJets',
"", type=str,
38 info=
"the input large-R jet container.")
39 self.addOption (
'electrons',
"", type=str,
40 info=
"the input electron container.")
41 self.addOption (
'muons',
"", type=str,
42 info=
"the input muon container.")
43 self.addOption (
'photons',
"", type=str,
44 info=
"the input photon container.")
45 self.addOption (
'taus',
"", type=str,
46 info=
"the input tau-jet container.")
47 self.addOption (
'antiTauIDTauLabel',
'', type=str,
48 info=
"flag to select the ID tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
49 self.addOption (
'antiTauLabel',
'', type=str,
50 info=
"flag to select the anti-tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
51 self.addOption (
'antiTauBJetLabel',
'', type=str,
52 info=
"flag to select b-jets for the tau-antitau-jet overlap removal. The default is '' (empty string).")
53 self.addOption (
'addToAllSelections',
None, type=bool,
54 info=
"add OR selection decision into all object selections. For most users, this should only be set to 'True' if there is only one Overlap Removal setup, and to 'False' otherwise. If set to 'None', this is handled automatically.")
55 self.addOption (
'addPreselection',
None, type=bool,
56 info=
"add preselection decorations without systematics. If set To 'None', will be turned on in case of multiple Overlap Removal setups.")
57 self.addOption (
'preselectLabel',
None, type=str,
58 info=
"label for preselection decorations")
59 self.addOption (
'jetsSelectionName',
None, type=str,
60 info=
"a possible selection on the jet container.")
61 self.addOption (
'fatJetsSelectionName',
None, type=str,
62 info=
"a possible selection on the large-R jet container.")
63 self.addOption (
'electronsSelectionName',
None, type=str,
64 info=
"a possible selection on the electron container.")
65 self.addOption (
'muonsSelectionName',
None, type=str,
66 info=
"a possible selection on the muon container.")
67 self.addOption (
'photonsSelectionName',
None, type=str,
68 info=
"a possible selection on the photon container.")
69 self.addOption (
'tausSelectionName',
None, type=str,
70 info=
"a possible selection on the tau-jet container.")
71 self.addOption (
'doEleEleOR',
False, type=bool,
72 info=
"whether to perform the overlap removal amongst electrons. The default is False.")
73 self.addOption (
'doEleMuOR',
True, type=bool,
74 info=
"whether to perform the overlap removal between electrons and muons. The default is True.")
75 self.addOption (
'doEleJetOR',
True, type=bool,
76 info=
"whether to perform the overlap removal between electrons and jets. The default is True.")
77 self.addOption (
'doMuJetOR',
True, type=bool,
78 info=
"whether to perform the overlap removal between muons and jets. The default is True.")
79 self.addOption (
'doTauEleOR',
True, type=bool,
80 info=
"whether to perform the overlap removal between tau-jets and electrons. The default is True.")
81 self.addOption (
'doTauMuOR',
True, type=bool,
82 info=
"whether to perform the overlap removal between tau-jets and muons. The default is True.")
83 self.addOption (
'doTauJetOR',
True, type=bool,
84 info=
"whether to perform the overlap removal between tau-jets and jets. The default is True.")
85 self.addOption (
'doTauAntiTauJetOR',
False, type=bool,
86 info=
"whether to perform the overlap removal between tau-jets and anti-tau-jets. The default is False.")
87 self.addOption (
'doPhEleOR',
True, type=bool,
88 info=
"whether to perform the overlap removal between photons and electrons. The default is True.")
89 self.addOption (
'doPhMuOR',
True, type=bool,
90 info=
"whether to perform the overlap removal between photons and muons. The default is True.")
91 self.addOption (
'doPhJetOR',
True, type=bool,
92 info=
"whether to perform the overlap removal between photons and jets. The default is True.")
93 self.addOption (
'doEleFatJetOR',
True, type=bool,
94 info=
"whether to perform the overlap removal between electrons and large-R jets. The default is True.")
95 self.addOption (
'doJetFatJetOR',
True, type=bool,
96 info=
"whether to perform the overlap removal between jets and large-R jets. The default is True.")
97 self.addOption (
'favourPhotonOverLepton',
False, type=bool,
98 info=
"whether to give priority to photons in OR. The default is False.")
101 """Return the instance name for this block"""
102 if self.selectionName
is not None:
103 return self.selectionName
104 return self.outputLabel
108 Create a new selection for the inputCollection ('container.selection')
109 that is the union over all systematics of 'selection'. This allows us
110 to run nominal-only overlap removal while taking into account the impact
111 of systematics on object acceptance.
113 container, selection = config.readNameAndSelection( inputCollection )
114 alg = config.createAlgorithm(
'CP::AsgUnionSelectionAlg',
'UnionSelectionAlgForOR_' + inputCollection.split(
".")[0] )
115 alg.preselection = selection
116 alg.particles = container
117 alg.selectionDecoration =
'unifiedSelectForOR'
129 numORblocks = OverlapAnalysisConfig.get_instance_count()
141 if self.selectionName
is not None:
142 selectionName = self.selectionName
143 outputLabel = self.outputLabel +
'_' + selectionName
144 inputLabel = self.inputLabel +
'_' + selectionName
145 select_or_decoration =
'select_or_' + self.selectionName
149 select_or_decoration =
'select_or'
151 selectionName = self.outputLabel
152 select_or_decoration =
'select_' + self.outputLabel
153 outputLabel = self.outputLabel
154 inputLabel = self.inputLabel
161 if self.jetsSelectionName
is not None:
162 jetsSelectionName = self.jetsSelectionName
165 jetsSelectionName = self.jets.
split(
".")[1]
167 jetsSelectionName = selectionName
168 if self.fatJetsSelectionName
is not None:
169 fatJetsSelectionName = self.fatJetsSelectionName
172 fatJetsSelectionName = self.fatJets.
split(
".")[1]
174 fatJetsSelectionName = selectionName
175 if self.electronsSelectionName
is not None:
176 electronsSelectionName = self.electronsSelectionName
179 electronsSelectionName = self.electrons.
split(
".")[1]
181 electronsSelectionName = selectionName
182 if self.muonsSelectionName
is not None:
183 muonsSelectionName = self.muonsSelectionName
186 muonsSelectionName = self.muons.
split(
".")[1]
188 muonsSelectionName = selectionName
189 if self.photonsSelectionName
is not None:
190 photonsSelectionName = self.photonsSelectionName
193 photonsSelectionName = self.photons.
split(
".")[1]
195 photonsSelectionName = selectionName
196 if self.tausSelectionName
is not None:
197 tausSelectionName = self.tausSelectionName
200 tausSelectionName = self.taus.
split(
".")[1]
202 tausSelectionName = selectionName
215 if self.electrons !=
"" :
216 if self.nominalOnlyUnifiedSelection:
218 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORElectronsSelectAlg' )
219 electrons, alg.preselection = config.readNameAndSelection (self.electrons)
220 alg.particles = electrons
221 alg.selectionDecoration = inputLabel +
',as_char'
223 config.addOutputVar (self.electrons.
split(
'.')[0],
224 outputLabel +
'_%SYS%',
225 select_or_decoration,
226 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
228 if self.nominalOnlyUnifiedSelection:
229 alg.preselection =
'unifiedSelectForOR'
232 if self.photons !=
"" :
233 if self.nominalOnlyUnifiedSelection:
235 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORPhotonsSelectAlg' )
236 photons, alg.preselection = config.readNameAndSelection (self.photons)
237 alg.particles = photons
238 alg.selectionDecoration = inputLabel +
',as_char'
239 config.addOutputVar (self.photons.
split(
'.')[0],
240 outputLabel +
'_%SYS%',
241 select_or_decoration,
242 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
244 if self.nominalOnlyUnifiedSelection:
245 alg.preselection =
'unifiedSelectForOR'
248 if self.muons !=
"" :
249 if self.nominalOnlyUnifiedSelection:
251 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORMuonsSelectAlg' )
252 muons, alg.preselection = config.readNameAndSelection (self.muons)
253 alg.particles = muons
254 alg.selectionDecoration = inputLabel +
',as_char'
255 config.addOutputVar (self.muons.
split(
'.')[0],
256 outputLabel +
'_%SYS%',
257 select_or_decoration,
258 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
260 if self.nominalOnlyUnifiedSelection:
261 alg.preselection =
'unifiedSelectForOR'
265 if self.nominalOnlyUnifiedSelection:
267 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORTausSelectAlg' )
268 taus, alg.preselection = config.readNameAndSelection (self.taus)
270 alg.selectionDecoration = inputLabel +
',as_char'
271 config.addOutputVar (self.taus.
split(
'.')[0],
272 outputLabel +
'_%SYS%',
273 select_or_decoration,
274 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
276 if self.nominalOnlyUnifiedSelection:
277 alg.preselection =
'unifiedSelectForOR'
281 if self.nominalOnlyUnifiedSelection:
283 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORJetsSelectAlg' )
284 jets, alg.preselection = config.readNameAndSelection (self.jets)
286 alg.selectionDecoration = inputLabel +
',as_char'
287 config.addOutputVar (self.jets.
split(
'.')[0],
288 outputLabel +
'_%SYS%',
289 select_or_decoration,
290 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
292 if self.nominalOnlyUnifiedSelection:
293 alg.preselection =
'unifiedSelectForOR'
296 if self.fatJets !=
"" :
297 if self.nominalOnlyUnifiedSelection:
299 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORFatJetsSelectAlg' )
300 fatJets, alg.preselection = config.readNameAndSelection (self.fatJets)
301 alg.particles = fatJets
302 alg.selectionDecoration = inputLabel +
',as_char'
303 config.addOutputVar (self.fatJets.
split(
'.')[0],
304 outputLabel +
'_%SYS%',
305 select_or_decoration,
306 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
308 if self.nominalOnlyUnifiedSelection:
309 alg.preselection =
'unifiedSelectForOR'
313 alg = config.createAlgorithm(
'CP::OverlapRemovalAlg',
'OverlapRemovalAlg' )
314 alg.OutputLabel = outputLabel
315 if self.nominalOnly
or self.nominalOnlyUnifiedSelection :
316 alg.affectingSystematicsFilter =
'.*'
318 alg.electrons = electrons
319 alg.electronsDecoration = outputLabel +
'_%SYS%,as_char'
320 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.electronsDecoration, preselection=
False, comesFrom=
'or')
323 alg.muonsDecoration = outputLabel +
'_%SYS%,as_char'
324 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.muonsDecoration, preselection=
False, comesFrom=
'or')
327 alg.tausDecoration = outputLabel +
'_%SYS%,as_char'
328 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.tausDecoration, preselection=
False, comesFrom=
'or')
331 alg.jetsDecoration = outputLabel +
'_%SYS%,as_char'
332 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.jetsDecoration, preselection=
False, comesFrom=
'or')
334 alg.photons = photons
335 alg.photonsDecoration = outputLabel +
'_%SYS%,as_char'
336 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.photonsDecoration, preselection=
False, comesFrom=
'or')
338 alg.fatJets = fatJets
339 alg.fatJetsDecoration = outputLabel +
'_%SYS%,as_char'
340 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.fatJetsDecoration, preselection=
False, comesFrom=
'or')
343 config.addPrivateTool(
'overlapTool',
'ORUtils::OverlapRemovalTool' )
344 alg.overlapTool.InputLabel = inputLabel
345 alg.overlapTool.OutputLabel = outputLabel
352 alg.overlapTool.OutputPassValue =
True
355 if electrons
and self.doEleEleOR:
356 config.addPrivateTool(
'overlapTool.EleEleORT',
357 'ORUtils::EleEleOverlapTool' )
358 alg.overlapTool.EleEleORT.InputLabel = inputLabel
359 alg.overlapTool.EleEleORT.OutputLabel = outputLabel
360 alg.overlapTool.EleEleORT.LinkOverlapObjects = self.linkOverlapObjects
361 alg.overlapTool.EleEleORT.OutputPassValue =
True
364 if electrons
and muons
and self.doEleMuOR:
365 config.addPrivateTool(
'overlapTool.EleMuORT',
366 'ORUtils::EleMuSharedTrkOverlapTool' )
367 alg.overlapTool.EleMuORT.InputLabel = inputLabel
368 alg.overlapTool.EleMuORT.OutputLabel = outputLabel
369 alg.overlapTool.EleMuORT.LinkOverlapObjects = self.linkOverlapObjects
370 alg.overlapTool.EleMuORT.OutputPassValue =
True
373 if electrons
and jets
and self.doEleJetOR:
374 config.addPrivateTool(
'overlapTool.EleJetORT',
375 'ORUtils::EleJetOverlapTool' )
376 alg.overlapTool.EleJetORT.InputLabel = inputLabel
377 alg.overlapTool.EleJetORT.OutputLabel = outputLabel
378 alg.overlapTool.EleJetORT.LinkOverlapObjects = self.linkOverlapObjects
379 alg.overlapTool.EleJetORT.BJetLabel = self.bJetLabel
380 alg.overlapTool.EleJetORT.InnerDR = self.InnerDR
381 alg.overlapTool.EleJetORT.OuterDR = self.OuterDR
382 alg.overlapTool.EleJetORT.UseSlidingDR = self.boostedLeptons
383 alg.overlapTool.EleJetORT.EnableUserPriority = self.enableUserPriority
384 alg.overlapTool.EleJetORT.OutputPassValue =
True
387 if muons
and jets
and self.doMuJetOR:
388 config.addPrivateTool(
'overlapTool.MuJetORT',
389 'ORUtils::MuJetOverlapTool' )
390 alg.overlapTool.MuJetORT.InputLabel = inputLabel
391 alg.overlapTool.MuJetORT.OutputLabel = outputLabel
392 alg.overlapTool.MuJetORT.LinkOverlapObjects = self.linkOverlapObjects
393 alg.overlapTool.MuJetORT.BJetLabel = self.bJetLabel
394 alg.overlapTool.MuJetORT.InnerDR = self.InnerDR
395 alg.overlapTool.MuJetORT.OuterDR = self.OuterDR
396 alg.overlapTool.MuJetORT.UseSlidingDR = self.boostedLeptons
397 alg.overlapTool.MuJetORT.EnableUserPriority = self.enableUserPriority
398 alg.overlapTool.MuJetORT.OutputPassValue =
True
401 if taus
and electrons
and self.doTauEleOR:
402 config.addPrivateTool(
'overlapTool.TauEleORT',
403 'ORUtils::DeltaROverlapTool' )
404 alg.overlapTool.TauEleORT.InputLabel = inputLabel
405 alg.overlapTool.TauEleORT.OutputLabel = outputLabel
406 alg.overlapTool.TauEleORT.LinkOverlapObjects = self.linkOverlapObjects
407 alg.overlapTool.TauEleORT.DR = 0.2
408 alg.overlapTool.TauEleORT.OutputPassValue =
True
411 if taus
and muons
and self.doTauMuOR:
412 config.addPrivateTool(
'overlapTool.TauMuORT',
413 'ORUtils::DeltaROverlapTool' )
414 alg.overlapTool.TauMuORT.InputLabel = inputLabel
415 alg.overlapTool.TauMuORT.OutputLabel = outputLabel
416 alg.overlapTool.TauMuORT.LinkOverlapObjects = self.linkOverlapObjects
417 alg.overlapTool.TauMuORT.DR = 0.2
418 alg.overlapTool.TauMuORT.OutputPassValue =
True
421 if taus
and jets
and self.doTauJetOR:
422 if self.doTauAntiTauJetOR:
423 config.addPrivateTool(
'overlapTool.TauJetORT',
424 'ORUtils::TauAntiTauJetOverlapTool' )
425 alg.overlapTool.TauJetORT.TauLabel = self.antiTauIDTauLabel
426 alg.overlapTool.TauJetORT.AntiTauLabel = self.antiTauLabel
427 alg.overlapTool.TauJetORT.BJetLabel = self.antiTauBJetLabel
429 config.addPrivateTool(
'overlapTool.TauJetORT',
430 'ORUtils::DeltaROverlapTool' )
432 alg.overlapTool.TauJetORT.InputLabel = inputLabel
433 alg.overlapTool.TauJetORT.OutputLabel = outputLabel
434 alg.overlapTool.TauJetORT.LinkOverlapObjects = self.linkOverlapObjects
435 alg.overlapTool.TauJetORT.DR = 0.2
436 alg.overlapTool.TauJetORT.EnableUserPriority = self.enableUserPriority
437 alg.overlapTool.TauJetORT.OutputPassValue =
True
440 if photons
and electrons
and self.doPhEleOR:
441 config.addPrivateTool(
'overlapTool.PhoEleORT',
442 'ORUtils::DeltaROverlapTool' )
443 alg.overlapTool.PhoEleORT.InputLabel = inputLabel
444 alg.overlapTool.PhoEleORT.OutputLabel = outputLabel
445 alg.overlapTool.PhoEleORT.LinkOverlapObjects = self.linkOverlapObjects
446 alg.overlapTool.PhoEleORT.OutputPassValue =
True
447 if self.favourPhotonOverLepton:
448 alg.overlapTool.PhoEleORT.SwapContainerPrecedence =
True
451 if photons
and muons
and self.doPhMuOR:
452 config.addPrivateTool(
'overlapTool.PhoMuORT',
453 'ORUtils::DeltaROverlapTool' )
454 alg.overlapTool.PhoMuORT.InputLabel = inputLabel
455 alg.overlapTool.PhoMuORT.OutputLabel = outputLabel
456 alg.overlapTool.PhoMuORT.LinkOverlapObjects = self.linkOverlapObjects
457 alg.overlapTool.PhoMuORT.OutputPassValue =
True
458 if self.favourPhotonOverLepton:
459 alg.overlapTool.PhoMuORT.SwapContainerPrecedence =
True
462 if photons
and jets
and self.doPhJetOR:
463 config.addPrivateTool(
'overlapTool.PhoJetORT',
464 'ORUtils::DeltaROverlapTool' )
465 alg.overlapTool.PhoJetORT.InputLabel = inputLabel
466 alg.overlapTool.PhoJetORT.OutputLabel = outputLabel
467 alg.overlapTool.PhoJetORT.LinkOverlapObjects = self.linkOverlapObjects
468 alg.overlapTool.PhoJetORT.EnableUserPriority = self.enableUserPriority
469 alg.overlapTool.PhoJetORT.OutputPassValue =
True
472 if electrons
and fatJets
and self.doEleFatJetOR:
473 config.addPrivateTool(
'overlapTool.EleFatJetORT',
474 'ORUtils::DeltaROverlapTool' )
475 alg.overlapTool.EleFatJetORT.InputLabel = inputLabel
476 alg.overlapTool.EleFatJetORT.OutputLabel = outputLabel
477 alg.overlapTool.EleFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
478 alg.overlapTool.EleFatJetORT.DR = 1.0
479 alg.overlapTool.EleFatJetORT.OutputPassValue =
True
482 if jets
and fatJets
and self.doJetFatJetOR:
483 config.addPrivateTool(
'overlapTool.JetFatJetORT',
484 'ORUtils::DeltaROverlapTool' )
485 alg.overlapTool.JetFatJetORT.InputLabel = inputLabel
486 alg.overlapTool.JetFatJetORT.OutputLabel = outputLabel
487 alg.overlapTool.JetFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
488 alg.overlapTool.JetFatJetORT.DR = 1.0
489 alg.overlapTool.JetFatJetORT.OutputPassValue =
True
491 if self.nominalOnly
or self.nominalOnlyUnifiedSelection :
493 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORElectronsCopyAlg')
494 alg.particles = electrons
495 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
497 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORMuonsCopyAlg')
498 alg.particles = muons
499 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
501 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORTausCopyAlg')
503 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
505 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORJetsCopyAlg')
507 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
509 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORPhotonsCopyAlg')
510 alg.particles = photons
511 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
513 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORFatJetsCopyAlg')
514 alg.particles = fatJets
515 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
519 if self.preselectLabel
is not None :
520 preselectLabel = self.preselectLabel
522 preselectLabel = outputLabel
525 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORElectronsPreselectionAlg')
526 alg.particles = electrons
527 alg.preselection =
'&&'.join (config.getPreselection (self.electrons.
split(
'.')[0], electronsSelectionName, asList=
True)
528 + [outputLabel +
'_%SYS%,as_char'])
529 alg.selectionDecoration = preselectLabel
530 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
532 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORMuonsPreselectionAlg')
533 alg.particles = muons
534 alg.preselection =
'&&'.join (config.getPreselection (self.muons.
split(
'.')[0], muonsSelectionName, asList=
True)
535 + [outputLabel +
'_%SYS%,as_char'])
536 alg.selectionDecoration = preselectLabel
537 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
539 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORTausPreselectionAlg')
541 alg.preselection =
'&&'.join (config.getPreselection (self.taus.
split(
'.')[0], tausSelectionName, asList=
True)
542 + [outputLabel +
'_%SYS%,as_char'])
543 alg.selectionDecoration = preselectLabel
544 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
546 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORJetsPreselectionAlg')
548 alg.preselection =
'&&'.join (config.getPreselection (self.jets.
split(
'.')[0], jetsSelectionName, asList=
True)
549 + [outputLabel +
'_%SYS%,as_char'])
550 alg.selectionDecoration = preselectLabel
551 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
553 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORPhotonsPreselectionAlg')
554 alg.particles = photons
555 alg.preselection =
'&&'.join (config.getPreselection (self.photons.
split(
'.')[0], photonsSelectionName, asList=
True)
556 + [outputLabel +
'_%SYS%,as_char'])
557 alg.selectionDecoration = preselectLabel
558 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
560 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORFatJetsPreselectionAlg')
561 alg.particles = fatJets
562 alg.preselection =
'&&'.join (config.getPreselection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, asList=
True)
563 + [outputLabel +
'_%SYS%,as_char'])
564 alg.selectionDecoration = preselectLabel
565 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')