ATLAS Offline Software
Public Member Functions | Public Attributes | 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)
 

Public Attributes

 addToAllSelections
 
 addPreselection
 

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', None, type=bool,
50  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.")
51  self.addOption ('addPreselection', None, type=bool,
52  info="add preselection decorations without systematics. If set To 'None', will be turned on in case of multiple Overlap Removal setups.")
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  self.addOption ('favourPhotonOverLepton', False, type=bool,
94  info="whether to give priority to photons in OR. The default is False.")
95 

Member Function Documentation

◆ makeAlgs()

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

Definition at line 109 of file OverlapAnalysisConfig.py.

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

◆ 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 96 of file OverlapAnalysisConfig.py.

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

Member Data Documentation

◆ addPreselection

python.OverlapAnalysisConfig.OverlapAnalysisConfig.addPreselection

Definition at line 124 of file OverlapAnalysisConfig.py.

◆ addToAllSelections

python.OverlapAnalysisConfig.OverlapAnalysisConfig.addToAllSelections

Definition at line 122 of file OverlapAnalysisConfig.py.


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