21 unsigned int mask =
TestWP(workingPoint, ele, conversions, beamspot, vtxs, iso_ch, iso_em, iso_nh, rho);
24 if ((mask &
PassAll) == PassAll)
return true;
38 return PassWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho);
45 bool isEB = ele.
isEB() ?
true :
false;
71 float fbrem = ele.
fbrem();
97 bool isEB = ele.
isEB() ?
true :
false;
111 if (vtxs->size() > 0) {
113 d0vtx = ele.
gsfTrack()->dxy(vtx->position());
114 dzvtx = ele.
gsfTrack()->dz(vtx->position());
122 float mHits = ele.
gsfTrack()->trackerExpectedHitsInner().numberOfHits();
126 sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho);
138 const double &iso_ch,
139 const double &iso_em,
140 const double &iso_nh,
142 return TestWP(workingPoint,*ele,conversions,beamspot,vtxs,iso_ch,iso_em,iso_nh,rho);
149 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
150 const float ooemoop,
const float d0vtx,
const float dzvtx,
const float iso_ch,
const float iso_em,
const float iso_nh,
151 const bool vtxFitConversion,
const unsigned int mHits,
const double rho)
154 sigmaIEtaIEta, hoe, ooemoop, d0vtx, dzvtx, iso_ch, iso_em, iso_nh, vtxFitConversion, mHits, rho);
156 if ((mask &
PassAll) == PassAll)
return true;
161 const bool isEB,
const float pt,
162 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
163 const float trackIso,
const float ecalIso,
const float hcalIso)
168 unsigned int idx = isEB ? 0 : 1;
171 float cut_dEtaIn[2] = {0.007, 0.009};
172 float cut_dPhiIn[2] = {0.15, 0.10};
173 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
174 float cut_hoe[2] = {0.12, 0.10};
175 float cut_trackIso[2] = {0.20, 0.20};
176 float cut_ecalIso[2] = {0.20, 0.20};
177 float cut_hcalIso[2] = {0.20, 0.20};
178 if (fabs(dEtaIn) > cut_dEtaIn[idx])
return false;
179 if (fabs(dPhiIn) > cut_dPhiIn[idx])
return false;
180 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
return false;
181 if (hoe > cut_hoe[idx])
return false;
182 if (trackIso / pt > cut_trackIso[idx])
return false;
183 if (ecalIso / pt > cut_ecalIso[idx])
return false;
184 if (hcalIso / pt > cut_hcalIso[idx])
return false;
187 float cut_dEtaIn[2] = {0.004, 0.005};
188 float cut_dPhiIn[2] = {0.03, 0.02};
189 float cut_sigmaIEtaIEta[2] = {0.01, 0.03};
190 float cut_hoe[2] = {0.025, 0.025};
191 float cut_trackIso[2] = {0.10, 0.10};
192 float cut_ecalIso[2] = {0.10, 0.05};
193 float cut_hcalIso[2] = {0.05, 0.05};
194 if (fabs(dEtaIn) > cut_dEtaIn[idx])
return false;
195 if (fabs(dPhiIn) > cut_dPhiIn[idx])
return false;
196 if (sigmaIEtaIEta > cut_sigmaIEtaIEta[idx])
return false;
197 if (hoe > cut_hoe[idx])
return false;
198 if (trackIso / pt > cut_trackIso[idx])
return false;
199 if (ecalIso / pt > cut_ecalIso[idx])
return false;
200 if (hcalIso / pt > cut_hcalIso[idx])
return false;
203 std::cout <<
"[EgammaCutBasedEleId::PassTriggerCuts] Undefined working point" << std::endl;
211 if (fbrem > 0.15)
return true;
212 else if (fabs(eta) < 1.0 && eopin > 0.95)
return true;
217 const float dEtaIn,
const float dPhiIn,
const float sigmaIEtaIEta,
const float hoe,
218 const float ooemoop,
const float d0vtx,
const float dzvtx,
const float iso_ch,
const float iso_em,
const float iso_nh,
219 const bool vtxFitConversion,
const unsigned int mHits,
const double rho)
222 unsigned int mask = 0;
223 float cut_dEtaIn[2] = {999.9, 999.9};
224 float cut_dPhiIn[2] = {999.9, 999.9};
225 float cut_sigmaIEtaIEta[2] = {999.9, 999.9};
226 float cut_hoe[2] = {999.9, 999.9};
227 float cut_ooemoop[2] = {999.9, 999.9};
228 float cut_d0vtx[2] = {999.9, 999.9};
229 float cut_dzvtx[2] = {999.9, 999.9};
230 float cut_iso[2] = {999.9, 999.9};
231 bool cut_vtxFit[2] = {
false,
false};
232 unsigned int cut_mHits[2] = {999, 999};
235 cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.010;
236 cut_dPhiIn[0] = 0.800; cut_dPhiIn[1] = 0.700;
237 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
238 cut_hoe[0] = 0.150; cut_hoe[1] = 999.9;
239 cut_ooemoop[0] = 999.9; cut_ooemoop[1] = 999.9;
240 cut_d0vtx[0] = 0.040; cut_d0vtx[1] = 0.040;
241 cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
242 cut_vtxFit[0] =
false; cut_vtxFit[1] =
false;
243 cut_mHits[0] = 999 ; cut_mHits[1] = 999;
244 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
247 cut_dEtaIn[0] = 0.007; cut_dEtaIn[1] = 0.009;
248 cut_dPhiIn[0] = 0.150; cut_dPhiIn[1] = 0.100;
249 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
250 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
251 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
252 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
253 cut_dzvtx[0] = 0.200; cut_dzvtx[1] = 0.200;
254 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
255 cut_mHits[0] = 1 ; cut_mHits[1] = 1;
257 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
260 cut_iso[0] = 0.150; cut_iso[1] = 0.100;
264 cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.007;
265 cut_dPhiIn[0] = 0.060; cut_dPhiIn[1] = 0.030;
266 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
267 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
268 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
269 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
270 cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
271 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
272 cut_mHits[0] = 1 ; cut_mHits[1] = 1;
274 cut_iso[0] = 0.150; cut_iso[1] = 0.150;
277 cut_iso[0] = 0.150; cut_iso[1] = 0.100;
281 cut_dEtaIn[0] = 0.004; cut_dEtaIn[1] = 0.005;
282 cut_dPhiIn[0] = 0.030; cut_dPhiIn[1] = 0.020;
283 cut_sigmaIEtaIEta[0] = 0.010; cut_sigmaIEtaIEta[1] = 0.030;
284 cut_hoe[0] = 0.120; cut_hoe[1] = 0.100;
285 cut_ooemoop[0] = 0.050; cut_ooemoop[1] = 0.050;
286 cut_d0vtx[0] = 0.020; cut_d0vtx[1] = 0.020;
287 cut_dzvtx[0] = 0.100; cut_dzvtx[1] = 0.100;
288 cut_vtxFit[0] =
true ; cut_vtxFit[1] =
true;
289 cut_mHits[0] = 0 ; cut_mHits[1] = 0;
291 cut_iso[0] = 0.100; cut_iso[1] = 0.100;
294 cut_iso[0] = 0.100; cut_iso[1] = 0.070;
298 std::cout <<
"[EgammaCutBasedEleId::TestWP] Undefined working point" << std::endl;
302 unsigned int idx = isEB ? 0 : 1;
308 double rhoPrime =
std::max(rho, 0.0);
309 double iso_n =
std::max(iso_nh + iso_em - rhoPrime * AEff, 0.0);
312 double iso = (iso_n + iso_ch) / pt;
315 if (fabs(dEtaIn) < cut_dEtaIn[
idx]) mask |=
DETAIN;
316 if (fabs(dPhiIn) < cut_dPhiIn[
idx]) mask |=
DPHIIN;
317 if (sigmaIEtaIEta < cut_sigmaIEtaIEta[idx]) mask |=
SIGMAIETAIETA;
318 if (hoe < cut_hoe[idx]) mask |=
HOE;
319 if (fabs(ooemoop) < cut_ooemoop[
idx]) mask |=
OOEMOOP;
320 if (fabs(d0vtx) < cut_d0vtx[
idx]) mask |=
D0VTX;
321 if (fabs(dzvtx) < cut_dzvtx[
idx]) mask |=
DZVTX;
322 if (!cut_vtxFit[idx] || !vtxFitConversion) mask |=
VTXFIT;
323 if (mHits <= cut_mHits[idx]) mask |=
MHITS;
324 if (iso < cut_iso[idx]) mask |=
ISO;
333 printf(
"detain(%i), ",
bool(mask &
DETAIN));
334 printf(
"dphiin(%i), ",
bool(mask &
DPHIIN));
336 printf(
"hoe(%i), ",
bool(mask &
HOE));
337 printf(
"ooemoop(%i), ",
bool(mask &
OOEMOOP));
338 printf(
"d0vtx(%i), ",
bool(mask &
D0VTX));
339 printf(
"dzvtx(%i), ",
bool(mask &
DZVTX));
340 printf(
"iso(%i), ",
bool(mask &
ISO));
341 printf(
"vtxfit(%i), ",
bool(mask &
VTXFIT));
342 printf(
"mhits(%i)\n",
bool(mask &
MHITS));
float eSuperClusterOverP() const
void PrintDebug(unsigned int mask)
static Double_t GetElectronEffectiveArea(ElectronEffectiveAreaType type, Double_t SCEta, ElectronEffectiveAreaTarget EffectiveAreaTarget=kEleEAData2011)
float deltaEtaSuperClusterTrackAtVtx() const
float sigmaIetaIeta() const
float hadronicOverEm() const
const T & max(const T &a, const T &b)
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)
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)
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)
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 float pt() const GCC11_FINAL
transverse momentum
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack