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());
125 float mHits = ele.
gsfTrack()->trackerExpectedHitsInner().numberOfHits();
129 sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho, EAtarget);
141 const double &iso_ch,
142 const double &iso_em,
143 const double &iso_nh,
146 return TestWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho, EAtarget);
153 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
154 const float ooemoop,
const float d0vtx,
const float dzvtx,
const float iso_ch,
const float iso_em,
const float iso_nh,
158 sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho, EAtarget);
160 if ((mask &
PassAll) == PassAll)
return true;
165 const bool isEB,
const float pt,
166 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
167 const float trackIso,
const float ecalIso,
const float hcalIso)
172 unsigned int idx = isEB ? 0 : 1;
175 float cut_dEtaIn[2] = {0.007, 0.009};
176 float cut_dPhiIn[2] = {0.15, 0.10};
177 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
178 float cut_hoe[2] = {0.12, 0.10};
179 float cut_trackIso[2] = {0.20, 0.20};
180 float cut_ecalIso[2] = {0.20, 0.20};
181 float cut_hcalIso[2] = {0.20, 0.20};
182 if (fabs(dEtaIn) > cut_dEtaIn[idx])
return false;
183 if (fabs(dPhiIn) > cut_dPhiIn[idx])
return false;
184 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
return false;
185 if (hoe > cut_hoe[idx])
return false;
186 if (trackIso / pt > cut_trackIso[idx])
return false;
187 if (ecalIso / pt > cut_ecalIso[idx])
return false;
188 if (hcalIso / pt > cut_hcalIso[idx])
return false;
191 float cut_dEtaIn[2] = {0.004, 0.005};
192 float cut_dPhiIn[2] = {0.03, 0.02};
193 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
194 float cut_hoe[2] = {0.025, 0.025};
195 float cut_trackIso[2] = {0.10, 0.10};
196 float cut_ecalIso[2] = {0.10, 0.05};
197 float cut_hcalIso[2] = {0.05, 0.05};
198 if (fabs(dEtaIn) > cut_dEtaIn[idx])
return false;
199 if (fabs(dPhiIn) > cut_dPhiIn[idx])
return false;
200 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
return false;
201 if (hoe > cut_hoe[idx])
return false;
202 if (trackIso / pt > cut_trackIso[idx])
return false;
203 if (ecalIso / pt > cut_ecalIso[idx])
return false;
204 if (hcalIso / pt > cut_hcalIso[idx])
return false;
207 std::cout <<
"[EgammaCutBasedEleId::PassTriggerCuts] Undefined working point" << std::endl;
215 if (fbrem > 0.15)
return true;
216 else if (fabs(eta) < 1.0 && eopin > 0.95)
return true;
221 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
222 const float ooemoop,
const float d0vtx,
const float dzvtx,
const float iso_ch,
const float iso_em,
const float iso_nh,
226 unsigned int mask = 0;
227 float cut_dEtaIn[2] = {999.9, 999.9};
228 float cut_dPhiIn[2] = {999.9, 999.9};
229 float cut_sigmaIEtaIEta[2] = {999.9, 999.9};
230 float cut_hoe[2] = {999.9, 999.9};
231 float cut_ooemoop[2] = {999.9, 999.9};
232 float cut_d0vtx[2] = {999.9, 999.9};
233 float cut_dzvtx[2] = {999.9, 999.9};
234 float cut_iso[2] = {999.9, 999.9};
235 bool cut_vtxFit[2] = {
false,
false};
236 unsigned int cut_mHits[2] = {999, 999};
239 cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.010;
240 cut_dPhiIn[0] = 0.800; cut_dPhiIn[1] = 0.700;
241 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
242 cut_hoe[0] = 0.150; cut_hoe[1] = 999.9;
243 cut_ooemoop[0] = 999.9; cut_ooemoop[1] = 999.9;
244 cut_d0vtx[0] = 0.040; cut_d0vtx[1] = 0.040;
245 cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
246 cut_vtxFit[0] =
false; cut_vtxFit[1] =
false;
247 cut_mHits[0] = 999 ; cut_mHits[1] = 999;
248 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
251 cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.009;
252 cut_dPhiIn[0] = 0.150; cut_dPhiIn[1] = 0.100;
253 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
254 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
255 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
256 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
257 cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
258 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
259 cut_mHits[0] = 1 ; cut_mHits[1] = 1;
261 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
264 cut_iso[0] = 0.150; cut_iso[1] = 0.100;
268 cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.007;
269 cut_dPhiIn[0] = 0.060; cut_dPhiIn[1] = 0.030;
270 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
271 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
272 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
273 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
274 cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
275 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
276 cut_mHits[0] = 1 ; cut_mHits[1] = 1;
278 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
281 cut_iso[0] = 0.150; cut_iso[1] = 0.100;
285 cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.005;
286 cut_dPhiIn[0] = 0.030; cut_dPhiIn[1] = 0.020;
287 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
288 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
289 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
290 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
291 cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
292 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
293 cut_mHits[0] = 0 ; cut_mHits[1] = 0;
295 cut_iso[0] = 0.100; cut_iso[1] = 0.100;
298 cut_iso[0] = 0.100; cut_iso[1] = 0.070;
302 std::cout <<
"[EgammaCutBasedEleId::TestWP] Undefined working point" << std::endl;
306 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
float deltaEtaSuperClusterTrackAtVtx() const
float sigmaIetaIeta() const
float hadronicOverEm() const
const T & max(const T &a, const T &b)
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
virtual double pt() const
transverse momentum
float dr03EcalRecHitSumEt() const
float dr03HcalTowerSumEt() const
const Point & position() const
position
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack