CMS 3D CMS Logo

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

Classes

class  HEEP_WorkingPoint_V1
 

Functions

def configureHEEPElectronID_V51
 
def configureHEEPElectronID_V60
 
def psetGsfEleDEtaInSeedCut
 
def psetGsfEleDPhiInCut
 
def psetGsfEleDxyCut
 
def psetGsfEleEcalDrivenCut
 
def psetGsfEleEmHadD1IsoRhoCut
 
def psetGsfEleFull5x5E2x5OverE5x5Cut
 
def psetGsfEleFull5x5SigmaIEtaIEtaCut
 
def psetGsfEleHadronicOverEMLinearCut
 
def psetGsfEleMissingHitsCut
 
def psetGsfEleSCEtaMultiRangeCut
 
def psetGsfEleTrkPtIsoCut
 
def psetMinPtCut
 

Variables

float ebCutOff = 1.479
 
float ebMax = 1.4442
 
float eeMin = 1.566
 

Function Documentation

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

Definition at line 233 of file heepElectronID_tools.py.

References psetGsfEleDEtaInSeedCut(), psetGsfEleDPhiInCut(), psetGsfEleDxyCut(), psetGsfEleEcalDrivenCut(), psetGsfEleEmHadD1IsoRhoCut(), psetGsfEleFull5x5E2x5OverE5x5Cut(), psetGsfEleFull5x5SigmaIEtaIEtaCut(), psetGsfEleHadronicOverEMLinearCut(), psetGsfEleMissingHitsCut(), psetGsfEleSCEtaMultiRangeCut(), psetGsfEleTrkPtIsoCut(), and psetMinPtCut().

234 def configureHEEPElectronID_V51(wpEB, wpEE):
235  """
236  This function configures the full cms.PSet for a VID ID and returns it.
237  The inputs: two objects of the type HEEP_WorkingPoint_V1, one
238  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
239  """
240  parameterSet = cms.PSet(
241  idName = cms.string("heepElectronID-HEEPV51"),
242  cutFlow = cms.VPSet(
243  psetMinPtCut(), #0
245  psetGsfEleDEtaInSeedCut(wpEB,wpEE), #2
246  psetGsfEleDPhiInCut(wpEB,wpEE), #3
247  psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), #4
248  psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE), #5
249  psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE), #6
250  psetGsfEleTrkPtIsoCut(wpEB,wpEE), #7
251  psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE), #8
252  psetGsfEleDxyCut(wpEB,wpEE), #9
253  psetGsfEleMissingHitsCut(wpEB,wpEE), #10,
254  psetGsfEleEcalDrivenCut(wpEB,wpEE) #11
255  )
256  )
257  return parameterSet
def heepElectronID_tools.configureHEEPElectronID_V60 (   wpEB,
  wpEE 
)
This function configures the full cms.PSet for a VID ID and returns it.
The inputs: two objects of the type HEEP_WorkingPoint_V1, one
containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).

Definition at line 258 of file heepElectronID_tools.py.

References psetGsfEleDEtaInSeedCut(), psetGsfEleDPhiInCut(), psetGsfEleDxyCut(), psetGsfEleEcalDrivenCut(), psetGsfEleEmHadD1IsoRhoCut(), psetGsfEleFull5x5E2x5OverE5x5Cut(), psetGsfEleFull5x5SigmaIEtaIEtaCut(), psetGsfEleHadronicOverEMLinearCut(), psetGsfEleMissingHitsCut(), psetGsfEleSCEtaMultiRangeCut(), psetGsfEleTrkPtIsoCut(), and psetMinPtCut().

