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.",
34 self.addOption (
'nominalOnlyUnifiedSelection',
False, type=bool,
35 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.",
37 self.addOption (
'jets',
"", type=str,
38 info=
"the input jet container.")
39 self.addOption (
'fatJets',
"", type=str,
40 info=
"the input large-R jet container.")
41 self.addOption (
'electrons',
"", type=str,
42 info=
"the input electron container.")
43 self.addOption (
'muons',
"", type=str,
44 info=
"the input muon container.")
45 self.addOption (
'photons',
"", type=str,
46 info=
"the input photon container.")
47 self.addOption (
'taus',
"", type=str,
48 info=
"the input tau-jet container.")
49 self.addOption (
'antiTauIDTauLabel',
'', type=str,
50 info=
"flag to select the ID tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
51 self.addOption (
'antiTauLabel',
'', type=str,
52 info=
"flag to select the anti-tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
53 self.addOption (
'antiTauBJetLabel',
'', type=str,
54 info=
"flag to select b-jets for the tau-antitau-jet overlap removal. The default is '' (empty string).")
55 self.addOption (
'addToAllSelections',
None, type=bool,
56 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.")
57 self.addOption (
'addPreselection',
None, type=bool,
58 info=
"add preselection decorations without systematics. If set To 'None', will be turned on in case of multiple Overlap Removal setups.")
59 self.addOption (
'preselectLabel',
None, type=str,
60 info=
"label for preselection decorations")
61 self.addOption (
'jetsSelectionName',
None, type=str,
62 info=
"a possible selection on the jet container.")
63 self.addOption (
'fatJetsSelectionName',
None, type=str,
64 info=
"a possible selection on the large-R jet container.")
65 self.addOption (
'electronsSelectionName',
None, type=str,
66 info=
"a possible selection on the electron container.")
67 self.addOption (
'muonsSelectionName',
None, type=str,
68 info=
"a possible selection on the muon container.")
69 self.addOption (
'photonsSelectionName',
None, type=str,
70 info=
"a possible selection on the photon container.")
71 self.addOption (
'tausSelectionName',
None, type=str,
72 info=
"a possible selection on the tau-jet container.")
73 self.addOption (
'doEleEleOR',
False, type=bool,
74 info=
"whether to perform the overlap removal amongst electrons. The default is False.")
75 self.addOption (
'doEleMuOR',
True, type=bool,
76 info=
"whether to perform the overlap removal between electrons and muons. The default is True.")
77 self.addOption (
'doEleJetOR',
True, type=bool,
78 info=
"whether to perform the overlap removal between electrons and jets. The default is True.")
79 self.addOption (
'doMuJetOR',
True, type=bool,
80 info=
"whether to perform the overlap removal between muons and jets. The default is True.")
81 self.addOption (
'doTauEleOR',
True, type=bool,
82 info=
"whether to perform the overlap removal between tau-jets and electrons. The default is True.")
83 self.addOption (
'doTauMuOR',
True, type=bool,
84 info=
"whether to perform the overlap removal between tau-jets and muons. The default is True.")
85 self.addOption (
'doTauJetOR',
True, type=bool,
86 info=
"whether to perform the overlap removal between tau-jets and jets. The default is True.")
87 self.addOption (
'doTauAntiTauJetOR',
False, type=bool,
88 info=
"whether to perform the overlap removal between tau-jets and anti-tau-jets. The default is False.")
89 self.addOption (
'doPhEleOR',
True, type=bool,
90 info=
"whether to perform the overlap removal between photons and electrons. The default is True.")
91 self.addOption (
'doPhMuOR',
True, type=bool,
92 info=
"whether to perform the overlap removal between photons and muons. The default is True.")
93 self.addOption (
'doPhJetOR',
True, type=bool,
94 info=
"whether to perform the overlap removal between photons and jets. The default is True.")
95 self.addOption (
'doEleFatJetOR',
True, type=bool,
96 info=
"whether to perform the overlap removal between electrons and large-R jets. The default is True.")
97 self.addOption (
'doJetFatJetOR',
True, type=bool,
98 info=
"whether to perform the overlap removal between jets and large-R jets. The default is True.")
99 self.addOption (
'favourPhotonOverLepton',
False, type=bool,
100 info=
"whether to give priority to photons in OR. The default is False.")
103 """Return the instance name for this block"""
104 if self.selectionName
is not None:
105 return self.selectionName
106 return self.outputLabel
110 Create a new selection for the inputCollection ('container.selection')
111 that is the union over all systematics of 'selection'. This allows us
112 to run nominal-only overlap removal while taking into account the impact
113 of systematics on object acceptance.
115 container, selection = config.readNameAndSelection( inputCollection )
116 alg = config.createAlgorithm(
'CP::AsgUnionSelectionAlg',
'UnionSelectionAlgForOR_' + inputCollection.split(
".")[0] )
117 alg.preselection = selection
118 alg.particles = container
119 alg.selectionDecoration =
'unifiedSelectForOR'
131 numORblocks = OverlapAnalysisConfig.get_instance_count()
143 if self.selectionName
is not None:
144 selectionName = self.selectionName
145 outputLabel = self.outputLabel +
'_' + selectionName
146 inputLabel = self.inputLabel +
'_' + selectionName
147 select_or_decoration =
'select_or_' + self.selectionName
151 select_or_decoration =
'select_or'
153 selectionName = self.outputLabel
154 select_or_decoration =
'select_' + self.outputLabel
155 outputLabel = self.outputLabel
156 inputLabel = self.inputLabel
163 if self.jetsSelectionName
is not None:
164 jetsSelectionName = self.jetsSelectionName
167 jetsSelectionName = self.jets.
split(
".")[1]
169 jetsSelectionName = selectionName
170 if self.fatJetsSelectionName
is not None:
171 fatJetsSelectionName = self.fatJetsSelectionName
174 fatJetsSelectionName = self.fatJets.
split(
".")[1]
176 fatJetsSelectionName = selectionName
177 if self.electronsSelectionName
is not None:
178 electronsSelectionName = self.electronsSelectionName
181 electronsSelectionName = self.electrons.
split(
".")[1]
183 electronsSelectionName = selectionName
184 if self.muonsSelectionName
is not None:
185 muonsSelectionName = self.muonsSelectionName
188 muonsSelectionName = self.muons.
split(
".")[1]
190 muonsSelectionName = selectionName
191 if self.photonsSelectionName
is not None:
192 photonsSelectionName = self.photonsSelectionName
195 photonsSelectionName = self.photons.
split(
".")[1]
197 photonsSelectionName = selectionName
198 if self.tausSelectionName
is not None:
199 tausSelectionName = self.tausSelectionName
202 tausSelectionName = self.taus.
split(
".")[1]
204 tausSelectionName = selectionName
217 if self.electrons !=
"" :
218 if self.nominalOnlyUnifiedSelection:
220 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORElectronsSelectAlg' )
221 electrons, alg.preselection = config.readNameAndSelection (self.electrons)
222 alg.particles = electrons
223 alg.selectionDecoration = inputLabel +
',as_char'
225 config.addOutputVar (self.electrons.
split(
'.')[0],
226 outputLabel +
'_%SYS%',
227 select_or_decoration,
228 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
230 if self.nominalOnlyUnifiedSelection:
231 alg.preselection =
'unifiedSelectForOR'
234 if self.photons !=
"" :
235 if self.nominalOnlyUnifiedSelection:
237 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORPhotonsSelectAlg' )
238 photons, alg.preselection = config.readNameAndSelection (self.photons)
239 alg.particles = photons
240 alg.selectionDecoration = inputLabel +
',as_char'
241 config.addOutputVar (self.photons.
split(
'.')[0],
242 outputLabel +
'_%SYS%',
243 select_or_decoration,
244 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
246 if self.nominalOnlyUnifiedSelection:
247 alg.preselection =
'unifiedSelectForOR'
250 if self.muons !=
"" :
251 if self.nominalOnlyUnifiedSelection:
253 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORMuonsSelectAlg' )
254 muons, alg.preselection = config.readNameAndSelection (self.muons)
255 alg.particles = muons
256 alg.selectionDecoration = inputLabel +
',as_char'
257 config.addOutputVar (self.muons.
split(
'.')[0],
258 outputLabel +
'_%SYS%',
259 select_or_decoration,
260 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
262 if self.nominalOnlyUnifiedSelection:
263 alg.preselection =
'unifiedSelectForOR'
267 if self.nominalOnlyUnifiedSelection:
269 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORTausSelectAlg' )
270 taus, alg.preselection = config.readNameAndSelection (self.taus)
272 alg.selectionDecoration = inputLabel +
',as_char'
273 config.addOutputVar (self.taus.
split(
'.')[0],
274 outputLabel +
'_%SYS%',
275 select_or_decoration,
276 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
278 if self.nominalOnlyUnifiedSelection:
279 alg.preselection =
'unifiedSelectForOR'
283 if self.nominalOnlyUnifiedSelection:
285 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORJetsSelectAlg' )
286 jets, alg.preselection = config.readNameAndSelection (self.jets)
288 alg.selectionDecoration = inputLabel +
',as_char'
289 config.addOutputVar (self.jets.
split(
'.')[0],
290 outputLabel +
'_%SYS%',
291 select_or_decoration,
292 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
294 if self.nominalOnlyUnifiedSelection:
295 alg.preselection =
'unifiedSelectForOR'
298 if self.fatJets !=
"" :
299 if self.nominalOnlyUnifiedSelection:
301 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORFatJetsSelectAlg' )
302 fatJets, alg.preselection = config.readNameAndSelection (self.fatJets)
303 alg.particles = fatJets
304 alg.selectionDecoration = inputLabel +
',as_char'
305 config.addOutputVar (self.fatJets.
split(
'.')[0],
306 outputLabel +
'_%SYS%',
307 select_or_decoration,
308 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection,
310 if self.nominalOnlyUnifiedSelection:
311 alg.preselection =
'unifiedSelectForOR'
315 alg = config.createAlgorithm(
'CP::OverlapRemovalAlg',
'OverlapRemovalAlg' )
316 alg.OutputLabel = outputLabel
317 if self.nominalOnly
or self.nominalOnlyUnifiedSelection :
318 alg.affectingSystematicsFilter =
'.*'
320 alg.electrons = electrons
321 alg.electronsDecoration = outputLabel +
'_%SYS%,as_char'
322 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.electronsDecoration, preselection=
False, comesFrom=
'or')
325 alg.muonsDecoration = outputLabel +
'_%SYS%,as_char'
326 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.muonsDecoration, preselection=
False, comesFrom=
'or')
329 alg.tausDecoration = outputLabel +
'_%SYS%,as_char'
330 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.tausDecoration, preselection=
False, comesFrom=
'or')
333 alg.jetsDecoration = outputLabel +
'_%SYS%,as_char'
334 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.jetsDecoration, preselection=
False, comesFrom=
'or')
336 alg.photons = photons
337 alg.photonsDecoration = outputLabel +
'_%SYS%,as_char'
338 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.photonsDecoration, preselection=
False, comesFrom=
'or')
340 alg.fatJets = fatJets
341 alg.fatJetsDecoration = outputLabel +
'_%SYS%,as_char'
342 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.fatJetsDecoration, preselection=
False, comesFrom=
'or')
345 config.addPrivateTool(
'overlapTool',
'ORUtils::OverlapRemovalTool' )
346 alg.overlapTool.InputLabel = inputLabel
347 alg.overlapTool.OutputLabel = outputLabel
354 alg.overlapTool.OutputPassValue =
True
357 if electrons
and self.doEleEleOR:
358 config.addPrivateTool(
'overlapTool.EleEleORT',
359 'ORUtils::EleEleOverlapTool' )
360 alg.overlapTool.EleEleORT.InputLabel = inputLabel
361 alg.overlapTool.EleEleORT.OutputLabel = outputLabel
362 alg.overlapTool.EleEleORT.LinkOverlapObjects = self.linkOverlapObjects
363 alg.overlapTool.EleEleORT.OutputPassValue =
True
366 if electrons
and muons
and self.doEleMuOR:
367 config.addPrivateTool(
'overlapTool.EleMuORT',
368 'ORUtils::EleMuSharedTrkOverlapTool' )
369 alg.overlapTool.EleMuORT.InputLabel = inputLabel
370 alg.overlapTool.EleMuORT.OutputLabel = outputLabel
371 alg.overlapTool.EleMuORT.LinkOverlapObjects = self.linkOverlapObjects
372 alg.overlapTool.EleMuORT.OutputPassValue =
True
375 if electrons
and jets
and self.doEleJetOR:
376 config.addPrivateTool(
'overlapTool.EleJetORT',
377 'ORUtils::EleJetOverlapTool' )
378 alg.overlapTool.EleJetORT.InputLabel = inputLabel
379 alg.overlapTool.EleJetORT.OutputLabel = outputLabel
380 alg.overlapTool.EleJetORT.LinkOverlapObjects = self.linkOverlapObjects
381 alg.overlapTool.EleJetORT.BJetLabel = self.bJetLabel
382 alg.overlapTool.EleJetORT.InnerDR = self.InnerDR
383 alg.overlapTool.EleJetORT.OuterDR = self.OuterDR
384 alg.overlapTool.EleJetORT.UseSlidingDR = self.boostedLeptons
385 alg.overlapTool.EleJetORT.EnableUserPriority = self.enableUserPriority
386 alg.overlapTool.EleJetORT.OutputPassValue =
True
389 if muons
and jets
and self.doMuJetOR:
390 config.addPrivateTool(
'overlapTool.MuJetORT',
391 'ORUtils::MuJetOverlapTool' )
392 alg.overlapTool.MuJetORT.InputLabel = inputLabel
393 alg.overlapTool.MuJetORT.OutputLabel = outputLabel
394 alg.overlapTool.MuJetORT.LinkOverlapObjects = self.linkOverlapObjects
395 alg.overlapTool.MuJetORT.BJetLabel = self.bJetLabel
396 alg.overlapTool.MuJetORT.InnerDR = self.InnerDR
397 alg.overlapTool.MuJetORT.OuterDR = self.OuterDR
398 alg.overlapTool.MuJetORT.UseSlidingDR = self.boostedLeptons
399 alg.overlapTool.MuJetORT.EnableUserPriority = self.enableUserPriority
400 alg.overlapTool.MuJetORT.OutputPassValue =
True
403 if taus
and electrons
and self.doTauEleOR:
404 config.addPrivateTool(
'overlapTool.TauEleORT',
405 'ORUtils::DeltaROverlapTool' )
406 alg.overlapTool.TauEleORT.InputLabel = inputLabel
407 alg.overlapTool.TauEleORT.OutputLabel = outputLabel
408 alg.overlapTool.TauEleORT.LinkOverlapObjects = self.linkOverlapObjects
409 alg.overlapTool.TauEleORT.DR = 0.2
410 alg.overlapTool.TauEleORT.OutputPassValue =
True
413 if taus
and muons
and self.doTauMuOR:
414 config.addPrivateTool(
'overlapTool.TauMuORT',
415 'ORUtils::DeltaROverlapTool' )
416 alg.overlapTool.TauMuORT.InputLabel = inputLabel
417 alg.overlapTool.TauMuORT.OutputLabel = outputLabel
418 alg.overlapTool.TauMuORT.LinkOverlapObjects = self.linkOverlapObjects
419 alg.overlapTool.TauMuORT.DR = 0.2
420 alg.overlapTool.TauMuORT.OutputPassValue =
True
423 if taus
and jets
and self.doTauJetOR:
424 if self.doTauAntiTauJetOR:
425 config.addPrivateTool(
'overlapTool.TauJetORT',
426 'ORUtils::TauAntiTauJetOverlapTool' )
427 alg.overlapTool.TauJetORT.TauLabel = self.antiTauIDTauLabel
428 alg.overlapTool.TauJetORT.AntiTauLabel = self.antiTauLabel
429 alg.overlapTool.TauJetORT.BJetLabel = self.antiTauBJetLabel
431 config.addPrivateTool(
'overlapTool.TauJetORT',
432 'ORUtils::DeltaROverlapTool' )
434 alg.overlapTool.TauJetORT.InputLabel = inputLabel
435 alg.overlapTool.TauJetORT.OutputLabel = outputLabel
436 alg.overlapTool.TauJetORT.LinkOverlapObjects = self.linkOverlapObjects
437 alg.overlapTool.TauJetORT.DR = 0.2
438 alg.overlapTool.TauJetORT.EnableUserPriority = self.enableUserPriority
439 alg.overlapTool.TauJetORT.OutputPassValue =
True
442 if photons
and electrons
and self.doPhEleOR:
443 config.addPrivateTool(
'overlapTool.PhoEleORT',
444 'ORUtils::DeltaROverlapTool' )
445 alg.overlapTool.PhoEleORT.InputLabel = inputLabel
446 alg.overlapTool.PhoEleORT.OutputLabel = outputLabel
447 alg.overlapTool.PhoEleORT.LinkOverlapObjects = self.linkOverlapObjects
448 alg.overlapTool.PhoEleORT.OutputPassValue =
True
449 if self.favourPhotonOverLepton:
450 alg.overlapTool.PhoEleORT.SwapContainerPrecedence =
True
453 if photons
and muons
and self.doPhMuOR:
454 config.addPrivateTool(
'overlapTool.PhoMuORT',
455 'ORUtils::DeltaROverlapTool' )
456 alg.overlapTool.PhoMuORT.InputLabel = inputLabel
457 alg.overlapTool.PhoMuORT.OutputLabel = outputLabel
458 alg.overlapTool.PhoMuORT.LinkOverlapObjects = self.linkOverlapObjects
459 alg.overlapTool.PhoMuORT.OutputPassValue =
True
460 if self.favourPhotonOverLepton:
461 alg.overlapTool.PhoMuORT.SwapContainerPrecedence =
True
464 if photons
and jets
and self.doPhJetOR:
465 config.addPrivateTool(
'overlapTool.PhoJetORT',
466 'ORUtils::DeltaROverlapTool' )
467 alg.overlapTool.PhoJetORT.InputLabel = inputLabel
468 alg.overlapTool.PhoJetORT.OutputLabel = outputLabel
469 alg.overlapTool.PhoJetORT.LinkOverlapObjects = self.linkOverlapObjects
470 alg.overlapTool.PhoJetORT.EnableUserPriority = self.enableUserPriority
471 alg.overlapTool.PhoJetORT.OutputPassValue =
True
474 if electrons
and fatJets
and self.doEleFatJetOR:
475 config.addPrivateTool(
'overlapTool.EleFatJetORT',
476 'ORUtils::DeltaROverlapTool' )
477 alg.overlapTool.EleFatJetORT.InputLabel = inputLabel
478 alg.overlapTool.EleFatJetORT.OutputLabel = outputLabel
479 alg.overlapTool.EleFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
480 alg.overlapTool.EleFatJetORT.DR = 1.0
481 alg.overlapTool.EleFatJetORT.OutputPassValue =
True
484 if jets
and fatJets
and self.doJetFatJetOR:
485 config.addPrivateTool(
'overlapTool.JetFatJetORT',
486 'ORUtils::DeltaROverlapTool' )
487 alg.overlapTool.JetFatJetORT.InputLabel = inputLabel
488 alg.overlapTool.JetFatJetORT.OutputLabel = outputLabel
489 alg.overlapTool.JetFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
490 alg.overlapTool.JetFatJetORT.DR = 1.0
491 alg.overlapTool.JetFatJetORT.OutputPassValue =
True
493 if self.nominalOnly
or self.nominalOnlyUnifiedSelection :
495 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORElectronsCopyAlg')
496 alg.particles = electrons
497 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
499 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORMuonsCopyAlg')
500 alg.particles = muons
501 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
503 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORTausCopyAlg')
505 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
507 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORJetsCopyAlg')
509 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
511 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORPhotonsCopyAlg')
512 alg.particles = photons
513 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
515 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORFatJetsCopyAlg')
516 alg.particles = fatJets
517 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
521 if self.preselectLabel
is not None :
522 preselectLabel = self.preselectLabel
524 preselectLabel = outputLabel
527 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORElectronsPreselectionAlg')
528 alg.particles = electrons
529 alg.preselection =
'&&'.join (config.getPreselection (self.electrons.
split(
'.')[0], electronsSelectionName, asList=
True)
530 + [outputLabel +
'_%SYS%,as_char'])
531 alg.selectionDecoration = preselectLabel
532 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
534 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORMuonsPreselectionAlg')
535 alg.particles = muons
536 alg.preselection =
'&&'.join (config.getPreselection (self.muons.
split(
'.')[0], muonsSelectionName, asList=
True)
537 + [outputLabel +
'_%SYS%,as_char'])
538 alg.selectionDecoration = preselectLabel
539 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
541 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORTausPreselectionAlg')
543 alg.preselection =
'&&'.join (config.getPreselection (self.taus.
split(
'.')[0], tausSelectionName, asList=
True)
544 + [outputLabel +
'_%SYS%,as_char'])
545 alg.selectionDecoration = preselectLabel
546 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
548 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORJetsPreselectionAlg')
550 alg.preselection =
'&&'.join (config.getPreselection (self.jets.
split(
'.')[0], jetsSelectionName, asList=
True)
551 + [outputLabel +
'_%SYS%,as_char'])
552 alg.selectionDecoration = preselectLabel
553 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
555 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORPhotonsPreselectionAlg')
556 alg.particles = photons
557 alg.preselection =
'&&'.join (config.getPreselection (self.photons.
split(
'.')[0], photonsSelectionName, asList=
True)
558 + [outputLabel +
'_%SYS%,as_char'])
559 alg.selectionDecoration = preselectLabel
560 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
562 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORFatJetsPreselectionAlg')
563 alg.particles = fatJets
564 alg.preselection =
'&&'.join (config.getPreselection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, asList=
True)
565 + [outputLabel +
'_%SYS%,as_char'])
566 alg.selectionDecoration = preselectLabel
567 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')