1 import FWCore.ParameterSet.Config
as cms
5 etBinsStd=cms.vdouble(5,10,12.5,15,17.5,20,22.5,25,30,35,40,45,50,60,80,100,150,200,250,300,350,400)
6 scEtaBinsStd = cms.vdouble(-2.5,-2.4,-2.3,-2.2,-2.1,-2.0,-1.9,-1.8,-1.7,-1.566,-1.4442,-1.3,-1.2,-1.1,-1.0,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4442,1.566,1.7,1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5)
7 phiBinsStd = cms.vdouble(-3.32,-2.97,-2.62,-2.27,-1.92,-1.57,-1.22,-0.87,-0.52,-0.18,0.18,0.52,0.87,1.22,1.57,1.92,2.27,2.62,2.97,3.32)
10 rangeVar=cms.string(
"et"),
11 allowedRanges=cms.vstring(
"0:10000"),
13 ecalBarrelEtaCut=cms.PSet(
14 rangeVar=cms.string(
"scEta"),
15 allowedRanges=cms.vstring(
"-1.4442:1.4442")
17 ecalEndcapEtaCut=cms.PSet(
18 rangeVar=cms.string(
"scEta"),
19 allowedRanges=cms.vstring(
"-2.5:-1.556",
"1.556:2.5")
21 ecalBarrelAndEndcapEtaCut = cms.PSet(
22 rangeVar=cms.string(
"scEta"),
23 allowedRanges=cms.vstring(
"-1.4442:1.4442",
"-2.5:-1.556",
"1.556:2.5"),
25 hcalPosEtaCut= cms.PSet(
26 rangeVar=cms.string(
"scEta"),
27 allowedRanges=cms.vstring(
"1.3:1.4442",
"1.556:2.5"),
29 hcalNegEtaCut= cms.PSet(
30 rangeVar=cms.string(
"scEta"),
31 allowedRanges=cms.vstring(
"-2.5:-1.556",
"-1.4442:-1.3"),
33 hcalPhi17Cut = cms.PSet(
34 rangeVar=cms.string(
"phi"),
35 allowedRanges=cms.vstring(
"-0.87:-0.52"),
39 tagAndProbeConfigEle27WPTight = cms.PSet(
40 trigEvent = cms.InputTag(
"hltTriggerSummaryAOD",
"",
"HLT"),
41 objColl = cms.InputTag(
"gedGsfElectrons"),
42 tagVIDCuts = cms.InputTag(
"egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-tight"),
43 probeVIDCuts = cms.InputTag(
"egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-tight"),
44 sampleTrigRequirements = cms.PSet(
45 hltInputTag = cms.InputTag(
"TriggerResults",
"",
"HLT"),
46 hltPaths = cms.vstring(
"HLT_Ele27_WPTight_Gsf_v*",
"HLT_Ele32_WPTight_Gsf_v*",
"HLT_Ele35_WPTight_Gsf_v*" 47 "HLT_Ele38_WPTight_Gsf_v*",
48 "HLT_Ele27_WPTight_Gsf_L1DoubleEG_v*",
"HLT_Ele32_WPTight_Gsf_L1DoubleEG_v*",
52 tagFilters = cms.vstring(
"hltEle27WPTightGsfTrackIsoFilter",
53 "hltEle32noerWPTightGsfTrackIsoFilter" 54 "hltEle35noerWPTightGsfTrackIsoFilter" 55 "hltEle38noerWPTightGsfTrackIsoFilter" 56 "hltEle27L1DoubleEGWPTightGsfTrackIsoFilter",
57 "hltEle32L1DoubleEGWPTightGsfTrackIsoFilter" ),
58 tagFiltersORed = cms.bool(
True),
59 tagRangeCuts = cms.VPSet(ecalBarrelEtaCut),
60 probeFilters = cms.vstring(),
61 probeFiltersORed = cms.bool(
False),
62 probeRangeCuts = cms.VPSet(ecalBarrelAndEndcapEtaCut),
63 minMass = cms.double(70.0),
64 maxMass = cms.double(110.0),
65 requireOpSign = cms.bool(
False),
71 tagAndProbeConfigEle27WPTightHEP17 = tagAndProbeConfigEle27WPTight.clone(
72 probeRangeCuts = cms.VPSet(
76 tagAndProbeConfigEle27WPTightHEM17 = tagAndProbeConfigEle27WPTight.clone(
77 probeRangeCuts = cms.VPSet(
83 egammaStdHistConfigs = cms.VPSet(
85 histType=cms.string(
"1D"),
86 vsVar=cms.string(
"et"),
87 nameSuffex=cms.string(
"_EBvsEt"),
88 rangeCuts=cms.VPSet(ecalBarrelEtaCut),
89 binLowEdges=etBinsStd,
92 histType=cms.string(
"1D"),
93 vsVar=cms.string(
"et"),
94 nameSuffex=cms.string(
"_EEvsEt"),
95 rangeCuts=cms.VPSet(ecalEndcapEtaCut),
96 binLowEdges=etBinsStd,
99 histType=cms.string(
"1D"),
100 vsVar=cms.string(
"scEta"),
101 nameSuffex=cms.string(
"_vsSCEta"),
102 rangeCuts=cms.VPSet(),
103 binLowEdges=scEtaBinsStd,
106 histType=cms.string(
"1D"),
107 vsVar=cms.string(
"phi"),
108 nameSuffex=cms.string(
"_EBvsPhi"),
109 rangeCuts=cms.VPSet(ecalBarrelEtaCut),
110 binLowEdges=phiBinsStd,
113 histType=cms.string(
"1D"),
114 vsVar=cms.string(
"phi"),
115 nameSuffex=cms.string(
"_EEvsPhi"),
116 rangeCuts=cms.VPSet(ecalEndcapEtaCut),
117 binLowEdges=phiBinsStd,
120 histType=cms.string(
"2D"),
121 xVar=cms.string(
"scEta"),
122 yVar=cms.string(
"phi"),
123 nameSuffex=cms.string(
"_vsSCEtaPhi"),
124 rangeCuts=cms.VPSet(),
125 xBinLowEdges=scEtaBinsStd,
126 yBinLowEdges=phiBinsStd,
131 egammaStdFiltersToMonitor= cms.VPSet(
133 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DoubleEle33_CaloIdL_MW"),
134 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"40:99999")),),
135 filterName = cms.string(
"hltEle33CaloIdLMWPMS2Filter"),
136 histTitle = cms.string(
""),
137 tagExtraFilter = cms.string(
""),
140 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DoubleEle33_CaloIdL_MW"),
141 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"40:99999")),),
142 filterName = cms.string(
"hltDiEle33CaloIdLMWPMS2UnseededFilter"),
143 histTitle = cms.string(
""),
144 tagExtraFilter = cms.string(
"hltEle33CaloIdLMWPMS2Filter"),
147 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon300_NoHE"),
148 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"320:99999")),),
149 filterName = cms.string(
"hltEG300erFilter"),
150 histTitle = cms.string(
""),
151 tagExtraFilter = cms.string(
""),
154 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DoublePhoton70"),
155 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"80:99999")),),
156 filterName = cms.string(
"hltEG70HEFilter"),
157 histTitle = cms.string(
""),
158 tagExtraFilter = cms.string(
""),
161 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DoublePhoton70"),
162 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"80:99999")),),
163 filterName = cms.string(
"hltDiEG70HEUnseededFilter"),
164 histTitle = cms.string(
""),
165 tagExtraFilter = cms.string(
"hltEG70HEFilter"),
168 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DoublePhoton85"),
169 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"90:99999")),),
170 filterName = cms.string(
"hltEG85HEFilter"),
171 histTitle = cms.string(
""),
172 tagExtraFilter = cms.string(
""),
175 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DoublePhoton85"),
176 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"80:99999")),),
177 filterName = cms.string(
"hltDiEG85HEUnseededFilter"),
178 histTitle = cms.string(
""),
179 tagExtraFilter = cms.string(
"hltEG85HEFilter"),
183 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DiSC30_18_EIso_AND_HE_Mass70"),
184 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"35:99999")),),
185 filterName = cms.string(
"hltEG30EIso15HE30EcalIsoLastFilter"),
186 histTitle = cms.string(
""),
187 tagExtraFilter = cms.string(
""),
190 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_DiSC30_18_EIso_AND_HE_Mass70"),
191 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"35:99999")),),
192 filterName = cms.string(
"hltEG18EIso15HE30EcalIsoUnseededFilter"),
193 histTitle = cms.string(
""),
194 tagExtraFilter = cms.string(
"hltEG30EIso15HE30EcalIsoLastFilter"),
197 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele23_Ele12_CaloIdL_TrackIdL_IsoVL"),
198 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"26:99999")),),
199 filterName = cms.string(
"hltEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg1Filter"),
200 histTitle = cms.string(
""),
201 tagExtraFilter = cms.string(
""),
204 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele23_Ele12_CaloIdL_TrackIdL_IsoVL"),
205 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"15:99999")),),
206 filterName = cms.string(
"hltEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg2Filter"),
207 histTitle = cms.string(
""),
208 tagExtraFilter = cms.string(
""),
211 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele27_WPTight_Gsf"),
212 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"30:99999")),),
213 filterName = cms.string(
"hltEle27WPTightGsfTrackIsoFilter"),
214 histTitle = cms.string(
""),
215 tagExtraFilter = cms.string(
""),
218 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele32_WPTight_Gsf"),
219 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"35:99999")),),
220 filterName = cms.string(
"hltEle32noerWPTightGsfTrackIsoFilter"),
221 histTitle = cms.string(
""),
222 tagExtraFilter = cms.string(
""),
225 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele35_WPTight_Gsf"),
226 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"42:99999")),),
227 filterName = cms.string(
"hltEle35noerWPTightGsfTrackIsoFilter"),
228 histTitle = cms.string(
""),
229 tagExtraFilter = cms.string(
""),
232 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele38_WPTight_Gsf"),
233 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"42:99999")),),
234 filterName = cms.string(
"hltEle38noerWPTightGsfTrackIsoFilter"),
235 histTitle = cms.string(
""),
236 tagExtraFilter = cms.string(
""),
239 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele27_WPTight_Gsf_L1DoubleEG"),
240 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"30:99999")),),
241 filterName = cms.string(
"hltEle27L1DoubleEGWPTightGsfTrackIsoFilter"),
242 histTitle = cms.string(
""),
243 tagExtraFilter = cms.string(
""),
246 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Ele32_WPTight_Gsf_L1DoubleEG"),
247 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"35:99999")),),
248 filterName = cms.string(
"hltEle32L1DoubleEGWPTightGsfTrackIsoFilter"),
249 histTitle = cms.string(
""),
250 tagExtraFilter = cms.string(
""),
253 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon33"),
254 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"35:99999")),),
255 filterName = cms.string(
"hltEG33L1EG26HEFilter"),
256 histTitle = cms.string(
""),
257 tagExtraFilter = cms.string(
""),
260 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon50"),
261 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"55:99999")),),
262 filterName = cms.string(
"hltEG50HEFilter"),
263 histTitle = cms.string(
""),
264 tagExtraFilter = cms.string(
""),
267 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon75"),
268 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"80:99999")),),
269 filterName = cms.string(
"hltEG75HEFilter"),
270 histTitle = cms.string(
""),
271 tagExtraFilter = cms.string(
""),
274 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon90"),
275 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"95:99999")),),
276 filterName = cms.string(
"hltEG90HEFilter"),
277 histTitle = cms.string(
""),
278 tagExtraFilter = cms.string(
""),
281 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon120"),
282 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"95:99999")),),
283 filterName = cms.string(
"hltEG120HEFilter"),
284 histTitle = cms.string(
""),
285 tagExtraFilter = cms.string(
""),
288 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon150"),
289 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"160:99999")),),
290 filterName = cms.string(
"hltEG150HEFilter"),
291 histTitle = cms.string(
""),
292 tagExtraFilter = cms.string(
""),
295 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon175"),
296 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"180:99999")),),
297 filterName = cms.string(
"hltEG175HEFilter"),
298 histTitle = cms.string(
""),
299 tagExtraFilter = cms.string(
""),
302 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_Photon200"),
303 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"220:99999")),),
304 filterName = cms.string(
"hltEG200HEFilter"),
305 histTitle = cms.string(
""),
306 tagExtraFilter = cms.string(
""),
309 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_CaloJet500"),
310 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"500:99999")),),
311 filterName = cms.string(
"hltSingleCaloJet500"),
312 histTitle = cms.string(
""),
313 tagExtraFilter = cms.string(
""),
316 folderName = cms.string(
"HLT/EGTagAndProbeEffs/HLT_CaloJet550"),
317 rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring(
"550:99999")),),
318 filterName = cms.string(
"hltSingleCaloJet550"),
319 histTitle = cms.string(
""),
320 tagExtraFilter = cms.string(
""),
327 egHLTDQMOfflineTnPSource = cms.EDAnalyzer(
"HLTEleTagAndProbeOfflineSource",
328 tagAndProbeCollections = cms.VPSet(
330 tagAndProbeConfigEle27WPTight,
331 histConfigs = egammaStdHistConfigs,
332 baseHistName = cms.string(
"eleWPTightTag_"),
333 filterConfigs = egammaStdFiltersToMonitor,
336 tagAndProbeConfigEle27WPTightHEM17,
337 histConfigs = egammaStdHistConfigs,
338 baseHistName = cms.string(
"eleWPTightTag-HEM17_"),
339 filterConfigs = egammaStdFiltersToMonitor,
342 tagAndProbeConfigEle27WPTightHEP17,
343 histConfigs = egammaStdHistConfigs,
344 baseHistName = cms.string(
"eleWPTightTag-HEP17_"),
345 filterConfigs = egammaStdFiltersToMonitor,
351 from RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cff
import egmGsfElectronIDs
353 egmGsfElectronIDsForDQM = egmGsfElectronIDs.clone()
354 egmGsfElectronIDsForDQM.physicsObjectsIDs = cms.VPSet()
355 egmGsfElectronIDsForDQM.physicsObjectSrc == cms.InputTag(
'gedGsfElectrons')
359 my_id_modules = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff']
360 for id_module_name
in my_id_modules:
361 idmod= __import__(id_module_name, globals(), locals(), [
'idName',
'cutFlow'])
362 for name
in dir(idmod):
363 item = getattr(idmod,name)
364 if hasattr(item,
'idName')
and hasattr(item,
'cutFlow'):