21 unsigned int mask =
TestWP(workingPoint, ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
24 if ((mask &
PassAll) == PassAll)
39 return PassWP(workingPoint, *ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
44 bool isEB = ele.
isEB() ?
true :
false;
56 triggerWorkingPoint, isEB, pt, dEtaIn, dPhiIn, sigmaIEtaIEta, hoe, trackIso, ecalIso, hcalIso);
67 float fbrem = ele.
fbrem();
88 bool isEB = ele.
isEB() ?
true :
false;
102 if (!vtxs->empty()) {
104 d0vtx = ele.
gsfTrack()->dxy(vtx->position());
105 dzvtx = ele.
gsfTrack()->dz(vtx->position());
144 const double &iso_ch,
145 const double &iso_em,
146 const double &iso_nh,
149 return TestWP(workingPoint, *ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
160 const float sigmaIEtaIEta,
168 const bool vtxFitConversion,
169 const unsigned int mHits,
191 if ((mask &
PassAll) == PassAll)
201 const float sigmaIEtaIEta,
203 const float trackIso,
205 const float hcalIso) {
207 unsigned int idx = isEB ? 0 : 1;
210 float cut_dEtaIn[2] = {0.007, 0.009};
211 float cut_dPhiIn[2] = {0.15, 0.10};
212 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
213 float cut_hoe[2] = {0.12, 0.10};
214 float cut_trackIso[2] = {0.20, 0.20};
215 float cut_ecalIso[2] = {0.20, 0.20};
216 float cut_hcalIso[2] = {0.20, 0.20};
217 if (fabs(dEtaIn) > cut_dEtaIn[idx])
219 if (fabs(dPhiIn) > cut_dPhiIn[idx])
221 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
223 if (hoe > cut_hoe[idx])
225 if (trackIso / pt > cut_trackIso[idx])
227 if (ecalIso / pt > cut_ecalIso[idx])
229 if (hcalIso / pt > cut_hcalIso[idx])
232 float cut_dEtaIn[2] = {0.004, 0.005};
233 float cut_dPhiIn[2] = {0.03, 0.02};
234 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
235 float cut_hoe[2] = {0.025, 0.025};
236 float cut_trackIso[2] = {0.10, 0.10};
237 float cut_ecalIso[2] = {0.10, 0.05};
238 float cut_hcalIso[2] = {0.05, 0.05};
239 if (fabs(dEtaIn) > cut_dEtaIn[idx])
241 if (fabs(dPhiIn) > cut_dPhiIn[idx])
243 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
245 if (hoe > cut_hoe[idx])
247 if (trackIso / pt > cut_trackIso[idx])
249 if (ecalIso / pt > cut_ecalIso[idx])
251 if (hcalIso / pt > cut_hcalIso[idx])
254 std::cout <<
"[EgammaCutBasedEleId::PassTriggerCuts] Undefined working point" << std::endl;
263 else if (fabs(eta) < 1.0 && eopin > 0.95)
274 const float sigmaIEtaIEta,
282 const bool vtxFitConversion,
283 const unsigned int mHits,
286 unsigned int mask = 0;
287 float cut_dEtaIn[2] = {999.9, 999.9};
288 float cut_dPhiIn[2] = {999.9, 999.9};
289 float cut_sigmaIEtaIEta[2] = {999.9, 999.9};
290 float cut_hoe[2] = {999.9, 999.9};
291 float cut_ooemoop[2] = {999.9, 999.9};
292 float cut_d0vtx[2] = {999.9, 999.9};
293 float cut_dzvtx[2] = {999.9, 999.9};
294 float cut_iso[2] = {999.9, 999.9};
295 bool cut_vtxFit[2] = {
false,
false};
296 unsigned int cut_mHits[2] = {999, 999};
299 cut_dEtaIn[0] = 0.007;
300 cut_dEtaIn[1] = 0.010;
301 cut_dPhiIn[0] = 0.800;
302 cut_dPhiIn[1] = 0.700;
303 cut_sigmaIEtaIEta[0] = 0.010;
304 cut_sigmaIEtaIEta[1] = 0.030;
307 cut_ooemoop[0] = 999.9;
308 cut_ooemoop[1] = 999.9;
309 cut_d0vtx[0] = 0.040;
310 cut_d0vtx[1] = 0.040;
311 cut_dzvtx[0] = 0.200;
312 cut_dzvtx[1] = 0.200;
313 cut_vtxFit[0] =
false;
314 cut_vtxFit[1] =
false;
320 cut_dEtaIn[0] = 0.007;
321 cut_dEtaIn[1] = 0.009;
322 cut_dPhiIn[0] = 0.150;
323 cut_dPhiIn[1] = 0.100;
324 cut_sigmaIEtaIEta[0] = 0.010;
325 cut_sigmaIEtaIEta[1] = 0.030;
328 cut_ooemoop[0] = 0.050;
329 cut_ooemoop[1] = 0.050;
330 cut_d0vtx[0] = 0.020;
331 cut_d0vtx[1] = 0.020;
332 cut_dzvtx[0] = 0.200;
333 cut_dzvtx[1] = 0.200;
334 cut_vtxFit[0] =
true;
335 cut_vtxFit[1] =
true;
346 cut_dEtaIn[0] = 0.004;
347 cut_dEtaIn[1] = 0.007;
348 cut_dPhiIn[0] = 0.060;
349 cut_dPhiIn[1] = 0.030;
350 cut_sigmaIEtaIEta[0] = 0.010;
351 cut_sigmaIEtaIEta[1] = 0.030;
354 cut_ooemoop[0] = 0.050;
355 cut_ooemoop[1] = 0.050;
356 cut_d0vtx[0] = 0.020;
357 cut_d0vtx[1] = 0.020;
358 cut_dzvtx[0] = 0.100;
359 cut_dzvtx[1] = 0.100;
360 cut_vtxFit[0] =
true;
361 cut_vtxFit[1] =
true;
372 cut_dEtaIn[0] = 0.004;
373 cut_dEtaIn[1] = 0.005;
374 cut_dPhiIn[0] = 0.030;
375 cut_dPhiIn[1] = 0.020;
376 cut_sigmaIEtaIEta[0] = 0.010;
377 cut_sigmaIEtaIEta[1] = 0.030;
380 cut_ooemoop[0] = 0.050;
381 cut_ooemoop[1] = 0.050;
382 cut_d0vtx[0] = 0.020;
383 cut_d0vtx[1] = 0.020;
384 cut_dzvtx[0] = 0.100;
385 cut_dzvtx[1] = 0.100;
386 cut_vtxFit[0] =
true;
387 cut_vtxFit[1] =
true;
398 std::cout <<
"[EgammaCutBasedEleId::TestWP] Undefined working point" << std::endl;
402 unsigned int idx = isEB ? 0 : 1;
410 double rhoPrime =
std::max(rho, 0.0);
411 double iso_n =
std::max(iso_nh + iso_em - rhoPrime * AEff, 0.0);
414 double iso = (iso_n + iso_ch) / pt;
417 if (fabs(dEtaIn) < cut_dEtaIn[idx])
419 if (fabs(dPhiIn) < cut_dPhiIn[idx])
421 if (sigmaIEtaIEta < cut_sigmaIEtaIEta[idx])
423 if (hoe < cut_hoe[idx])
425 if (fabs(ooemoop) < cut_ooemoop[idx])
427 if (fabs(d0vtx) < cut_d0vtx[idx])
429 if (fabs(dzvtx) < cut_dzvtx[idx])
431 if (!cut_vtxFit[idx] || !vtxFitConversion)
433 if (mHits <= cut_mHits[idx])
435 if (iso < cut_iso[idx])
double pt() const final
transverse momentum
float eSuperClusterOverP() const
unsigned int TestWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
void PrintDebug(unsigned int mask)
bool PassWP(const WorkingPoint workingPoint, const reco::GsfElectronRef &ele, const edm::Handle< reco::ConversionCollection > &conversions, const reco::BeamSpot &beamspot, const edm::Handle< reco::VertexCollection > &vtxs, const double &iso_ch, const double &iso_em, const double &iso_nh, const double &rho, ElectronEffectiveArea::ElectronEffectiveAreaTarget EAtarget)
static Double_t GetElectronEffectiveArea(ElectronEffectiveAreaType type, Double_t SCEta, ElectronEffectiveAreaTarget EffectiveAreaTarget=kEleEAData2011)
float dr03HcalTowerSumEt(int depth=0) const
ElectronEffectiveAreaTarget
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
float deltaEtaSuperClusterTrackAtVtx() const
float sigmaIetaIeta() const
float hadronicOverEm() const
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
float deltaPhiSuperClusterTrackAtVtx() const
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
float dr03TkSumPt() const
static const unsigned int PassAll
float dr03EcalRecHitSumEt() const
const Point & position() const
position
SuperClusterRef superCluster() const override
reference to a SuperCluster