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.")
18 self.addOption (
'selectionName',
None, type=str,
20 self.addOption (
'linkOverlapObjects',
False, type=bool,
21 info=
"whether to set up an element link between overlapping objects. The default is False.")
22 self.addOption (
'enableUserPriority',
False, type=bool,
23 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.")
24 self.addOption (
'bJetLabel',
'', type=str,
25 info=
"flag to select b-jets with. If left empty, no b-jets are used in the overlap removal. The default is '' (empty string).")
26 self.addOption (
'boostedLeptons',
False, type=bool,
27 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.")
29 self.addOption (
'nominalOnly',
False, type=bool,
32 self.addOption (
'nominalOnlyUnifiedSelection',
False, type=bool,
34 self.addOption (
'jets',
"", type=str,
35 info=
"the input jet container.")
36 self.addOption (
'fatJets',
"", type=str,
37 info=
"the input large-R jet container.")
38 self.addOption (
'electrons',
"", type=str,
39 info=
"the input electron container.")
40 self.addOption (
'muons',
"", type=str,
41 info=
"the input muon container.")
42 self.addOption (
'photons',
"", type=str,
43 info=
"the input photon container.")
44 self.addOption (
'taus',
"", type=str,
45 info=
"the input tau-jet container.")
46 self.addOption (
'antiTauIDTauLabel',
'', type=str,
47 info=
"flag to select the ID tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
48 self.addOption (
'antiTauLabel',
'', type=str,
49 info=
"flag to select the anti-tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
50 self.addOption (
'antiTauBJetLabel',
'', type=str,
51 info=
"flag to select b-jets for the tau-antitau-jet overlap removal. The default is '' (empty string).")
52 self.addOption (
'addToAllSelections',
True, type=bool,
53 info=
"add OR selection decision into all object selections")
54 self.addOption (
'addPreselection',
False, type=bool,
55 info=
"add preselection decorations without systematics")
56 self.addOption (
'preselectLabel',
None, type=str,
57 info=
"label for preselection decorations")
58 self.addOption (
'jetsSelectionName',
None, type=str,
59 info=
"a possible selection on the jet container.")
60 self.addOption (
'fatJetsSelectionName',
None, type=str,
61 info=
"a possible selection on the large-R jet container.")
62 self.addOption (
'electronsSelectionName',
None, type=str,
63 info=
"a possible selection on the electron container.")
64 self.addOption (
'muonsSelectionName',
None, type=str,
65 info=
"a possible selection on the muon container.")
66 self.addOption (
'photonsSelectionName',
None, type=str,
67 info=
"a possible selection on the photon container.")
68 self.addOption (
'tausSelectionName',
None, type=str,
69 info=
"a possible selection on the tau-jet container.")
70 self.addOption (
'doEleEleOR',
False, type=bool,
71 info=
"whether to perform the overlap removal amongst electrons. The default is False.")
72 self.addOption (
'doEleMuOR',
True, type=bool,
73 info=
"whether to perform the overlap removal between electrons and muons. The default is True.")
74 self.addOption (
'doEleJetOR',
True, type=bool,
75 info=
"whether to perform the overlap removal between electrons and jets. The default is True.")
76 self.addOption (
'doMuJetOR',
True, type=bool,
77 info=
"whether to perform the overlap removal between muons and jets. The default is True.")
78 self.addOption (
'doTauEleOR',
True, type=bool,
79 info=
"whether to perform the overlap removal between tau-jets and electrons. The default is True.")
80 self.addOption (
'doTauMuOR',
True, type=bool,
81 info=
"whether to perform the overlap removal between tau-jets and muons. The default is True.")
82 self.addOption (
'doTauJetOR',
True, type=bool,
83 info=
"whether to perform the overlap removal between tau-jets and jets. The default is True.")
84 self.addOption (
'doTauAntiTauJetOR',
False, type=bool,
85 info=
"whether to perform the overlap removal between tau-jets and anti-tau-jets. The default is False.")
86 self.addOption (
'doPhEleOR',
True, type=bool,
87 info=
"whether to perform the overlap removal between photons and electrons. The default is True.")
88 self.addOption (
'doPhMuOR',
True, type=bool,
89 info=
"whether to perform the overlap removal between photons and muons. The default is True.")
90 self.addOption (
'doPhJetOR',
True, type=bool,
91 info=
"whether to perform the overlap removal between photons and jets. The default is True.")
92 self.addOption (
'doEleFatJetOR',
True, type=bool,
93 info=
"whether to perform the overlap removal between electrons and large-R jets. The default is True.")
94 self.addOption (
'doJetFatJetOR',
True, type=bool,
95 info=
"whether to perform the overlap removal between jets and large-R jets. The default is True.")
99 Create a new selection for the inputCollection ('container.selection')
100 that is the union over all systematics of 'selection'. This allows us
101 to run nominal-only overlap removal while taking into account the impact
102 of systematics on object acceptance.
104 container, selection = config.readNameAndSelection( inputCollection )
105 alg = config.createAlgorithm(
'CP::AsgUnionSelectionAlg',
'UnionSelectionAlgForOR_' + inputCollection.split(
".")[0] )
106 alg.preselection = selection
107 alg.particles = container
108 alg.selectionDecoration =
'unifiedSelectForOR'
112 if self.addToAllSelections
and self.selectionName
is not None:
113 raise Exception(
'When addToAllSelections=True, you cannot configure selectionName!')
115 if self.selectionName
is not None:
116 selectionName = self.selectionName
117 outputLabel = self.outputLabel +
'_' + selectionName
118 inputLabel = self.inputLabel +
'_' + selectionName
119 select_or_decoration =
'select_or_' + self.selectionName
120 postfix =
'_' + self.selectionName
122 if self.addToAllSelections:
125 selectionName = self.outputLabel
126 outputLabel = self.outputLabel
127 inputLabel = self.inputLabel
128 select_or_decoration =
'select_or'
131 if self.jetsSelectionName
is not None:
132 jetsSelectionName = self.jetsSelectionName
134 jetsSelectionName = selectionName
135 if self.fatJetsSelectionName
is not None:
136 fatJetsSelectionName = self.fatJetsSelectionName
138 fatJetsSelectionName = selectionName
139 if self.electronsSelectionName
is not None:
140 electronsSelectionName = self.electronsSelectionName
142 electronsSelectionName = selectionName
143 if self.muonsSelectionName
is not None:
144 muonsSelectionName = self.muonsSelectionName
146 muonsSelectionName = selectionName
147 if self.photonsSelectionName
is not None:
148 photonsSelectionName = self.photonsSelectionName
150 photonsSelectionName = selectionName
151 if self.tausSelectionName
is not None:
152 tausSelectionName = self.tausSelectionName
154 tausSelectionName = selectionName
167 if self.electrons !=
"" :
168 if self.nominalOnlyUnifiedSelection:
170 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORElectronsSelectAlg' + postfix )
171 electrons, alg.preselection = config.readNameAndSelection (self.electrons)
172 alg.particles = electrons
173 alg.selectionDecoration = inputLabel +
',as_char'
175 if self.selectionName !=
'':
176 config.addOutputVar (self.electrons.
split(
'.')[0],
177 outputLabel +
'_%SYS%',
178 select_or_decoration,
179 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection)
180 if self.nominalOnlyUnifiedSelection:
181 alg.preselection =
'unifiedSelectForOR'
184 if self.photons !=
"" :
185 if self.nominalOnlyUnifiedSelection:
187 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORPhotonsSelectAlg' + postfix )
188 photons, alg.preselection = config.readNameAndSelection (self.photons)
189 alg.particles = photons
190 alg.selectionDecoration = inputLabel +
',as_char'
191 if self.selectionName !=
'':
192 config.addOutputVar (self.photons.
split(
'.')[0],
193 outputLabel +
'_%SYS%',
194 select_or_decoration,
195 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection)
196 if self.nominalOnlyUnifiedSelection:
197 alg.preselection =
'unifiedSelectForOR'
200 if self.muons !=
"" :
201 if self.nominalOnlyUnifiedSelection:
203 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORMuonsSelectAlg' + postfix )
204 muons, alg.preselection = config.readNameAndSelection (self.muons)
205 alg.particles = muons
206 alg.selectionDecoration = inputLabel +
',as_char'
207 if self.selectionName !=
'':
208 config.addOutputVar (self.muons.
split(
'.')[0],
209 outputLabel +
'_%SYS%',
210 select_or_decoration,
211 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection)
212 if self.nominalOnlyUnifiedSelection:
213 alg.preselection =
'unifiedSelectForOR'
217 if self.nominalOnlyUnifiedSelection:
219 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORTausSelectAlg' + postfix )
220 taus, alg.preselection = config.readNameAndSelection (self.taus)
222 alg.selectionDecoration = inputLabel +
',as_char'
223 if self.selectionName !=
'':
224 config.addOutputVar (self.taus.
split(
'.')[0],
225 outputLabel +
'_%SYS%',
226 select_or_decoration,
227 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection)
228 if self.nominalOnlyUnifiedSelection:
229 alg.preselection =
'unifiedSelectForOR'
233 if self.nominalOnlyUnifiedSelection:
235 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORJetsSelectAlg' + postfix )
236 jets, alg.preselection = config.readNameAndSelection (self.jets)
238 alg.selectionDecoration = inputLabel +
',as_char'
239 if self.selectionName !=
'':
240 config.addOutputVar (self.jets.
split(
'.')[0],
241 outputLabel +
'_%SYS%',
242 select_or_decoration,
243 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection)
244 if self.nominalOnlyUnifiedSelection:
245 alg.preselection =
'unifiedSelectForOR'
248 if self.fatJets !=
"" :
249 if self.nominalOnlyUnifiedSelection:
251 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'ORFatJetsSelectAlg' + postfix )
252 fatJets, alg.preselection = config.readNameAndSelection (self.fatJets)
253 alg.particles = fatJets
254 alg.selectionDecoration = inputLabel +
',as_char'
255 if self.selectionName !=
'':
256 config.addOutputVar (self.fatJets.
split(
'.')[0],
257 outputLabel +
'_%SYS%',
258 select_or_decoration,
259 noSys=self.nominalOnly
or self.nominalOnlyUnifiedSelection)
260 if self.nominalOnlyUnifiedSelection:
261 alg.preselection =
'unifiedSelectForOR'
265 alg = config.createAlgorithm(
'CP::OverlapRemovalAlg',
'OverlapRemovalAlg' + postfix )
266 alg.OutputLabel = outputLabel
267 if self.nominalOnly
or self.nominalOnlyUnifiedSelection :
268 alg.affectingSystematicsFilter =
'.*'
270 alg.electrons = electrons
271 alg.electronsDecoration = outputLabel +
'_%SYS%,as_char'
272 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.electronsDecoration, preselection=
False, comesFrom=
'or')
275 alg.muonsDecoration = outputLabel +
'_%SYS%,as_char'
276 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.muonsDecoration, preselection=
False, comesFrom=
'or')
279 alg.tausDecoration = outputLabel +
'_%SYS%,as_char'
280 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.tausDecoration, preselection=
False, comesFrom=
'or')
283 alg.jetsDecoration = outputLabel +
'_%SYS%,as_char'
284 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.jetsDecoration, preselection=
False, comesFrom=
'or')
286 alg.photons = photons
287 alg.photonsDecoration = outputLabel +
'_%SYS%,as_char'
288 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.photonsDecoration, preselection=
False, comesFrom=
'or')
290 alg.fatJets = fatJets
291 alg.fatJetsDecoration = outputLabel +
'_%SYS%,as_char'
292 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.fatJetsDecoration, preselection=
False, comesFrom=
'or')
295 config.addPrivateTool(
'overlapTool',
'ORUtils::OverlapRemovalTool' )
296 alg.overlapTool.InputLabel = inputLabel
297 alg.overlapTool.OutputLabel = outputLabel
304 alg.overlapTool.OutputPassValue =
True
307 if electrons
and self.doEleEleOR:
308 config.addPrivateTool(
'overlapTool.EleEleORT',
309 'ORUtils::EleEleOverlapTool' )
310 alg.overlapTool.EleEleORT.InputLabel = inputLabel
311 alg.overlapTool.EleEleORT.OutputLabel = outputLabel
312 alg.overlapTool.EleEleORT.LinkOverlapObjects = self.linkOverlapObjects
313 alg.overlapTool.EleEleORT.OutputPassValue =
True
316 if electrons
and muons
and self.doEleMuOR:
317 config.addPrivateTool(
'overlapTool.EleMuORT',
318 'ORUtils::EleMuSharedTrkOverlapTool' )
319 alg.overlapTool.EleMuORT.InputLabel = inputLabel
320 alg.overlapTool.EleMuORT.OutputLabel = outputLabel
321 alg.overlapTool.EleMuORT.LinkOverlapObjects = self.linkOverlapObjects
322 alg.overlapTool.EleMuORT.OutputPassValue =
True
325 if electrons
and jets
and self.doEleJetOR:
326 config.addPrivateTool(
'overlapTool.EleJetORT',
327 'ORUtils::EleJetOverlapTool' )
328 alg.overlapTool.EleJetORT.InputLabel = inputLabel
329 alg.overlapTool.EleJetORT.OutputLabel = outputLabel
330 alg.overlapTool.EleJetORT.LinkOverlapObjects = self.linkOverlapObjects
331 alg.overlapTool.EleJetORT.BJetLabel = self.bJetLabel
332 alg.overlapTool.EleJetORT.UseSlidingDR = self.boostedLeptons
333 alg.overlapTool.EleJetORT.EnableUserPriority = self.enableUserPriority
334 alg.overlapTool.EleJetORT.OutputPassValue =
True
337 if muons
and jets
and self.doMuJetOR:
338 config.addPrivateTool(
'overlapTool.MuJetORT',
339 'ORUtils::MuJetOverlapTool' )
340 alg.overlapTool.MuJetORT.InputLabel = inputLabel
341 alg.overlapTool.MuJetORT.OutputLabel = outputLabel
342 alg.overlapTool.MuJetORT.LinkOverlapObjects = self.linkOverlapObjects
343 alg.overlapTool.MuJetORT.BJetLabel = self.bJetLabel
344 alg.overlapTool.MuJetORT.UseSlidingDR = self.boostedLeptons
345 alg.overlapTool.MuJetORT.EnableUserPriority = self.enableUserPriority
346 alg.overlapTool.MuJetORT.OutputPassValue =
True
349 if taus
and electrons
and self.doTauEleOR:
350 config.addPrivateTool(
'overlapTool.TauEleORT',
351 'ORUtils::DeltaROverlapTool' )
352 alg.overlapTool.TauEleORT.InputLabel = inputLabel
353 alg.overlapTool.TauEleORT.OutputLabel = outputLabel
354 alg.overlapTool.TauEleORT.LinkOverlapObjects = self.linkOverlapObjects
355 alg.overlapTool.TauEleORT.DR = 0.2
356 alg.overlapTool.TauEleORT.OutputPassValue =
True
359 if taus
and muons
and self.doTauMuOR:
360 config.addPrivateTool(
'overlapTool.TauMuORT',
361 'ORUtils::DeltaROverlapTool' )
362 alg.overlapTool.TauMuORT.InputLabel = inputLabel
363 alg.overlapTool.TauMuORT.OutputLabel = outputLabel
364 alg.overlapTool.TauMuORT.LinkOverlapObjects = self.linkOverlapObjects
365 alg.overlapTool.TauMuORT.DR = 0.2
366 alg.overlapTool.TauMuORT.OutputPassValue =
True
369 if taus
and jets
and self.doTauJetOR:
370 if self.doTauAntiTauJetOR:
371 config.addPrivateTool(
'overlapTool.TauJetORT',
372 'ORUtils::TauAntiTauJetOverlapTool' )
373 alg.overlapTool.TauJetORT.TauLabel = self.antiTauIDTauLabel
374 alg.overlapTool.TauJetORT.AntiTauLabel = self.antiTauLabel
375 alg.overlapTool.TauJetORT.BJetLabel = self.antiTauBJetLabel
377 config.addPrivateTool(
'overlapTool.TauJetORT',
378 'ORUtils::DeltaROverlapTool' )
380 alg.overlapTool.TauJetORT.InputLabel = inputLabel
381 alg.overlapTool.TauJetORT.OutputLabel = outputLabel
382 alg.overlapTool.TauJetORT.LinkOverlapObjects = self.linkOverlapObjects
383 alg.overlapTool.TauJetORT.DR = 0.2
384 alg.overlapTool.TauJetORT.EnableUserPriority = self.enableUserPriority
385 alg.overlapTool.TauJetORT.OutputPassValue =
True
388 if photons
and electrons
and self.doPhEleOR:
389 config.addPrivateTool(
'overlapTool.PhoEleORT',
390 'ORUtils::DeltaROverlapTool' )
391 alg.overlapTool.PhoEleORT.InputLabel = inputLabel
392 alg.overlapTool.PhoEleORT.OutputLabel = outputLabel
393 alg.overlapTool.PhoEleORT.LinkOverlapObjects = self.linkOverlapObjects
394 alg.overlapTool.PhoEleORT.OutputPassValue =
True
397 if photons
and muons
and self.doPhMuOR:
398 config.addPrivateTool(
'overlapTool.PhoMuORT',
399 'ORUtils::DeltaROverlapTool' )
400 alg.overlapTool.PhoMuORT.InputLabel = inputLabel
401 alg.overlapTool.PhoMuORT.OutputLabel = outputLabel
402 alg.overlapTool.PhoMuORT.LinkOverlapObjects = self.linkOverlapObjects
403 alg.overlapTool.PhoMuORT.OutputPassValue =
True
406 if photons
and jets
and self.doPhJetOR:
407 config.addPrivateTool(
'overlapTool.PhoJetORT',
408 'ORUtils::DeltaROverlapTool' )
409 alg.overlapTool.PhoJetORT.InputLabel = inputLabel
410 alg.overlapTool.PhoJetORT.OutputLabel = outputLabel
411 alg.overlapTool.PhoJetORT.LinkOverlapObjects = self.linkOverlapObjects
412 alg.overlapTool.PhoJetORT.EnableUserPriority = self.enableUserPriority
413 alg.overlapTool.PhoJetORT.OutputPassValue =
True
416 if electrons
and fatJets
and self.doEleFatJetOR:
417 config.addPrivateTool(
'overlapTool.EleFatJetORT',
418 'ORUtils::DeltaROverlapTool' )
419 alg.overlapTool.EleFatJetORT.InputLabel = inputLabel
420 alg.overlapTool.EleFatJetORT.OutputLabel = outputLabel
421 alg.overlapTool.EleFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
422 alg.overlapTool.EleFatJetORT.DR = 1.0
423 alg.overlapTool.EleFatJetORT.OutputPassValue =
True
426 if jets
and fatJets
and self.doJetFatJetOR:
427 config.addPrivateTool(
'overlapTool.JetFatJetORT',
428 'ORUtils::DeltaROverlapTool' )
429 alg.overlapTool.JetFatJetORT.InputLabel = inputLabel
430 alg.overlapTool.JetFatJetORT.OutputLabel = outputLabel
431 alg.overlapTool.JetFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
432 alg.overlapTool.JetFatJetORT.DR = 1.0
433 alg.overlapTool.JetFatJetORT.OutputPassValue =
True
435 if self.nominalOnly
or self.nominalOnlyUnifiedSelection :
437 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORElectronsCopyAlg' + postfix)
438 alg.particles = electrons
439 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
441 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORMuonsCopyAlg' + postfix)
442 alg.particles = muons
443 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
445 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORTausCopyAlg' + postfix)
447 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
449 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORJetsCopyAlg' + postfix)
451 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
453 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORPhotonsCopyAlg' + postfix)
454 alg.particles = photons
455 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
457 alg = config.createAlgorithm(
'CP::CopyNominalSelectionAlg',
'ORFatJetsCopyAlg' + postfix)
458 alg.particles = fatJets
459 alg.selectionDecoration = outputLabel +
'_%SYS%,as_char'
462 if self.addPreselection:
463 if self.preselectLabel
is not None :
464 preselectLabel = self.preselectLabel
466 preselectLabel = outputLabel
469 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORElectronsPreselectionAlg' + postfix )
470 alg.particles = electrons
471 alg.preselection =
'&&'.join (config.getPreselection (self.electrons.
split(
'.')[0], electronsSelectionName, asList=
True)
472 + [outputLabel +
'_%SYS%,as_char'])
473 alg.selectionDecoration = preselectLabel
474 config.addSelection (self.electrons.
split(
'.')[0], electronsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
476 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORMuonsPreselectionAlg' + postfix )
477 alg.particles = muons
478 alg.preselection =
'&&'.join (config.getPreselection (self.muons.
split(
'.')[0], muonsSelectionName, asList=
True)
479 + [outputLabel +
'_%SYS%,as_char'])
480 alg.selectionDecoration = preselectLabel
481 config.addSelection (self.muons.
split(
'.')[0], muonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
483 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORTausPreselectionAlg' + postfix )
485 alg.preselection =
'&&'.join (config.getPreselection (self.taus.
split(
'.')[0], tausSelectionName, asList=
True)
486 + [outputLabel +
'_%SYS%,as_char'])
487 alg.selectionDecoration = preselectLabel
488 config.addSelection (self.taus.
split(
'.')[0], tausSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
490 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORJetsPreselectionAlg' + postfix )
492 alg.preselection =
'&&'.join (config.getPreselection (self.jets.
split(
'.')[0], jetsSelectionName, asList=
True)
493 + [outputLabel +
'_%SYS%,as_char'])
494 alg.selectionDecoration = preselectLabel
495 config.addSelection (self.jets.
split(
'.')[0], jetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
497 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORPhotonsPreselectionAlg' + postfix )
498 alg.particles = photons
499 alg.preselection =
'&&'.join (config.getPreselection (self.photons.
split(
'.')[0], photonsSelectionName, asList=
True)
500 + [outputLabel +
'_%SYS%,as_char'])
501 alg.selectionDecoration = preselectLabel
502 config.addSelection (self.photons.
split(
'.')[0], photonsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
504 alg = config.createAlgorithm(
'CP::AsgUnionPreselectionAlg',
'ORFatJetsPreselectionAlg' + postfix )
505 alg.particles = fatJets
506 alg.preselection =
'&&'.join (config.getPreselection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, asList=
True)
507 + [outputLabel +
'_%SYS%,as_char'])
508 alg.selectionDecoration = preselectLabel
509 config.addSelection (self.fatJets.
split(
'.')[0], fatJetsSelectionName, alg.selectionDecoration+
',as_char', bits=1, preselection=
True, comesFrom=
'or')
514 inputLabel = None, outputLabel = None,
515 linkOverlapObjects = None,
516 doEleEleOR = None, electrons = None,
517 muons = None, jets = None,
518 taus = None, doTauAntiTauJetOR = None,
519 photons = None, fatJets = None,
520 enableUserPriority = None,
522 antiTauIDTauLabel = None, antiTauLabel = None,
523 antiTauBJetLabel = None,
524 boostedLeptons = None,
526 """Function creating the overlap removal algorithm sequence
528 The function sets up a multi-input/multi-output analysis algorithm sequnce,
529 which needs to be used in a quite particular way. First off you need to set
530 the arguments of this function correctly.
532 Function keyword arguments:
533 inputLabel -- Any possible label used to pick up the selected objects
534 with. This should not be a label already used otherwise.
535 outputLabel -- Decoration put on the output variables. Set to "true" for
536 objects passing the overlap removal.
537 linkOverlapObjects -- Set up an element link between overlapping objects
538 doEleEleOR -- Set up electron-electron overlap removal
539 doTauAntiTauJetOR -- Set up Tau-AntiTau-Jet overlap removal
540 enableUserPriority -- If enabled, the Ele-, Mu-, Tau- and PhoJetOR tools
541 will respect the user priority in the inputLabel.
542 E.g. SUSYTools assigns all signal objects the
543 priority 2 and pre-selected jets the priority 1.
544 bJetLabel -- Flag to select b-jets with for lepton OR.
545 If left empty, no b-jets are used in the overlap removal.
546 antiTauIDTauLabel -- Flag to select ID tau with for Tau-AntiTau-Jet OR.
547 antiTauLabel -- Flag to select antiTau with. Required for Tau-AntiTau-Jet OR.
548 antiTauBJetLabel -- Flag to select b-jets with for Tau-AntiTau-Jet OR.
549 boostedLeptons -- Set to True to enable boosted lepton overlap removal
553 config.setOptionValue (
'inputLabel', inputLabel)
554 config.setOptionValue (
'outputLabel', outputLabel)
555 config.setOptionValue (
'linkOverlapObjects', linkOverlapObjects)
556 config.setOptionValue (
'doEleEleOR', doEleEleOR)
557 config.setOptionValue (
'electrons', electrons)
558 config.setOptionValue (
'muons', muons)
559 config.setOptionValue (
'jets', jets)
560 config.setOptionValue (
'taus', taus)
561 config.setOptionValue (
'doTauAntiTauJetOR', doTauAntiTauJetOR)
562 config.setOptionValue (
'photons', photons)
563 config.setOptionValue (
'fatJets', fatJets)
564 config.setOptionValue (
'enableUserPriority', enableUserPriority)
565 config.setOptionValue (
'bJetLabel', bJetLabel)
566 config.setOptionValue (
'antiTauIDTauLabel', antiTauIDTauLabel)
567 config.setOptionValue (
'antiTauLabel', antiTauLabel)
568 config.setOptionValue (
'antiTauBJetLabel', antiTauBJetLabel)
569 config.setOptionValue (
'boostedLeptons', boostedLeptons)