16 **kwargs):
17
18 """
19 Provides the pre-configured overlap removal recommendations.
20 All overlap tools will be (private) added to the master tool
21 which is then returned by this function.
22
23 Arguments:
24 masterName - set the name of the master tool.
25 inputLabel - set the InputLabel property for all tools.
26 outputLabel - set the OutputLabel property for all tools.
27 bJetLabel - set user bjet decoration name. Leave blank to
28 disable btag-aware overlap removal.
29 maxElePtForBJetAwareOR - set the maximum electron pT for which b-tag
30 aware overlap removal is done. Set to negative
31 value to use for all electrons.
32 boostedLeptons - enable sliding dR cones for boosted lepton
33 analyses.
34 outputPassValue - set the OutputPassValue property for all tools
35 which determines whether passing objects are
36 marked with true or false.
37 linkOverlapObjects - enable ElementLinks to overlap objects.
38 doEleEleOR - enable electron-electron overlap removal.
39 doXXXX - these flags enable/disable object types to
40 configure tools for: doElectrons, doMuons,
41 doJets, doTaus, doPhotons, doFatJets.
42 kwargs - additional properties to be applied to all tools.
43 For example: OutputLevel.
44 """
45
46
47 common_args = {
48 'InputLabel' : inputLabel,
49 'OutputLabel' : outputLabel,
50 'OutputPassValue' : outputPassValue
51 }
52
53 common_args.update(kwargs)
54
55
56 orTool = CompFactory.ORUtils.OverlapRemovalTool(masterName, **common_args)
57
58
59 common_args['LinkOverlapObjects'] = linkOverlapObjects
60
61
62 if doElectrons and doEleEleOR:
63 orTool.EleEleORT = CompFactory.ORUtils.EleEleOverlapTool('EleEleORT', **common_args)
64
65
66 if doElectrons and doMuons:
67 orTool.EleMuORT = CompFactory.ORUtils.EleMuSharedTrkOverlapTool('EleMuORT', **common_args)
68
69 if doElectrons and doJets:
70 orTool.EleJetORT = CompFactory.ORUtils.EleJetOverlapTool('EleJetORT',
71 BJetLabel=bJetLabel,
72 MaxElePtForBJetAwareOR=maxElePtForBJetAwareOR,
73 UseSlidingDR=boostedLeptons,
74 DoFEOR=doFEOR,
75 **common_args)
76
77 if doMuons and doJets:
78 orTool.MuJetORT = CompFactory.ORUtils.MuJetOverlapTool('MuJetORT',
79 BJetLabel=bJetLabel,
80 UseSlidingDR=boostedLeptons,
81 DoFEOR=doFEOR,
82 **common_args)
83
84
85 if doTaus and doElectrons:
86 if doFEOR :
87 orTool.TauEleORT = CompFactory.ORUtils.FEOverlapTool('TauEleORT', **common_args)
88 else :
89 orTool.TauEleORT = CompFactory.ORUtils.DeltaROverlapTool('TauEleORT', DR=0.2, **common_args)
90
91 if doTaus and doMuons:
92 if doFEOR :
93 orTool.TauMuORT = CompFactory.ORUtils.FEOverlapTool('TauMuORT', **common_args)
94 else :
95 orTool.TauMuORT = CompFactory.ORUtils.DeltaROverlapTool('TauMuORT', DR=0.2, **common_args)
96
97 if doTaus and doJets:
98 if doFEOR :
99 orTool.TauJetORT = CompFactory.ORUtils.FEOverlapTool('TauJetORT', **common_args)
100 else :
101 orTool.TauJetORT = CompFactory.ORUtils.DeltaROverlapTool('TauJetORT', DR=0.2, **common_args)
102
103
104 if doPhotons and doElectrons:
105 if doFEOR :
106 orTool.PhoEleORT = CompFactory.ORUtils.FEOverlapTool('PhoEleORT', **common_args)
107 else :
108 orTool.PhoEleORT = CompFactory.ORUtils.DeltaROverlapTool('PhoEleORT', **common_args)
109
110 if doPhotons and doMuons:
111 if doFEOR :
112 orTool.PhoMuORT = CompFactory.ORUtils.FEOverlapTool('PhoMuORT', **common_args)
113 else :
114 orTool.PhoMuORT = CompFactory.ORUtils.DeltaROverlapTool('PhoMuORT', **common_args)
115
116 if doPhotons and doJets:
117 if doFEOR :
118 orTool.PhoJetORT = CompFactory.ORUtils.FEOverlapTool('PhoJetORT', **common_args)
119 else :
120 orTool.PhoJetORT = CompFactory.ORUtils.DeltaROverlapTool('PhoJetORT', **common_args)
121
122
123 if doElectrons and doFatJets:
124 orTool.EleFatJetORT = CompFactory.ORUtils.DeltaROverlapTool('EleFatJetORT', DR=1.0, **common_args)
125
126 if doJets and doFatJets:
127 orTool.JetFatJetORT = CompFactory.ORUtils.DeltaROverlapTool('JetFatJetORT', DR=1.0, **common_args)
128
129 acc = ComponentAccumulator()
130 acc.setPrivateTools(orTool)
131 return acc
132