259 def configureHEEPElectronID_V60(wpEB, wpEE):
260  """
261  This function configures the full cms.PSet for a VID ID and returns it.
262  The inputs: two objects of the type HEEP_WorkingPoint_V1, one
263  containing the cuts for the Barrel (EB) and the other one for the Endcap (EE).
264  """
265  parameterSet = cms.PSet(
266  idName = cms.string("heepElectronID-HEEPV60"),
267  cutFlow = cms.VPSet(
268  psetMinPtCut(), #0
270  psetGsfEleDEtaInSeedCut(wpEB,wpEE), #2
271  psetGsfEleDPhiInCut(wpEB,wpEE), #3
272  psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB,wpEE), #4
273  psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB,wpEE), #5
274  psetGsfEleHadronicOverEMLinearCut(wpEB,wpEE), #6
275  psetGsfEleTrkPtIsoCut(wpEB,wpEE), #7
276  psetGsfEleEmHadD1IsoRhoCut(wpEB,wpEE), #8
277  psetGsfEleDxyCut(wpEB,wpEE), #9
278  psetGsfEleMissingHitsCut(wpEB,wpEE), #10,
279  psetGsfEleEcalDrivenCut(wpEB,wpEE) #11
280  )
281  )
282  return parameterSet
def heepElectronID_tools.psetGsfEleDEtaInSeedCut (   wpEB,
  wpEE 
)

Definition at line 100 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

101 def psetGsfEleDEtaInSeedCut(wpEB, wpEE):
102  return cms.PSet(
103  cutName = cms.string('GsfEleDEtaInSeedCut'),
104  dEtaInSeedCutValueEB = cms.double( wpEB.dEtaInSeedCut ),
105  dEtaInSeedCutValueEE = cms.double( wpEE.dEtaInSeedCut ),
106  barrelCutOff = cms.double(ebCutOff),
107  needsAdditionalProducts = cms.bool(False),
108  isIgnored = cms.bool(False)
109  )
110 
# Configure the cut on the dPhiIn
def heepElectronID_tools.psetGsfEleDPhiInCut (   wpEB,
  wpEE 
)

Definition at line 111 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

112 def psetGsfEleDPhiInCut(wpEB, wpEE):
113  return cms.PSet(
114  cutName = cms.string('GsfEleDPhiInCut'),
115  dPhiInCutValueEB = cms.double( wpEB.dPhiInCut ),
116  dPhiInCutValueEE = cms.double( wpEE.dPhiInCut ),
117  barrelCutOff = cms.double(ebCutOff),
118  needsAdditionalProducts = cms.bool(False),
119  isIgnored = cms.bool(False)
120  )
121 
# Confugure the full 5x5 sigmaIEtaIEta cut
def heepElectronID_tools.psetGsfEleDxyCut (   wpEB,
  wpEE 
)

Definition at line 197 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

198 def psetGsfEleDxyCut(wpEB, wpEE):
199  return cms.PSet(
200  cutName = cms.string('GsfEleDxyCut'),
201  dxyCutValueEB = cms.double( wpEB.dxyCut ),
202  dxyCutValueEE = cms.double( wpEE.dxyCut ),
203  vertexSrc = cms.InputTag("offlinePrimaryVertices"),
204  vertexSrcMiniAOD = cms.InputTag("offlineSlimmedPrimaryVertices"),
205  barrelCutOff = cms.double(ebCutOff),
206  needsAdditionalProducts = cms.bool(True),
207  isIgnored = cms.bool(False)
208  )
209 
# Configure the cut on missing hits
def heepElectronID_tools.psetGsfEleEcalDrivenCut (   wpEB,
  wpEE 
)

Definition at line 219 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

220 def psetGsfEleEcalDrivenCut(wpEB, wpEE):
221  return cms.PSet(
222  cutName = cms.string('GsfEleEcalDrivenCut'),
223  ecalDrivenEB = cms.int32( wpEB.ecalDrivenCut ),
224  ecalDrivenEE = cms.int32( wpEE.ecalDrivenCut ),
225  barrelCutOff = cms.double(ebCutOff),
226  needsAdditionalProducts = cms.bool(False),
227  isIgnored = cms.bool(False)
228  )
229 
230 # ==============================================================
231 # Define the complete cut sets
232 # ==============================================================
def heepElectronID_tools.psetGsfEleEmHadD1IsoRhoCut (   wpEB,
  wpEE 
)

