test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
cutBasedElectronID_tools Namespace Reference

Classes

class  EleWorkingPoint_V1
 
class  EleWorkingPoint_V2
 
class  IsolationCutInputs_V2
 

Functions

def configureVIDCutBasedEleID_V1
 
def configureVIDCutBasedEleID_V2
 

Variables

float ebCutOff = 1.479
 

Function Documentation

def cutBasedElectronID_tools.configureVIDCutBasedEleID_V1 (   wpEB,
  wpEE 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: two objects of the type WorkingPoint_V1, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).

Definition at line 43 of file cutBasedElectronID_tools.py.

43 
44 def configureVIDCutBasedEleID_V1( wpEB, wpEE ):
45  """
46  This function configures the full cms.PSet for a VID ID and returns it.
47  The inputs: two objects of the type WorkingPoint_V1, one
48  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
49  """
50  # print "VID: Configuring cut set %s" % wpEB.idName
51  parameterSet = cms.PSet(
52  #
53  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
54  cutFlow = cms.VPSet(
55  cms.PSet( cutName = cms.string("MinPtCut"),
56  minPt = cms.double(5.0),
57  needsAdditionalProducts = cms.bool(False),
58  isIgnored = cms.bool(False) ),
59  cms.PSet( cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
60  useAbsEta = cms.bool(True),
61  allowedEtaRanges = cms.VPSet(
62  cms.PSet( minEta = cms.double(0.0),
63  maxEta = cms.double(ebCutOff) ),
64  cms.PSet( minEta = cms.double(ebCutOff),
65  maxEta = cms.double(2.5) )
66  ),
67  needsAdditionalProducts = cms.bool(False),
68  isIgnored = cms.bool(False)),
69  cms.PSet( cutName = cms.string('GsfEleDEtaInCut'),
70  dEtaInCutValueEB = cms.double( wpEB.dEtaInCut ),
71  dEtaInCutValueEE = cms.double( wpEE.dEtaInCut ),
72  barrelCutOff = cms.double(ebCutOff),
73  needsAdditionalProducts = cms.bool(False),
74  isIgnored = cms.bool(False)),
75  cms.PSet( cutName = cms.string('GsfEleDPhiInCut'),
76  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
77  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
78  barrelCutOff = cms.double(ebCutOff),
79  needsAdditionalProducts = cms.bool(False),
80  isIgnored = cms.bool(False)),
81  cms.PSet( cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
82  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
83  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
84  barrelCutOff = cms.double(ebCutOff),
85  needsAdditionalProducts = cms.bool(False),
86  isIgnored = cms.bool(False)),
87  cms.PSet( cutName = cms.string('GsfEleHadronicOverEMCut'),
88  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
89  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
90  barrelCutOff = cms.double(ebCutOff),
91  needsAdditionalProducts = cms.bool(False),
92  isIgnored = cms.bool(False)),
93  cms.PSet( cutName = cms.string('GsfEleDxyCut'),
94  dxyCutValueEB = cms.double( wpEB.dxyCut ),
95  dxyCutValueEE = cms.double( wpEE.dxyCut ),
96  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
97  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
98  barrelCutOff = cms.double(ebCutOff),
99  needsAdditionalProducts = cms.bool(True),
100  isIgnored = cms.bool(False)),
101  cms.PSet( cutName = cms.string('GsfEleDzCut'),
102  dzCutValueEB = cms.double( wpEB.dzCut ),
103  dzCutValueEE = cms.double( wpEE.dzCut ),
104  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
105  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
106  barrelCutOff = cms.double(ebCutOff),
107  needsAdditionalProducts = cms.bool(True),
108  isIgnored = cms.bool(False)),
109  cms.PSet( cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
110  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
111  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
112  barrelCutOff = cms.double(ebCutOff),
113  needsAdditionalProducts = cms.bool(False),
114  isIgnored = cms.bool(False)),
115  cms.PSet( cutName = cms.string('GsfEleDeltaBetaIsoCutStandalone'),
116  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithDBetaLowPtCut ),
117  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithDBetaHighPtCut ),
118  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithDBetaLowPtCut ),
119  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithDBetaHighPtCut ),
120  isRelativeIso = cms.bool(True),
121  deltaBetaConstant = cms.double(0.5),
122  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
123  barrelCutOff = cms.double(ebCutOff),
124  needsAdditionalProducts = cms.bool(False),
125  isIgnored = cms.bool(False)),
126  cms.PSet( cutName = cms.string('GsfEleConversionVetoCut'),
127  conversionSrc = cms.InputTag('allConversions'),
128  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
129  beamspotSrc = cms.InputTag('offlineBeamSpot'),
130  needsAdditionalProducts = cms.bool(True),
131  isIgnored = cms.bool(False)),
132  cms.PSet( cutName = cms.string('GsfEleMissingHitsCut'),
133  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
134  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
135  barrelCutOff = cms.double(ebCutOff),
136  needsAdditionalProducts = cms.bool(False),
137  isIgnored = cms.bool(False) ),
138  )
139  )
140  #
141  return parameterSet
142 
143 # -----------------------------
144 # Version V2 common definitions
145 # -----------------------------
def cutBasedElectronID_tools.configureVIDCutBasedEleID_V2 (   wpEB,
  wpEE,
  isoInputs 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: two objects of the type WorkingPoint_V2, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
The third argument is an object that contains information necessary
for isolation calculations.

Definition at line 189 of file cutBasedElectronID_tools.py.

190 def configureVIDCutBasedEleID_V2( wpEB, wpEE, isoInputs ):
191  """
192  This function configures the full cms.PSet for a VID ID and returns it.
193  The inputs: two objects of the type WorkingPoint_V2, one
194  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
195  The third argument is an object that contains information necessary
196  for isolation calculations.
197  """
198  # print "VID: Configuring cut set %s" % wpEB.idName
199  parameterSet = cms.PSet(
200  #
201  idName = cms.string( wpEB.idName ), # same name stored in the _EB and _EE objects
202  cutFlow = cms.VPSet(
203  cms.PSet( cutName = cms.string("MinPtCut"),
204  minPt = cms.double(5.0),
205  needsAdditionalProducts = cms.bool(False),
206  isIgnored = cms.bool(False) ),
207  cms.PSet( cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
208  useAbsEta = cms.bool(True),
209  allowedEtaRanges = cms.VPSet(
210  cms.PSet( minEta = cms.double(0.0),
211  maxEta = cms.double(ebCutOff) ),
212  cms.PSet( minEta = cms.double(ebCutOff),
213  maxEta = cms.double(2.5) )
214  ),
215  needsAdditionalProducts = cms.bool(False),
216  isIgnored = cms.bool(False)),
217  cms.PSet( cutName = cms.string('GsfEleDEtaInCut'),
218  dEtaInCutValueEB = cms.double( wpEB.dEtaInCut ),
219  dEtaInCutValueEE = cms.double( wpEE.dEtaInCut ),
220  barrelCutOff = cms.double(ebCutOff),
221  needsAdditionalProducts = cms.bool(False),
222  isIgnored = cms.bool(False)),
223  cms.PSet( cutName = cms.string('GsfEleDPhiInCut'),
224  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
225  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
226  barrelCutOff = cms.double(ebCutOff),
227  needsAdditionalProducts = cms.bool(False),
228  isIgnored = cms.bool(False)),
229  cms.PSet( cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
230  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5_sigmaIEtaIEtaCut ),
231  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5_sigmaIEtaIEtaCut ),
232  barrelCutOff = cms.double(ebCutOff),
233  needsAdditionalProducts = cms.bool(False),
234  isIgnored = cms.bool(False)),
235  cms.PSet( cutName = cms.string('GsfEleHadronicOverEMCut'),
236  hadronicOverEMCutValueEB = cms.double( wpEB.hOverECut ),
237  hadronicOverEMCutValueEE = cms.double( wpEE.hOverECut ),
238  barrelCutOff = cms.double(ebCutOff),
239  needsAdditionalProducts = cms.bool(False),
240  isIgnored = cms.bool(False)),
241  cms.PSet( cutName = cms.string('GsfEleDxyCut'),
242  dxyCutValueEB = cms.double( wpEB.dxyCut ),
243  dxyCutValueEE = cms.double( wpEE.dxyCut ),
244  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
245  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
246  barrelCutOff = cms.double(ebCutOff),
247  needsAdditionalProducts = cms.bool(True),
248  isIgnored = cms.bool(False)),
249  cms.PSet( cutName = cms.string('GsfEleDzCut'),
250  dzCutValueEB = cms.double( wpEB.dzCut ),
251  dzCutValueEE = cms.double( wpEE.dzCut ),
252  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
253  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
254  barrelCutOff = cms.double(ebCutOff),
255  needsAdditionalProducts = cms.bool(True),
256  isIgnored = cms.bool(False)),
257  cms.PSet( cutName = cms.string('GsfEleEInverseMinusPInverseCut'),
258  eInverseMinusPInverseCutValueEB = cms.double( wpEB.absEInverseMinusPInverseCut ),
259  eInverseMinusPInverseCutValueEE = cms.double( wpEE.absEInverseMinusPInverseCut ),
260  barrelCutOff = cms.double(ebCutOff),
261  needsAdditionalProducts = cms.bool(False),
262  isIgnored = cms.bool(False)),
263  cms.PSet( cutName = cms.string('GsfEleEffAreaPFIsoCut'),
264  isoCutEBLowPt = cms.double( wpEB.relCombIsolationWithEALowPtCut ),
265  isoCutEBHighPt = cms.double( wpEB.relCombIsolationWithEAHighPtCut ),
266  isoCutEELowPt = cms.double( wpEE.relCombIsolationWithEALowPtCut ),
267  isoCutEEHighPt = cms.double( wpEE.relCombIsolationWithEAHighPtCut ),
268  isRelativeIso = cms.bool(True),
269  ptCutOff = cms.double(20.0), # high pT above this value, low pT below
270  barrelCutOff = cms.double(ebCutOff),
271  rho = cms.InputTag("fixedGridRhoFastjetAll"),
272  effAreasConfigFile = cms.FileInPath( isoInputs.neuHadAndPhoIsolationEffAreas ),
273  needsAdditionalProducts = cms.bool(True),
274  isIgnored = cms.bool(False) ),
275  cms.PSet( cutName = cms.string('GsfEleConversionVetoCut'),
276  conversionSrc = cms.InputTag('allConversions'),
277  conversionSrcMiniAOD = cms.InputTag('reducedEgamma:reducedConversions'),
278  beamspotSrc = cms.InputTag('offlineBeamSpot'),
279  needsAdditionalProducts = cms.bool(True),
280  isIgnored = cms.bool(False)),
281  cms.PSet( cutName = cms.string('GsfEleMissingHitsCut'),
282  maxMissingHitsEB = cms.uint32( wpEB.missingHitsCut ),
283  maxMissingHitsEE = cms.uint32( wpEE.missingHitsCut ),
284  barrelCutOff = cms.double(ebCutOff),
285  needsAdditionalProducts = cms.bool(False),
286  isIgnored = cms.bool(False) ),
287  )
288  )
289  #
290  return parameterSet
291 

Variable Documentation

float cutBasedElectronID_tools.ebCutOff = 1.479

Definition at line 5 of file cutBasedElectronID_tools.py.