CMS 3D CMS Logo

heepElectronID_tools.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Define eta constants
4 ebMax = 1.4442
5 eeMin = 1.566
6 ebCutOff=1.479
7 
8 
9 # ===============================================
10 # Define containers used by cut definitions
11 # ===============================================
12 
14  """
15  This is a container class to hold numerical cut values for either
16  the barrel or endcap set of cuts
17  """
18  def __init__(self,
19  idName,
20  dEtaInSeedCut,
21  dPhiInCut,
22  full5x5SigmaIEtaIEtaCut,
23  # Two constants for the GsfEleFull5x5E2x5OverE5x5Cut
24  minE1x5OverE5x5Cut,
25  minE2x5OverE5x5Cut,
26  # Three constants for the GsfEleHadronicOverEMLinearCut:
27  # cut = constTerm if value < slopeStart
28  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
29  hOverESlopeTerm,
30  hOverESlopeStart,
31  hOverEConstTerm,
32  # Three constants for the GsfEleTrkPtIsoCut:
33  # cut = constTerm if value < slopeStart
34  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
35  trkIsoSlopeTerm,
36  trkIsoSlopeStart,
37  trkIsoConstTerm,
38  # Three constants for the GsfEleEmHadD1IsoRhoCut:
39  # cut = constTerm if value < slopeStart
40  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
41  # Also for the same cut, the effective area for the rho correction of the isolation
42  ehIsoSlopeTerm,
43  ehIsoSlopeStart,
44  ehIsoConstTerm,
45  effAreaForEHIso,
46  # other cuts:
47  dxyCut,
48  maxMissingHitsCut,
49  ecalDrivenCut
50  ):
51  # assign values taken from all the arguments above
52  self.idName = idName
53  self.dEtaInSeedCut = dEtaInSeedCut
54  self.dPhiInCut = dPhiInCut
55  self.full5x5SigmaIEtaIEtaCut = full5x5SigmaIEtaIEtaCut
56  self.minE1x5OverE5x5Cut = minE1x5OverE5x5Cut
57  self.minE2x5OverE5x5Cut = minE2x5OverE5x5Cut
58  self.hOverESlopeTerm = hOverESlopeTerm
59  self.hOverESlopeStart = hOverESlopeStart
60  self.hOverEConstTerm = hOverEConstTerm
61  self.trkIsoSlopeTerm = trkIsoSlopeTerm
62  self.trkIsoSlopeStart = trkIsoSlopeStart
63  self.trkIsoConstTerm = trkIsoConstTerm
64  self.ehIsoSlopeTerm = ehIsoSlopeTerm
65  self.ehIsoSlopeStart = ehIsoSlopeStart
66  self.ehIsoConstTerm = ehIsoConstTerm
67  self.effAreaForEHIso = effAreaForEHIso
68  self.dxyCut = dxyCut
69  self.maxMissingHitsCut = maxMissingHitsCut
70  self.ecalDrivenCut = ecalDrivenCut
71 
73  """
74  This is a container class to hold numerical cut values for either
75  the barrel or endcap set of cuts
76  """
77  def __init__(self,
78  idName,
79  dEtaInSeedCut,
80  dPhiInCut,
81  full5x5SigmaIEtaIEtaCut,
82  # Two constants for the GsfEleFull5x5E2x5OverE5x5Cut
83  minE1x5OverE5x5Cut,
84  minE2x5OverE5x5Cut,
85  # Three constants for the GsfEleHadronicOverEMLinearCut:
86  # cut = constTerm if value < slopeStart
87  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
88  hOverESlopeTerm,
89  hOverESlopeStart,
90  hOverEConstTerm,
91  # Three constants for the GsfEleTrkPtIsoCut:
92  # cut = constTerm if value < slopeStart
93  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
94  trkIsoSlopeTerm,
95  trkIsoSlopeStart,
96  trkIsoConstTerm,
97  trkIsoRhoCorrStart,
98  trkIsoEffArea,
99  # Three constants for the GsfEleEmHadD1IsoRhoCut:
100  # cut = constTerm if value < slopeStart
101  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
102  # Also for the same cut, the effective area for the rho correction of the isolation
103  ehIsoSlopeTerm,
104  ehIsoSlopeStart,
105  ehIsoConstTerm,
106  effAreaForEHIso,
107  # other cuts:
108  dxyCut,
109  maxMissingHitsCut,
110  ecalDrivenCut
111  ):
112  # assign values taken from all the arguments above
113  self.idName = idName
114  self.dEtaInSeedCut = dEtaInSeedCut
115  self.dPhiInCut = dPhiInCut
116  self.full5x5SigmaIEtaIEtaCut = full5x5SigmaIEtaIEtaCut
117  self.minE1x5OverE5x5Cut = minE1x5OverE5x5Cut
118  self.minE2x5OverE5x5Cut = minE2x5OverE5x5Cut
119  self.hOverESlopeTerm = hOverESlopeTerm
120  self.hOverESlopeStart = hOverESlopeStart
121  self.hOverEConstTerm = hOverEConstTerm
122  self.trkIsoSlopeTerm = trkIsoSlopeTerm
123  self.trkIsoSlopeStart = trkIsoSlopeStart
124  self.trkIsoConstTerm = trkIsoConstTerm
125  self.trkIsoRhoCorrStart = trkIsoRhoCorrStart
126  self.trkIsoEffArea = trkIsoEffArea
127  self.ehIsoSlopeTerm = ehIsoSlopeTerm
128  self.ehIsoSlopeStart = ehIsoSlopeStart
129  self.ehIsoConstTerm = ehIsoConstTerm
130  self.effAreaForEHIso = effAreaForEHIso
131  self.dxyCut = dxyCut
132  self.maxMissingHitsCut = maxMissingHitsCut
133  self.ecalDrivenCut = ecalDrivenCut
134 # ==============================================================
135 # Define individual cut configurations used by complete cut sets
136 # ==============================================================
137 
138 # The mininum pt cut is set to 5 GeV
140  return cms.PSet(
141  cutName = cms.string("MinPtCut"),
142  minPt = cms.double(35.0),
143  needsAdditionalProducts = cms.bool(False),
144  isIgnored = cms.bool(False)
145  )
146 
147 # Take all particles in the eta ranges 0-ebMax and eeMin-2.5
149  return cms.PSet(
150  cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
151  useAbsEta = cms.bool(True),
152  allowedEtaRanges = cms.VPSet(
153  cms.PSet( minEta = cms.double(0.0),
154  maxEta = cms.double(ebMax) ),
155  cms.PSet( minEta = cms.double(eeMin),
156  maxEta = cms.double(2.5) )
157  ),
158  needsAdditionalProducts = cms.bool(False),
159  isIgnored = cms.bool(False)
160  )
161 
162 # Configure the cut on the dEtaIn for the seed
163 def psetGsfEleDEtaInSeedCut(wpEB, wpEE):
164  return cms.PSet(
165  cutName = cms.string('GsfEleDEtaInSeedCut'),
166  dEtaInSeedCutValueEB = cms.double( wpEB.dEtaInSeedCut ),
167  dEtaInSeedCutValueEE = cms.double( wpEE.dEtaInSeedCut ),
168  barrelCutOff = cms.double(ebCutOff),
169  needsAdditionalProducts = cms.bool(False),
170  isIgnored = cms.bool(False)
171  )
172 
173 # Configure the cut on the dPhiIn
174 def psetGsfEleDPhiInCut(wpEB, wpEE):
175  return cms.PSet(
176  cutName = cms.string('GsfEleDPhiInCut'),
177  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
178  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
179  barrelCutOff = cms.double(ebCutOff),
180  needsAdditionalProducts = cms.bool(False),
181  isIgnored = cms.bool(False)
182  )
183 
184 # Confugure the full 5x5 sigmaIEtaIEta cut
186  return cms.PSet(
187  cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
188  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5SigmaIEtaIEtaCut ),
189  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5SigmaIEtaIEtaCut ),
190  barrelCutOff = cms.double(ebCutOff),
191  needsAdditionalProducts = cms.bool(False),
192  isIgnored = cms.bool(False)
193  )
194 
196  return cms.PSet(
197  cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaWithSatCut'),
198  maxSigmaIEtaIEtaEB = cms.double( wpEB.full5x5SigmaIEtaIEtaCut ),
199  maxSigmaIEtaIEtaEE = cms.double( wpEE.full5x5SigmaIEtaIEtaCut ),
200  maxNrSatCrysIn5x5EB =cms.int32( 0 ),
201  maxNrSatCrysIn5x5EE =cms.int32( 0 ),
202  needsAdditionalProducts = cms.bool(False),
203 
204  isIgnored = cms.bool(False)
205  )
206 # Configure XxX shower shape cuts
208  return cms.PSet(
209  cutName = cms.string('GsfEleFull5x5E2x5OverE5x5Cut'),
210  # E1x5 / E5x5
211  minE1x5OverE5x5EB = cms.double( wpEB.minE1x5OverE5x5Cut ),
212  minE1x5OverE5x5EE = cms.double( wpEE.minE1x5OverE5x5Cut ),
213  # E2x5 / E5x5
214  minE2x5OverE5x5EB = cms.double( wpEB.minE2x5OverE5x5Cut ),
215  minE2x5OverE5x5EE = cms.double( wpEE.minE2x5OverE5x5Cut ),
216  needsAdditionalProducts = cms.bool(False),
217  isIgnored = cms.bool(False)
218  )
219 # Configure XxX shower shape cuts
221  return cms.PSet(
222  cutName = cms.string('GsfEleFull5x5E2x5OverE5x5WithSatCut'),
223  # E1x5 / E5x5
224  minE1x5OverE5x5EB = cms.double( wpEB.minE1x5OverE5x5Cut ),
225  minE1x5OverE5x5EE = cms.double( wpEE.minE1x5OverE5x5Cut ),
226  # E2x5 / E5x5
227  minE2x5OverE5x5EB = cms.double( wpEB.minE2x5OverE5x5Cut ),
228  minE2x5OverE5x5EE = cms.double( wpEE.minE2x5OverE5x5Cut ),
229  maxNrSatCrysIn5x5EB =cms.int32( 0 ),
230  maxNrSatCrysIn5x5EE =cms.int32( 0 ),
231  needsAdditionalProducts = cms.bool(False),
232  isIgnored = cms.bool(False)
233  )
234 # Configure the cut of E/H
236  return cms.PSet(
237  cutName = cms.string('GsfEleHadronicOverEMLinearCut'),
238  # Three constants for the GsfEleHadronicOverEMLinearCut
239  # cut = constTerm if value < slopeStart
240  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
241  slopeTermEB = cms.double( wpEB.hOverESlopeTerm ),
242  slopeTermEE = cms.double( wpEE.hOverESlopeTerm ),
243  slopeStartEB = cms.double( wpEB.hOverESlopeStart ),
244  slopeStartEE = cms.double( wpEE.hOverESlopeStart ),
245  constTermEB = cms.double( wpEB.hOverEConstTerm ),
246  constTermEE = cms.double( wpEE.hOverEConstTerm ),
247  needsAdditionalProducts = cms.bool(False),
248  isIgnored = cms.bool(False)
249  )
250 
251 # Configure the cut on the tracker isolation
252 def psetGsfEleTrkPtIsoCut(wpEB, wpEE):
253  return cms.PSet(
254  cutName = cms.string('GsfEleTrkPtIsoCut'),
255  # Three constants for the GsfEleTrkPtIsoCut
256  # cut = constTerm if value < slopeStart
257  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
258  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
259  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
260  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
261  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
262  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
263  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
264  needsAdditionalProducts = cms.bool(False),
265  isIgnored = cms.bool(False)
266  )
267 # Configure the cut on the tracker isolation with a rho correction (hack for 76X)
268 def psetGsfEleTrkPtIsoRhoCut(wpEB, wpEE):
269  return cms.PSet(
270  cutName = cms.string('GsfEleTrkPtIsoRhoCut'),
271  # Three constants for the GsfEleTrkPtIsoCut
272  # cut = constTerm if value < slopeStart
273  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
274  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
275  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
276  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
277  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
278  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
279  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
280  rhoEtStartEB = cms.double( wpEB.trkIsoRhoCorrStart),
281  rhoEtStartEE = cms.double( wpEE.trkIsoRhoCorrStart),
282  rhoEAEB = cms.double( wpEB.trkIsoEffArea),
283  rhoEAEE = cms.double( wpEE.trkIsoEffArea),
284  rho = cms.InputTag("fixedGridRhoFastjetAll"),
285  needsAdditionalProducts = cms.bool(True),
286  isIgnored = cms.bool(False)
287  )
289  return cms.PSet(
290  cutName = cms.string('GsfEleValueMapIsoRhoCut'),
291  # Three constants for the GsfEleTrkPtIsoCut
292  # cut = constTerm if value < slopeStart
293  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
294  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
295  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
296  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
297  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
298  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
299  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
300  #no rho so we zero it out, if the input tag is empty, its ignored anyways
301  rhoEtStartEB = cms.double( 999999.),
302  rhoEtStartEE = cms.double( 999999.),
303  rhoEAEB = cms.double( 0. ),
304  rhoEAEE = cms.double( 0. ),
305  rho = cms.InputTag(""),
306  value = cms.InputTag("heepIDVarValueMaps","eleTrkPtIsoNoJetCore"),
307  needsAdditionalProducts = cms.bool(True),
308  isIgnored = cms.bool(False)
309  )
311  return cms.PSet(
312  cutName = cms.string('GsfEleValueMapIsoRhoCut'),
313  # Three constants for the GsfEleTrkPtIsoCut
314  # cut = constTerm if value < slopeStart
315  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
316  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
317  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
318  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
319  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
320  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
321  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
322  #no rho so we zero it out, if the input tag is empty, its ignored anyways
323  rhoEtStartEB = cms.double( 999999.),
324  rhoEtStartEE = cms.double( 999999.),
325  rhoEAEB = cms.double( 0. ),
326  rhoEAEE = cms.double( 0. ),
327  rho = cms.InputTag(""),
328  value = cms.InputTag("heepIDVarValueMaps","eleTrkPtIso"),
329  needsAdditionalProducts = cms.bool(True),
330  isIgnored = cms.bool(False)
331  )
332 # Configure the cut on the EM + Had_depth_1 isolation with rho correction
334  return cms.PSet(
335  cutName = cms.string('GsfEleEmHadD1IsoRhoCut'),
336  slopeTermEB = cms.double( wpEB.ehIsoSlopeTerm ),
337  slopeTermEE = cms.double( wpEE.ehIsoSlopeTerm ),
338  slopeStartEB = cms.double( wpEB.ehIsoSlopeStart ),
339  slopeStartEE = cms.double( wpEE.ehIsoSlopeStart ),
340  constTermEB = cms.double( wpEB.ehIsoConstTerm ),
341  constTermEE = cms.double( wpEE.ehIsoConstTerm ),
342  rhoConstant = cms.double( wpEB.effAreaForEHIso), # expected to be the same for EB and EE
343  rho = cms.InputTag("fixedGridRhoFastjetAll"),
344  needsAdditionalProducts = cms.bool(True),
345  isIgnored = cms.bool(False)
346  )
347 
348 # Configure the dxy cut
349 def psetGsfEleDxyCut(wpEB, wpEE):
350  return cms.PSet(
351  cutName = cms.string('GsfEleDxyCut'),
352  dxyCutValueEB = cms.double( wpEB.dxyCut ),
353  dxyCutValueEE = cms.double( wpEE.dxyCut ),
354  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
355  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
356  barrelCutOff = cms.double(ebCutOff),
357  needsAdditionalProducts = cms.bool(True),
358  isIgnored = cms.bool(False)
359  )
360 
361 # Configure the cut on missing hits
362 def psetGsfEleMissingHitsCut(wpEB, wpEE):
363  return cms.PSet(
364  cutName = cms.string('GsfEleMissingHitsCut'),
365  maxMissingHitsEB = cms.uint32( wpEB.maxMissingHitsCut ),
366  maxMissingHitsEE = cms.uint32( wpEE.maxMissingHitsCut ),
367  barrelCutOff = cms.double(ebCutOff),
368  needsAdditionalProducts = cms.bool(False),
369  isIgnored = cms.bool(False)
370  )
371 def psetGsfEleEcalDrivenCut(wpEB, wpEE):
372  return cms.PSet(
373  cutName = cms.string('GsfEleEcalDrivenCut'),
374  ecalDrivenEB = cms.int32( wpEB.ecalDrivenCut ),
375  ecalDrivenEE = cms.int32( wpEE.ecalDrivenCut ),
376  barrelCutOff = cms.double(ebCutOff),
377  needsAdditionalProducts = cms.bool(False),
378  isIgnored = cms.bool(False)
379  )
380 
381 # ==============================================================
382 # Define the complete cut sets
383 # ==============================================================
384 
386  """
387  This function configures the full cms.PSet for a VID ID and returns it.
388  The inputs: two objects of the type HEEP_WorkingPoint_V1, one
389  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
390  """
391  parameterSet = cms.PSet(
392  idName = cms.string("heepElectronID-HEEPV51"),
393  cutFlow = cms.VPSet(
394  psetMinPtCut(), #0
396  psetGsfEleDEtaInSeedCut(wpEB,wpEE), #2
397  psetGsfEleDPhiInCut(wpEB,wpEE), #3
398  psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), #4
399  psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE), #5
400  psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE), #6
401  psetGsfEleTrkPtIsoCut(wpEB,wpEE), #7
402  psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE), #8
403  psetGsfEleDxyCut(wpEB,wpEE), #9
404  psetGsfEleMissingHitsCut(wpEB,wpEE), #10,
405  psetGsfEleEcalDrivenCut(wpEB,wpEE) #11
406  )
407  )
408  return parameterSet
409 
411  """
412  This function configures the full cms.PSet for a VID ID and returns it.
413  The inputs: two objects of the type HEEP_WorkingPoint_V1, one
414  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
415  """
416  parameterSet = cms.PSet(
417  idName = cms.string("heepElectronID-HEEPV60"),
418  cutFlow = cms.VPSet(
419  psetMinPtCut(), #0
421  psetGsfEleDEtaInSeedCut(wpEB,wpEE), #2
422  psetGsfEleDPhiInCut(wpEB,wpEE), #3
423  psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), #4
424  psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE), #5
425  psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE), #6
426  psetGsfEleTrkPtIsoCut(wpEB,wpEE), #7
427  psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE), #8
428  psetGsfEleDxyCut(wpEB,wpEE), #9
429  psetGsfEleMissingHitsCut(wpEB,wpEE), #10,
430  psetGsfEleEcalDrivenCut(wpEB,wpEE) #11
431  )
432  )
433  return parameterSet
434 
435 
436 def configureHEEPElectronID_V70(idName, wpEB, wpEE):
437  """
438  This function configures the full cms.PSet for a VID ID and returns it.
439  The inputs: two objects of the type HEEP_WorkingPoint_V1, one
440  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
441  """
442  parameterSet = cms.PSet(
443  idName = cms.string(idName),
444  cutFlow = cms.VPSet(
445  psetMinPtCut(), #0
447  psetGsfEleDEtaInSeedCut(wpEB,wpEE), #2
448  psetGsfEleDPhiInCut(wpEB,wpEE), #3
451  psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE), #6
452  psetGsfEleTrkPtFall16IsoCut(wpEB,wpEE), #7
453  psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE), #8
454  psetGsfEleDxyCut(wpEB,wpEE), #9
455  psetGsfEleMissingHitsCut(wpEB,wpEE), #10,
456  psetGsfEleEcalDrivenCut(wpEB,wpEE) #11
457  )
458  )
459  return parameterSet
460 
461 
462 def configureHEEPElectronID_V60_80XAOD(idName, wpEB, wpEE):
463  """
464  This function configures the full cms.PSet for a VID ID and returns it.
465  The inputs: two objects of the type HEEP_WorkingPoint_V1, one
466  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
467  """
468  parameterSet = cms.PSet(
469  idName = cms.string(idName),
470  cutFlow = cms.VPSet(
471  psetMinPtCut(), #0
473  psetGsfEleDEtaInSeedCut(wpEB,wpEE), #2
474  psetGsfEleDPhiInCut(wpEB,wpEE), #3
477  psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE), #6
478  psetGsfEleTrkPtNoJetCoreIsoCut(wpEB,wpEE), #7
479  psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE), #8
480  psetGsfEleDxyCut(wpEB,wpEE), #9
481  psetGsfEleMissingHitsCut(wpEB,wpEE), #10,
482  psetGsfEleEcalDrivenCut(wpEB,wpEE) #11
483  )
484  )
485  return parameterSet
486 
488  """
489  This function configures the full cms.PSet for a VID ID and returns it.
490  The inputs: two objects of the type HEEP_WorkingPoint_V2, one
491  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
492  """
493  parameterSet = cms.PSet(
494  idName = cms.string("heepElectronID-HEEPV61"),
495  cutFlow = cms.VPSet(
496  psetMinPtCut(), #0
498  psetGsfEleDEtaInSeedCut(wpEB,wpEE), #2
499  psetGsfEleDPhiInCut(wpEB,wpEE), #3
500  psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), #4
501  psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE), #5
502  psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE), #6
503  psetGsfEleTrkPtIsoRhoCut(wpEB,wpEE), #7
504  psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE), #8
505  psetGsfEleDxyCut(wpEB,wpEE), #9
506  psetGsfEleMissingHitsCut(wpEB,wpEE), #10,
507  psetGsfEleEcalDrivenCut(wpEB,wpEE) #11
508  )
509  )
510  return parameterSet
511 
512 def addHEEPProducersToSeq(process,seq,useMiniAOD, task=None):
513 
514  newTask = cms.Task()
515  seq.associate(newTask)
516  if task is not None:
517  task.add(newTask)
518 
519  process.load("RecoEgamma.ElectronIdentification.heepIdVarValueMapProducer_cfi")
520  newTask.add(process.heepIDVarValueMaps)
521 
522  if useMiniAOD==False:
523  process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
524  process.load("PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi")
525  process.load("PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices_cfi")
526  process.load("PhysicsTools.PatAlgos.slimming.packedPFCandidates_cfi")
527  from PhysicsTools.PatAlgos.slimming.packedPFCandidates_cfi import packedPFCandidates
528  process.packedCandsForTkIso = packedPFCandidates.clone()
529  process.packedCandsForTkIso.PuppiSrc=cms.InputTag("")
530  process.packedCandsForTkIso.PuppiNoLepSrc=cms.InputTag("")
531 
532  process.load("PhysicsTools.PatAlgos.slimming.lostTracks_cfi")
533  from PhysicsTools.PatAlgos.slimming.lostTracks_cfi import lostTracks
534  process.lostTracksForTkIso = lostTracks.clone()
535  process.lostTracksForTkIso.packedPFCandidates =cms.InputTag("packedCandsForTkIso")
536  newTask.add(process.primaryVertexAssociation,
537  process.offlineSlimmedPrimaryVertices,
538  process.packedCandsForTkIso,
539  process.lostTracksForTkIso)
def psetGsfEleMissingHitsCut(wpEB, wpEE)
def psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB, wpEE)
def configureHEEPElectronID_V60(wpEB, wpEE)
def addHEEPProducersToSeq(process, seq, useMiniAOD, task=None)
def psetGsfEleDxyCut(wpEB, wpEE)
def psetGsfEleTrkPtNoJetCoreIsoCut(wpEB, wpEE)
def psetGsfEleFull5x5E2x5OverE5x5WithSatCut(wpEB, wpEE)
def __init__(self, idName, dEtaInSeedCut, dPhiInCut, full5x5SigmaIEtaIEtaCut, minE1x5OverE5x5Cut, minE2x5OverE5x5Cut, hOverESlopeTerm, hOverESlopeStart, hOverEConstTerm, trkIsoSlopeTerm, trkIsoSlopeStart, trkIsoConstTerm, ehIsoSlopeTerm, ehIsoSlopeStart, ehIsoConstTerm, effAreaForEHIso, dxyCut, maxMissingHitsCut, ecalDrivenCut)
def psetGsfEleEcalDrivenCut(wpEB, wpEE)
def psetGsfEleFull5x5SigmaIEtaIEtaWithSatCut(wpEB, wpEE)
def psetGsfEleTrkPtIsoRhoCut(wpEB, wpEE)
def configureHEEPElectronID_V61(wpEB, wpEE)
def psetGsfEleTrkPtFall16IsoCut(wpEB, wpEE)
def psetGsfEleTrkPtIsoCut(wpEB, wpEE)
def psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB, wpEE)
def psetGsfEleHadronicOverEMLinearCut(wpEB, wpEE)
def configureHEEPElectronID_V70(idName, wpEB, wpEE)
def __init__(self, idName, dEtaInSeedCut, dPhiInCut, full5x5SigmaIEtaIEtaCut, minE1x5OverE5x5Cut, minE2x5OverE5x5Cut, hOverESlopeTerm, hOverESlopeStart, hOverEConstTerm, trkIsoSlopeTerm, trkIsoSlopeStart, trkIsoConstTerm, trkIsoRhoCorrStart, trkIsoEffArea, ehIsoSlopeTerm, ehIsoSlopeStart, ehIsoConstTerm, effAreaForEHIso, dxyCut, maxMissingHitsCut, ecalDrivenCut)
def psetGsfEleDEtaInSeedCut(wpEB, wpEE)
def psetGsfEleEmHadD1IsoRhoCut(wpEB, wpEE)
def configureHEEPElectronID_V60_80XAOD(idName, wpEB, wpEE)
def psetGsfEleDPhiInCut(wpEB, wpEE)
def configureHEEPElectronID_V51(wpEB, wpEE)