Definition at line 181 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

182 def psetGsfEleEmHadD1IsoRhoCut(wpEB, wpEE):
183  return cms.PSet(
184  cutName = cms.string('GsfEleEmHadD1IsoRhoCut'),
185  slopeTermEB = cms.double( wpEB.ehIsoSlopeTerm ),
186  slopeTermEE = cms.double( wpEE.ehIsoSlopeTerm ),
187  slopeStartEB = cms.double( wpEB.ehIsoSlopeStart ),
188  slopeStartEE = cms.double( wpEE.ehIsoSlopeStart ),
189  constTermEB = cms.double( wpEB.ehIsoConstTerm ),
190  constTermEE = cms.double( wpEE.ehIsoConstTerm ),
191  rhoConstant = cms.double( wpEB.effAreaForEHIso), # expected to be the same for EB and EE
192  rho = cms.InputTag("fixedGridRhoFastjetAll"),
193  needsAdditionalProducts = cms.bool(True),
194  isIgnored = cms.bool(False)
195  )
196 
# Configure the dxy cut
def heepElectronID_tools.psetGsfEleFull5x5E2x5OverE5x5Cut (   wpEB,
  wpEE 
)

Definition at line 133 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

134 def psetGsfEleFull5x5E2x5OverE5x5Cut(wpEB, wpEE):
135  return cms.PSet(
136  cutName = cms.string('GsfEleFull5x5E2x5OverE5x5Cut'),
137  # E1x5 / E5x5
138  minE1x5OverE5x5EB = cms.double( wpEB.minE1x5OverE5x5Cut ),
139  minE1x5OverE5x5EE = cms.double( wpEE.minE1x5OverE5x5Cut ),
140  # E2x5 / E5x5
141  minE2x5OverE5x5EB = cms.double( wpEB.minE2x5OverE5x5Cut ),
142  minE2x5OverE5x5EE = cms.double( wpEE.minE2x5OverE5x5Cut ),
143  needsAdditionalProducts = cms.bool(False),
144  isIgnored = cms.bool(False)
145  )
146 
# Configure the cut of E/H
def heepElectronID_tools.psetGsfEleFull5x5SigmaIEtaIEtaCut (   wpEB,
  wpEE 
)

Definition at line 122 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

123 def psetGsfEleFull5x5SigmaIEtaIEtaCut(wpEB, wpEE):
124  return cms.PSet(
125  cutName = cms.string('GsfEleFull5x5SigmaIEtaIEtaCut'),
126  full5x5SigmaIEtaIEtaCutValueEB = cms.double( wpEB.full5x5SigmaIEtaIEtaCut ),
127  full5x5SigmaIEtaIEtaCutValueEE = cms.double( wpEE.full5x5SigmaIEtaIEtaCut ),
128  barrelCutOff = cms.double(ebCutOff),
129  needsAdditionalProducts = cms.bool(False),
130  isIgnored = cms.bool(False)
131  )
132 
# Configure XxX shower shape cuts
def heepElectronID_tools.psetGsfEleHadronicOverEMLinearCut (   wpEB,
  wpEE 
)

Definition at line 147 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

148 def psetGsfEleHadronicOverEMLinearCut(wpEB, wpEE) :
149  return cms.PSet(
150  cutName = cms.string('GsfEleHadronicOverEMLinearCut'),
151  # Three constants for the GsfEleHadronicOverEMLinearCut
152  # cut = constTerm if value < slopeStart
153  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
154  slopeTermEB = cms.double( wpEB.hOverESlopeTerm ),
155  slopeTermEE = cms.double( wpEE.hOverESlopeTerm ),
156  slopeStartEB = cms.double( wpEB.hOverESlopeStart ),
157  slopeStartEE = cms.double( wpEE.hOverESlopeStart ),
158  constTermEB = cms.double( wpEB.hOverEConstTerm ),
159  constTermEE = cms.double( wpEE.hOverEConstTerm ),
160  needsAdditionalProducts = cms.bool(False),
161  isIgnored = cms.bool(False)
162  )
163 
# Configure the cut on the tracker isolation
def heepElectronID_tools.psetGsfEleMissingHitsCut (   wpEB,
  wpEE 
)

