22 unsigned int mask =
TestWP(workingPoint, ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho, EAtarget);
25 if ((mask &
PassAll) == PassAll)
return true;
40 return PassWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho, EAtarget);
47 bool isEB = ele.
isEB() ?
true :
false;
73 float fbrem = ele.
fbrem();
100 bool isEB = ele.
isEB() ?
true :
false;
114 if (vtxs->size() > 0) {
116 d0vtx = ele.
gsfTrack()->dxy(vtx->position());
117 dzvtx = ele.
gsfTrack()->dz(vtx->position());
129 sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho, EAtarget);
140 const double &iso_ch,
141 const double &iso_em,
142 const double &iso_nh,
145 return TestWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho, EAtarget);
152 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
153 const float ooemoop,
const float d0vtx,
const float dzvtx,
const float iso_ch,
const float iso_em,
const float iso_nh,
157 sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho, EAtarget);
159 if ((mask &
PassAll) == PassAll)
return true;
164 const bool isEB,
const float pt,
165 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
166 const float trackIso,
const float ecalIso,
const float hcalIso)
171 unsigned int idx = isEB ? 0 : 1;
174 float cut_dEtaIn[2] = {0.007, 0.009};
175 float cut_dPhiIn[2] = {0.15, 0.10};
176 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
177 float cut_hoe[2] = {0.12, 0.10};
178 float cut_trackIso[2] = {0.20, 0.20};
179 float cut_ecalIso[2] = {0.20, 0.20};
180 float cut_hcalIso[2] = {0.20, 0.20};
181 if (fabs(dEtaIn) > cut_dEtaIn[idx])
return false;
182 if (fabs(dPhiIn) > cut_dPhiIn[idx])
return false;
183 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
return false;
184 if (hoe > cut_hoe[idx])
return false;
185 if (trackIso / pt > cut_trackIso[idx])
return false;
186 if (ecalIso / pt > cut_ecalIso[idx])
return false;
187 if (hcalIso / pt > cut_hcalIso[idx])
return false;
190 float cut_dEtaIn[2] = {0.004, 0.005};
191 float cut_dPhiIn[2] = {0.03, 0.02};
192 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
193 float cut_hoe[2] = {0.025, 0.025};
194 float cut_trackIso[2] = {0.10, 0.10};
195 float cut_ecalIso[2] = {0.10, 0.05};
196 float cut_hcalIso[2] = {0.05, 0.05};
197 if (fabs(dEtaIn) > cut_dEtaIn[idx])
return false;
198 if (fabs(dPhiIn) > cut_dPhiIn[idx])
return false;
199 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
return false;
200 if (hoe > cut_hoe[idx])
return false;
201 if (trackIso / pt > cut_trackIso[idx])
return false;
202 if (ecalIso / pt > cut_ecalIso[idx])
return false;
203 if (hcalIso / pt > cut_hcalIso[idx])
return false;
206 std::cout <<
"[EgammaCutBasedEleId::PassTriggerCuts] Undefined working point" << std::endl;
214 if (fbrem > 0.15)
return true;
215 else if (fabs(eta) < 1.0 && eopin > 0.95)
return true;
220 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
221 const float ooemoop,
const float d0vtx,
const float dzvtx,
const float iso_ch,
const float iso_em,
const float iso_nh,
225 unsigned int mask = 0;
226 float cut_dEtaIn[2] = {999.9, 999.9};
227 float cut_dPhiIn[2] = {999.9, 999.9};
228 float cut_sigmaIEtaIEta[2] = {999.9, 999.9};
229 float cut_hoe[2] = {999.9, 999.9};
230 float cut_ooemoop[2] = {999.9, 999.9};
231 float cut_d0vtx[2] = {999.9, 999.9};
232 float cut_dzvtx[2] = {999.9, 999.9};
233 float cut_iso[2] = {999.9, 999.9};
234 bool cut_vtxFit[2] = {
false,
false};
235 unsigned int cut_mHits[2] = {999, 999};
238 cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.010;
239 cut_dPhiIn[0] = 0.800; cut_dPhiIn[1] = 0.700;
240 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
241 cut_hoe[0] = 0.150; cut_hoe[1] = 999.9;
242 cut_ooemoop[0] = 999.9; cut_ooemoop[1] = 999.9;
243 cut_d0vtx[0] = 0.040; cut_d0vtx[1] = 0.040;
244 cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
245 cut_vtxFit[0] =
false; cut_vtxFit[1] =
false;
246 cut_mHits[0] = 999 ; cut_mHits[1] = 999;
247 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
250 cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.009;
251 cut_dPhiIn[0] = 0.150; cut_dPhiIn[1] = 0.100;
252 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
253 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
254 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
255 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
256 cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
257 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
258 cut_mHits[0] = 1 ; cut_mHits[1] = 1;
260 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
263 cut_iso[0] = 0.150; cut_iso[1] = 0.100;
267 cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.007;
268 cut_dPhiIn[0] = 0.060; cut_dPhiIn[1] = 0.030;
269 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
270 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
271 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
272 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
273 cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
274 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
275 cut_mHits[0] = 1 ; cut_mHits[1] = 1;
277 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
280 cut_iso[0] = 0.150; cut_iso[1] = 0.100;
284 cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.005;
285 cut_dPhiIn[0] = 0.030; cut_dPhiIn[1] = 0.020;
286 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
287 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
288 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
289 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
290 cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
291 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
292 cut_mHits[0] = 0 ; cut_mHits[1] = 0;
294 cut_iso[0] = 0.100; cut_iso[1] = 0.100;
297 cut_iso[0] = 0.100; cut_iso[1] = 0.070;
301 std::cout <<
"[EgammaCutBasedEleId::TestWP] Undefined working point" << std::endl;
305 unsigned int idx = isEB ? 0 : 1;
312 double rhoPrime =
std::max(rho, 0.0);
313 double iso_n =
std::max(iso_nh + iso_em - rhoPrime * AEff, 0.0);
316 double iso = (iso_n + iso_ch) / pt;
319 if (fabs(dEtaIn) < cut_dEtaIn[
idx]) mask |=
DETAIN;
320 if (fabs(dPhiIn) < cut_dPhiIn[
idx]) mask |=
DPHIIN;
321 if (sigmaIEtaIEta < cut_sigmaIEtaIEta[idx]) mask |=
SIGMAIETAIETA;
322 if (hoe < cut_hoe[idx]) mask |=
HOE;
323 if (fabs(ooemoop) < cut_ooemoop[
idx]) mask |=
OOEMOOP;
324 if (fabs(d0vtx) < cut_d0vtx[
idx]) mask |=
D0VTX;
325 if (fabs(dzvtx) < cut_dzvtx[
idx]) mask |=
DZVTX;
326 if (!cut_vtxFit[idx] || !vtxFitConversion) mask |=
VTXFIT;
327 if (mHits <= cut_mHits[idx]) mask |=
MHITS;
328 if (iso < cut_iso[idx]) mask |=
ISO;
337 printf(
"detain(%i), ",
bool(mask &
DETAIN));
338 printf(
"dphiin(%i), ",
bool(mask &
DPHIIN));
340 printf(
"hoe(%i), ",
bool(mask &
HOE));
341 printf(
"ooemoop(%i), ",
bool(mask &
OOEMOOP));
342 printf(
"d0vtx(%i), ",
bool(mask &
D0VTX));
343 printf(
"dzvtx(%i), ",
bool(mask &
DZVTX));
344 printf(
"iso(%i), ",
bool(mask &
ISO));
345 printf(
"vtxfit(%i), ",
bool(mask &
VTXFIT));
346 printf(
"mhits(%i)\n",
bool(mask &
MHITS));
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)
ElectronEffectiveAreaTarget
virtual double pt() const
transverse momentum
float deltaEtaSuperClusterTrackAtVtx() const
float sigmaIetaIeta() const
float hadronicOverEm() const
bool PassTriggerCuts(const TriggerWorkingPoint triggerWorkingPoint, const reco::GsfElectronRef &ele)
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
float deltaPhiSuperClusterTrackAtVtx() const
bool PassEoverPCuts(const reco::GsfElectronRef &ele)
float dr03TkSumPt() const
static const unsigned int PassAll
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
float dr03EcalRecHitSumEt() const
float dr03HcalTowerSumEt() const
const Point & position() const
position
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack