ATLAS Offline Software
Public Member Functions | List of all members
python.OverlapAnalysisConfig.OverlapAnalysisConfig Class Reference
Inheritance diagram for python.OverlapAnalysisConfig.OverlapAnalysisConfig:
Collaboration diagram for python.OverlapAnalysisConfig.OverlapAnalysisConfig:

Public Member Functions

def __init__ (self)
 
def makeUnionPreselectionAlg (self, config, inputCollection)
 
def makeAlgs (self, config)
 

Detailed Description

the ConfigBlock for the OverlapRemoval configuration

Definition at line 7 of file OverlapAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.OverlapAnalysisConfig.OverlapAnalysisConfig.__init__ (   self)

Definition at line 10 of file OverlapAnalysisConfig.py.

10  def __init__ (self) :
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 ('boostedLeptons', False, type=bool,
26  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.")
27  self.addOption ('nominalOnly', False, type=bool,
28  info="(experimental) toggle off the running of overlap removal on systematically-varied objects (instead, copy from nominal). The default is False.")
29  self.addOption ('nominalOnlyUnifiedSelection', False, type=bool,
30  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.")
31  self.addOption ('jets', "", type=str,
32  info="the input jet container.")
33  self.addOption ('fatJets', "", type=str,
34  info="the input large-R jet container.")
35  self.addOption ('electrons', "", type=str,
36  info="the input electron container.")
37  self.addOption ('muons', "", type=str,
38  info="the input muon container.")
39  self.addOption ('photons', "", type=str,
40  info="the input photon container.")
41  self.addOption ('taus', "", type=str,
42  info="the input tau-jet container.")
43  self.addOption ('antiTauIDTauLabel', '', type=str,
44  info="flag to select the ID tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
45  self.addOption ('antiTauLabel', '', type=str,
46  info="flag to select the anti-tau-jet for the tau-antitau-jet overlap removal. The default is '' (empty string).")
47  self.addOption ('antiTauBJetLabel', '', type=str,
48  info="flag to select b-jets for the tau-antitau-jet overlap removal. The default is '' (empty string).")
49  self.addOption ('addToAllSelections', False, type=bool,
50  info="add OR selection decision into all object selections")
51  self.addOption ('addPreselection', False, type=bool,
52  info="add preselection decorations without systematics")
53  self.addOption ('preselectLabel', None, type=str,
54  info="label for preselection decorations")
55  self.addOption ('jetsSelectionName', None, type=str,
56  info="a possible selection on the jet container.")
57  self.addOption ('fatJetsSelectionName', None, type=str,
58  info="a possible selection on the large-R jet container.")
59  self.addOption ('electronsSelectionName', None, type=str,
60  info="a possible selection on the electron container.")
61  self.addOption ('muonsSelectionName', None, type=str,
62  info="a possible selection on the muon container.")
63  self.addOption ('photonsSelectionName', None, type=str,
64  info="a possible selection on the photon container.")
65  self.addOption ('tausSelectionName', None, type=str,
66  info="a possible selection on the tau-jet container.")
67  self.addOption ('doEleEleOR', False, type=bool,
68  info="whether to perform the overlap removal amongst electrons. The default is False.")
69  self.addOption ('doEleMuOR', True, type=bool,
70  info="whether to perform the overlap removal between electrons and muons. The default is True.")
71  self.addOption ('doEleJetOR', True, type=bool,
72  info="whether to perform the overlap removal between electrons and jets. The default is True.")
73  self.addOption ('doMuJetOR', True, type=bool,
74  info="whether to perform the overlap removal between muons and jets. The default is True.")
75  self.addOption ('doTauEleOR', True, type=bool,
76  info="whether to perform the overlap removal between tau-jets and electrons. The default is True.")
77  self.addOption ('doTauMuOR', True, type=bool,
78  info="whether to perform the overlap removal between tau-jets and muons. The default is True.")
79  self.addOption ('doTauJetOR', True, type=bool,
80  info="whether to perform the overlap removal between tau-jets and jets. The default is True.")
81  self.addOption ('doTauAntiTauJetOR', False, type=bool,
82  info="whether to perform the overlap removal between tau-jets and anti-tau-jets. The default is False.")
83  self.addOption ('doPhEleOR', True, type=bool,
84  info="whether to perform the overlap removal between photons and electrons. The default is True.")
85  self.addOption ('doPhMuOR', True, type=bool,
86  info="whether to perform the overlap removal between photons and muons. The default is True.")
87  self.addOption ('doPhJetOR', True, type=bool,
88  info="whether to perform the overlap removal between photons and jets. The default is True.")
89  self.addOption ('doEleFatJetOR', True, type=bool,
90  info="whether to perform the overlap removal between electrons and large-R jets. The default is True.")
91  self.addOption ('doJetFatJetOR', True, type=bool,
92  info="whether to perform the overlap removal between jets and large-R jets. The default is True.")
93 

Member Function Documentation

◆ makeAlgs()

def python.OverlapAnalysisConfig.OverlapAnalysisConfig.makeAlgs (   self,
  config 
)

Definition at line 107 of file OverlapAnalysisConfig.py.

107  def makeAlgs (self, config) :
108 
109  if self.selectionName is not None:
110  selectionName = self.selectionName
111  outputLabel = self.outputLabel + '_' + selectionName
112  inputLabel = self.inputLabel + '_' + selectionName
113  select_or_decoration = 'select_or_' + self.selectionName
114  postfix = '_' + self.selectionName
115  else:
116  if self.addToAllSelections:
117  selectionName = ""
118  select_or_decoration = 'select_or'
119  else:
120  selectionName = self.outputLabel
121  select_or_decoration = 'select_' + self.outputLabel
122  outputLabel = self.outputLabel
123  inputLabel = self.inputLabel
124  postfix = self.outputLabel
125 
126  # here the logic is:
127  # - either the user has provided a specific selection name for the object, and we use that one
128  # - or they haven't and then either
129  # - we take the selection from 'container.selection' (because it doesn't make sense to apply it to other selections)
130  # - we use selectionName (which is either specified or '', i.e. everything)
131  if self.jetsSelectionName is not None:
132  jetsSelectionName = self.jetsSelectionName
133  else:
134  if len(self.jets.split(".")) == 2 and not self.addToAllSelections:
135  jetsSelectionName = self.jets.split(".")[1]
136  else:
137  jetsSelectionName = selectionName
138  if self.fatJetsSelectionName is not None:
139  fatJetsSelectionName = self.fatJetsSelectionName
140  else:
141  if len(self.fatJets.split(".")) == 2 and not self.addToAllSelections:
142  fatJetsSelectionName = self.fatJets.split(".")[1]
143  else:
144  fatJetsSelectionName = selectionName
145  if self.electronsSelectionName is not None:
146  electronsSelectionName = self.electronsSelectionName
147  else:
148  if len(self.electrons.split(".")) == 2 and not self.addToAllSelections:
149  electronsSelectionName = self.electrons.split(".")[1]
150  else:
151  electronsSelectionName = selectionName
152  if self.muonsSelectionName is not None:
153  muonsSelectionName = self.muonsSelectionName
154  else:
155  if len(self.muons.split(".")) == 2 and not self.addToAllSelections:
156  muonsSelectionName = self.muons.split(".")[1]
157  else:
158  muonsSelectionName = selectionName
159  if self.photonsSelectionName is not None:
160  photonsSelectionName = self.photonsSelectionName
161  else:
162  if len(self.photons.split(".")) == 2 and not self.addToAllSelections:
163  photonsSelectionName = self.photons.split(".")[1]
164  else:
165  photonsSelectionName = selectionName
166  if self.tausSelectionName is not None:
167  tausSelectionName = self.tausSelectionName
168  else:
169  if len(self.taus.split(".")) == 2 and not self.addToAllSelections:
170  tausSelectionName = self.taus.split(".")[1]
171  else:
172  tausSelectionName = selectionName
173 
174  # For now we have to decorate our selections on the objects in
175  # separate algorithms beforehand, so that the overlap
176  # algorithm can read them. This should probably be changed at
177  # some point. For one, this seems like an unnecessary
178  # complication in the configuration. For another, it requires
179  # that all selection systematics applied so far have dedicated
180  # shallow copies for all objects and systematics, i.e. be
181  # kinematic systematics. While that is technically the case
182  # right now, I'd prefer if I didn't force that.
183 
184  electrons = None
185  if self.electrons != "" :
186  if self.nominalOnlyUnifiedSelection:
187  self.makeUnionPreselectionAlg(config, self.electrons)
188  alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORElectronsSelectAlg' + postfix )
189  electrons, alg.preselection = config.readNameAndSelection (self.electrons)
190  alg.particles = electrons
191  alg.selectionDecoration = inputLabel + ',as_char'
192  # if OR added to all selections, don't need standalone selection flag
193  config.addOutputVar (self.electrons.split('.')[0],
194  outputLabel + '_%SYS%',
195  select_or_decoration,
196  noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection,
197  enabled=(selectionName != ''))
198  if self.nominalOnlyUnifiedSelection:
199  alg.preselection = 'unifiedSelectForOR'
200 
201  photons = None
202  if self.photons != "" :
203  if self.nominalOnlyUnifiedSelection:
204  self.makeUnionPreselectionAlg(config, self.photons)
205  alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORPhotonsSelectAlg' + postfix )
206  photons, alg.preselection = config.readNameAndSelection (self.photons)
207  alg.particles = photons
208  alg.selectionDecoration = inputLabel + ',as_char'
209  config.addOutputVar (self.photons.split('.')[0],
210  outputLabel + '_%SYS%',
211  select_or_decoration,
212  noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection,
213  enabled=(selectionName != ''))
214  if self.nominalOnlyUnifiedSelection:
215  alg.preselection = 'unifiedSelectForOR'
216 
217  muons = None
218  if self.muons != "" :
219  if self.nominalOnlyUnifiedSelection:
220  self.makeUnionPreselectionAlg(config, self.muons)
221  alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORMuonsSelectAlg' + postfix )
222  muons, alg.preselection = config.readNameAndSelection (self.muons)
223  alg.particles = muons
224  alg.selectionDecoration = inputLabel + ',as_char'
225  config.addOutputVar (self.muons.split('.')[0],
226  outputLabel + '_%SYS%',
227  select_or_decoration,
228  noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection,
229  enabled=(selectionName != ''))
230  if self.nominalOnlyUnifiedSelection:
231  alg.preselection = 'unifiedSelectForOR'
232 
233  taus = None
234  if self.taus != "" :
235  if self.nominalOnlyUnifiedSelection:
236  self.makeUnionPreselectionAlg(config, self.taus)
237  alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORTausSelectAlg' + postfix )
238  taus, alg.preselection = config.readNameAndSelection (self.taus)
239  alg.particles = taus
240  alg.selectionDecoration = inputLabel + ',as_char'
241  config.addOutputVar (self.taus.split('.')[0],
242  outputLabel + '_%SYS%',
243  select_or_decoration,
244  noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection,
245  enabled=(selectionName != ''))
246  if self.nominalOnlyUnifiedSelection:
247  alg.preselection = 'unifiedSelectForOR'
248 
249  jets = None
250  if self.jets != "" :
251  if self.nominalOnlyUnifiedSelection:
252  self.makeUnionPreselectionAlg(config, self.jets)
253  alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORJetsSelectAlg' + postfix )
254  jets, alg.preselection = config.readNameAndSelection (self.jets)
255  alg.particles = jets
256  alg.selectionDecoration = inputLabel + ',as_char'
257  config.addOutputVar (self.jets.split('.')[0],
258  outputLabel + '_%SYS%',
259  select_or_decoration,
260  noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection,
261  enabled=(selectionName != ''))
262  if self.nominalOnlyUnifiedSelection:
263  alg.preselection = 'unifiedSelectForOR'
264 
265  fatJets = None
266  if self.fatJets != "" :
267  if self.nominalOnlyUnifiedSelection:
268  self.makeUnionPreselectionAlg(config, self.fatJets)
269  alg = config.createAlgorithm( 'CP::AsgSelectionAlg','ORFatJetsSelectAlg' + postfix )
270  fatJets, alg.preselection = config.readNameAndSelection (self.fatJets)
271  alg.particles = fatJets
272  alg.selectionDecoration = inputLabel + ',as_char'
273  config.addOutputVar (self.fatJets.split('.')[0],
274  outputLabel + '_%SYS%',
275  select_or_decoration,
276  noSys=self.nominalOnly or self.nominalOnlyUnifiedSelection,
277  enabled=(selectionName != ''))
278  if self.nominalOnlyUnifiedSelection:
279  alg.preselection = 'unifiedSelectForOR'
280 
281 
282  # Create the overlap removal algorithm:
283  alg = config.createAlgorithm( 'CP::OverlapRemovalAlg', 'OverlapRemovalAlg' + postfix )
284  alg.OutputLabel = outputLabel
285  if self.nominalOnly or self.nominalOnlyUnifiedSelection :
286  alg.affectingSystematicsFilter = '.*'
287  if electrons :
288  alg.electrons = electrons
289  alg.electronsDecoration = outputLabel + '_%SYS%,as_char'
290  config.addSelection (self.electrons.split('.')[0], electronsSelectionName, alg.electronsDecoration, preselection=False, comesFrom='or')
291  if muons :
292  alg.muons = muons
293  alg.muonsDecoration = outputLabel + '_%SYS%,as_char'
294  config.addSelection (self.muons.split('.')[0], muonsSelectionName, alg.muonsDecoration, preselection=False, comesFrom='or')
295  if taus :
296  alg.taus = taus
297  alg.tausDecoration = outputLabel + '_%SYS%,as_char'
298  config.addSelection (self.taus.split('.')[0], tausSelectionName, alg.tausDecoration, preselection=False, comesFrom='or')
299  if jets :
300  alg.jets = jets
301  alg.jetsDecoration = outputLabel + '_%SYS%,as_char'
302  config.addSelection (self.jets.split('.')[0], jetsSelectionName, alg.jetsDecoration, preselection=False, comesFrom='or')
303  if photons :
304  alg.photons = photons
305  alg.photonsDecoration = outputLabel + '_%SYS%,as_char'
306  config.addSelection (self.photons.split('.')[0], photonsSelectionName, alg.photonsDecoration, preselection=False, comesFrom='or')
307  if fatJets :
308  alg.fatJets = fatJets
309  alg.fatJetsDecoration = outputLabel + '_%SYS%,as_char'
310  config.addSelection (self.fatJets.split('.')[0], fatJetsSelectionName, alg.fatJetsDecoration, preselection=False, comesFrom='or')
311 
312  # Create its main tool, and set its basic properties:
313  config.addPrivateTool( 'overlapTool', 'ORUtils::OverlapRemovalTool' )
314  alg.overlapTool.InputLabel = inputLabel
315  alg.overlapTool.OutputLabel = outputLabel
316 
317  # By default the OverlapRemovalTool would flag objects that need to be
318  # suppressed, with a "true" value. But since the analysis algorithms expect
319  # the opposite behaviour from selection flags, we need to tell the tool
320  # explicitly to use the "true" flag on objects that pass the overlap
321  # removal.
322  alg.overlapTool.OutputPassValue = True
323 
324  # Set up the electron-electron overlap removal, if requested.
325  if electrons and self.doEleEleOR:
326  config.addPrivateTool( 'overlapTool.EleEleORT',
327  'ORUtils::EleEleOverlapTool' )
328  alg.overlapTool.EleEleORT.InputLabel = inputLabel
329  alg.overlapTool.EleEleORT.OutputLabel = outputLabel
330  alg.overlapTool.EleEleORT.LinkOverlapObjects = self.linkOverlapObjects
331  alg.overlapTool.EleEleORT.OutputPassValue = True
332 
333  # Set up the electron-muon overlap removal.
334  if electrons and muons and self.doEleMuOR:
335  config.addPrivateTool( 'overlapTool.EleMuORT',
336  'ORUtils::EleMuSharedTrkOverlapTool' )
337  alg.overlapTool.EleMuORT.InputLabel = inputLabel
338  alg.overlapTool.EleMuORT.OutputLabel = outputLabel
339  alg.overlapTool.EleMuORT.LinkOverlapObjects = self.linkOverlapObjects
340  alg.overlapTool.EleMuORT.OutputPassValue = True
341 
342  # Set up the electron-(narrow-)jet overlap removal.
343  if electrons and jets and self.doEleJetOR:
344  config.addPrivateTool( 'overlapTool.EleJetORT',
345  'ORUtils::EleJetOverlapTool' )
346  alg.overlapTool.EleJetORT.InputLabel = inputLabel
347  alg.overlapTool.EleJetORT.OutputLabel = outputLabel
348  alg.overlapTool.EleJetORT.LinkOverlapObjects = self.linkOverlapObjects
349  alg.overlapTool.EleJetORT.BJetLabel = self.bJetLabel
350  alg.overlapTool.EleJetORT.UseSlidingDR = self.boostedLeptons
351  alg.overlapTool.EleJetORT.EnableUserPriority = self.enableUserPriority
352  alg.overlapTool.EleJetORT.OutputPassValue = True
353 
354  # Set up the muon-(narrow-)jet overlap removal.
355  if muons and jets and self.doMuJetOR:
356  config.addPrivateTool( 'overlapTool.MuJetORT',
357  'ORUtils::MuJetOverlapTool' )
358  alg.overlapTool.MuJetORT.InputLabel = inputLabel
359  alg.overlapTool.MuJetORT.OutputLabel = outputLabel
360  alg.overlapTool.MuJetORT.LinkOverlapObjects = self.linkOverlapObjects
361  alg.overlapTool.MuJetORT.BJetLabel = self.bJetLabel
362  alg.overlapTool.MuJetORT.UseSlidingDR = self.boostedLeptons
363  alg.overlapTool.MuJetORT.EnableUserPriority = self.enableUserPriority
364  alg.overlapTool.MuJetORT.OutputPassValue = True
365 
366  # Set up the tau-electron overlap removal.
367  if taus and electrons and self.doTauEleOR:
368  config.addPrivateTool( 'overlapTool.TauEleORT',
369  'ORUtils::DeltaROverlapTool' )
370  alg.overlapTool.TauEleORT.InputLabel = inputLabel
371  alg.overlapTool.TauEleORT.OutputLabel = outputLabel
372  alg.overlapTool.TauEleORT.LinkOverlapObjects = self.linkOverlapObjects
373  alg.overlapTool.TauEleORT.DR = 0.2
374  alg.overlapTool.TauEleORT.OutputPassValue = True
375 
376  # Set up the tau-muon overlap removal.
377  if taus and muons and self.doTauMuOR:
378  config.addPrivateTool( 'overlapTool.TauMuORT',
379  'ORUtils::DeltaROverlapTool' )
380  alg.overlapTool.TauMuORT.InputLabel = inputLabel
381  alg.overlapTool.TauMuORT.OutputLabel = outputLabel
382  alg.overlapTool.TauMuORT.LinkOverlapObjects = self.linkOverlapObjects
383  alg.overlapTool.TauMuORT.DR = 0.2
384  alg.overlapTool.TauMuORT.OutputPassValue = True
385 
386  # Set up the tau-(narrow-)jet overlap removal.
387  if taus and jets and self.doTauJetOR:
388  if self.doTauAntiTauJetOR:
389  config.addPrivateTool( 'overlapTool.TauJetORT',
390  'ORUtils::TauAntiTauJetOverlapTool' )
391  alg.overlapTool.TauJetORT.TauLabel = self.antiTauIDTauLabel
392  alg.overlapTool.TauJetORT.AntiTauLabel = self.antiTauLabel
393  alg.overlapTool.TauJetORT.BJetLabel = self.antiTauBJetLabel
394  else:
395  config.addPrivateTool( 'overlapTool.TauJetORT',
396  'ORUtils::DeltaROverlapTool' )
397 
398  alg.overlapTool.TauJetORT.InputLabel = inputLabel
399  alg.overlapTool.TauJetORT.OutputLabel = outputLabel
400  alg.overlapTool.TauJetORT.LinkOverlapObjects = self.linkOverlapObjects
401  alg.overlapTool.TauJetORT.DR = 0.2
402  alg.overlapTool.TauJetORT.EnableUserPriority = self.enableUserPriority
403  alg.overlapTool.TauJetORT.OutputPassValue = True
404 
405  # Set up the photon-electron overlap removal.
406  if photons and electrons and self.doPhEleOR:
407  config.addPrivateTool( 'overlapTool.PhoEleORT',
408  'ORUtils::DeltaROverlapTool' )
409  alg.overlapTool.PhoEleORT.InputLabel = inputLabel
410  alg.overlapTool.PhoEleORT.OutputLabel = outputLabel
411  alg.overlapTool.PhoEleORT.LinkOverlapObjects = self.linkOverlapObjects
412  alg.overlapTool.PhoEleORT.OutputPassValue = True
413 
414  # Set up the photon-muon overlap removal.
415  if photons and muons and self.doPhMuOR:
416  config.addPrivateTool( 'overlapTool.PhoMuORT',
417  'ORUtils::DeltaROverlapTool' )
418  alg.overlapTool.PhoMuORT.InputLabel = inputLabel
419  alg.overlapTool.PhoMuORT.OutputLabel = outputLabel
420  alg.overlapTool.PhoMuORT.LinkOverlapObjects = self.linkOverlapObjects
421  alg.overlapTool.PhoMuORT.OutputPassValue = True
422 
423  # Set up the photon-(narrow-)jet overlap removal.
424  if photons and jets and self.doPhJetOR:
425  config.addPrivateTool( 'overlapTool.PhoJetORT',
426  'ORUtils::DeltaROverlapTool' )
427  alg.overlapTool.PhoJetORT.InputLabel = inputLabel
428  alg.overlapTool.PhoJetORT.OutputLabel = outputLabel
429  alg.overlapTool.PhoJetORT.LinkOverlapObjects = self.linkOverlapObjects
430  alg.overlapTool.PhoJetORT.EnableUserPriority = self.enableUserPriority
431  alg.overlapTool.PhoJetORT.OutputPassValue = True
432 
433  # Set up the electron-fat-jet overlap removal.
434  if electrons and fatJets and self.doEleFatJetOR:
435  config.addPrivateTool( 'overlapTool.EleFatJetORT',
436  'ORUtils::DeltaROverlapTool' )
437  alg.overlapTool.EleFatJetORT.InputLabel = inputLabel
438  alg.overlapTool.EleFatJetORT.OutputLabel = outputLabel
439  alg.overlapTool.EleFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
440  alg.overlapTool.EleFatJetORT.DR = 1.0
441  alg.overlapTool.EleFatJetORT.OutputPassValue = True
442 
443  # Set up the (narrow-)jet-fat-jet overlap removal.
444  if jets and fatJets and self.doJetFatJetOR:
445  config.addPrivateTool( 'overlapTool.JetFatJetORT',
446  'ORUtils::DeltaROverlapTool' )
447  alg.overlapTool.JetFatJetORT.InputLabel = inputLabel
448  alg.overlapTool.JetFatJetORT.OutputLabel = outputLabel
449  alg.overlapTool.JetFatJetORT.LinkOverlapObjects = self.linkOverlapObjects
450  alg.overlapTool.JetFatJetORT.DR = 1.0
451  alg.overlapTool.JetFatJetORT.OutputPassValue = True
452 
453  if self.nominalOnly or self.nominalOnlyUnifiedSelection :
454  if electrons :
455  alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORElectronsCopyAlg' + postfix)
456  alg.particles = electrons
457  alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
458  if muons :
459  alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORMuonsCopyAlg' + postfix)
460  alg.particles = muons
461  alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
462  if taus :
463  alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORTausCopyAlg' + postfix)
464  alg.particles = taus
465  alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
466  if jets :
467  alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORJetsCopyAlg' + postfix)
468  alg.particles = jets
469  alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
470  if photons :
471  alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORPhotonsCopyAlg' + postfix)
472  alg.particles = photons
473  alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
474  if fatJets :
475  alg = config.createAlgorithm( 'CP::CopyNominalSelectionAlg', 'ORFatJetsCopyAlg' + postfix)
476  alg.particles = fatJets
477  alg.selectionDecoration = outputLabel + '_%SYS%,as_char'
478 
479  # provide a preselection if requested
480  if self.addPreselection:
481  if self.preselectLabel is not None :
482  preselectLabel = self.preselectLabel
483  else :
484  preselectLabel = outputLabel
485 
486  if electrons :
487  alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORElectronsPreselectionAlg' + postfix )
488  alg.particles = electrons
489  alg.preselection = '&&'.join (config.getPreselection (self.electrons.split('.')[0], electronsSelectionName, asList=True)
490  + [outputLabel + '_%SYS%,as_char'])
491  alg.selectionDecoration = preselectLabel
492  config.addSelection (self.electrons.split('.')[0], electronsSelectionName, alg.selectionDecoration+',as_char', bits=1, preselection=True, comesFrom='or')
493  if muons :
494  alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORMuonsPreselectionAlg' + postfix )
495  alg.particles = muons
496  alg.preselection = '&&'.join (config.getPreselection (self.muons.split('.')[0], muonsSelectionName, asList=True)
497  + [outputLabel + '_%SYS%,as_char'])
498  alg.selectionDecoration = preselectLabel
499  config.addSelection (self.muons.split('.')[0], muonsSelectionName, alg.selectionDecoration+',as_char', bits=1, preselection=True, comesFrom='or')
500  if taus :
501  alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORTausPreselectionAlg' + postfix )
502  alg.particles = taus
503  alg.preselection = '&&'.join (config.getPreselection (self.taus.split('.')[0], tausSelectionName, asList=True)
504  + [outputLabel + '_%SYS%,as_char'])
505  alg.selectionDecoration = preselectLabel
506  config.addSelection (self.taus.split('.')[0], tausSelectionName, alg.selectionDecoration+',as_char', bits=1, preselection=True, comesFrom='or')
507  if jets :
508  alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORJetsPreselectionAlg' + postfix )
509  alg.particles = jets
510  alg.preselection = '&&'.join (config.getPreselection (self.jets.split('.')[0], jetsSelectionName, asList=True)
511  + [outputLabel + '_%SYS%,as_char'])
512  alg.selectionDecoration = preselectLabel
513  config.addSelection (self.jets.split('.')[0], jetsSelectionName, alg.selectionDecoration+',as_char', bits=1, preselection=True, comesFrom='or')
514  if photons :
515  alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORPhotonsPreselectionAlg' + postfix )
516  alg.particles = photons
517  alg.preselection = '&&'.join (config.getPreselection (self.photons.split('.')[0], photonsSelectionName, asList=True)
518  + [outputLabel + '_%SYS%,as_char'])
519  alg.selectionDecoration = preselectLabel
520  config.addSelection (self.photons.split('.')[0], photonsSelectionName, alg.selectionDecoration+',as_char', bits=1, preselection=True, comesFrom='or')
521  if fatJets :
522  alg = config.createAlgorithm( 'CP::AsgUnionPreselectionAlg','ORFatJetsPreselectionAlg' + postfix )
523  alg.particles = fatJets
524  alg.preselection = '&&'.join (config.getPreselection (self.fatJets.split('.')[0], fatJetsSelectionName, asList=True)
525  + [outputLabel + '_%SYS%,as_char'])
526  alg.selectionDecoration = preselectLabel
527  config.addSelection (self.fatJets.split('.')[0], fatJetsSelectionName, alg.selectionDecoration+',as_char', bits=1, preselection=True, comesFrom='or')
528 
529 
530 

◆ makeUnionPreselectionAlg()

def python.OverlapAnalysisConfig.OverlapAnalysisConfig.makeUnionPreselectionAlg (   self,
  config,
  inputCollection 
)
Create a new selection for the inputCollection ('container.selection')
that is the union over all systematics of 'selection'. This allows us
to run nominal-only overlap removal while taking into account the impact
of systematics on object acceptance.

Definition at line 94 of file OverlapAnalysisConfig.py.

94  def makeUnionPreselectionAlg(self, config, inputCollection):
95  """
96  Create a new selection for the inputCollection ('container.selection')
97  that is the union over all systematics of 'selection'. This allows us
98  to run nominal-only overlap removal while taking into account the impact
99  of systematics on object acceptance.
100  """
101  container, selection = config.readNameAndSelection( inputCollection )
102  alg = config.createAlgorithm( 'CP::AsgUnionSelectionAlg', 'UnionSelectionAlgForOR_' + inputCollection.split(".")[0] )
103  alg.preselection = selection
104  alg.particles = container
105  alg.selectionDecoration = 'unifiedSelectForOR'
106 

The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
Trk::split
@ split
Definition: LayerMaterialProperties.h:38