Definition at line 210 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

211 def psetGsfEleMissingHitsCut(wpEB, wpEE):
212  return cms.PSet(
213  cutName = cms.string('GsfEleMissingHitsCut'),
214  maxMissingHitsEB = cms.uint32( wpEB.maxMissingHitsCut ),
215  maxMissingHitsEE = cms.uint32( wpEE.maxMissingHitsCut ),
216  barrelCutOff = cms.double(ebCutOff),
217  needsAdditionalProducts = cms.bool(False),
218  isIgnored = cms.bool(False)
)
def heepElectronID_tools.psetGsfEleSCEtaMultiRangeCut ( )

Definition at line 85 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

85 
87  return cms.PSet(
88  cutName = cms.string("GsfEleSCEtaMultiRangeCut"),
89  useAbsEta = cms.bool(True),
90  allowedEtaRanges = cms.VPSet(
91  cms.PSet( minEta = cms.double(0.0),
92  maxEta = cms.double(ebMax) ),
93  cms.PSet( minEta = cms.double(eeMin),
94  maxEta = cms.double(2.5) )
95  ),
96  needsAdditionalProducts = cms.bool(False),
97  isIgnored = cms.bool(False)
98  )
99 
# Configure the cut on the dEtaIn for the seed
def heepElectronID_tools.psetGsfEleTrkPtIsoCut (   wpEB,
  wpEE 
)

Definition at line 164 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

165 def psetGsfEleTrkPtIsoCut(wpEB, wpEE):
166  return cms.PSet(
167  cutName = cms.string('GsfEleTrkPtIsoCut'),
168  # Three constants for the GsfEleTrkPtIsoCut
169  # cut = constTerm if value < slopeStart
170  # cut = slopeTerm * (value - slopeStart) + constTerm if value >= slopeStart
171  slopeTermEB = cms.double( wpEB.trkIsoSlopeTerm ),
172  slopeTermEE = cms.double( wpEE.trkIsoSlopeTerm ),
173  slopeStartEB = cms.double( wpEB.trkIsoSlopeStart ),
174  slopeStartEE = cms.double( wpEE.trkIsoSlopeStart ),
175  constTermEB = cms.double( wpEB.trkIsoConstTerm ),
176  constTermEE = cms.double( wpEE.trkIsoConstTerm ),
177  needsAdditionalProducts = cms.bool(False),
178  isIgnored = cms.bool(False)
179  )
180 
# Configure the cut on the EM + Had_depth_1 isolation with rho correction
def heepElectronID_tools.psetMinPtCut ( )

Definition at line 76 of file heepElectronID_tools.py.

Referenced by configureHEEPElectronID_V51(), and configureHEEPElectronID_V60().

76 
77 def psetMinPtCut():
78  return cms.PSet(
79  cutName = cms.string("MinPtCut"),
80  minPt = cms.double(35.0),
81  needsAdditionalProducts = cms.bool(False),
82  isIgnored = cms.bool(False)
83  )
84 
# Take all particles in the eta ranges 0-ebMax and eeMin-2.5

Variable Documentation

float heepElectronID_tools.ebCutOff = 1.479

Definition at line 6 of file heepElectronID_tools.py.

float heepElectronID_tools.ebMax = 1.4442

Definition at line 4 of file heepElectronID_tools.py.

float heepElectronID_tools.eeMin = 1.566

Definition at line 5 of file heepElectronID_tools.py.