1 #ifndef PhysicsTools_PatUtils_interface_SimpleCutBasedElectronIDSelectionFunctor_h 2 #define PhysicsTools_PatUtils_interface_SimpleCutBasedElectronIDSelectionFunctor_h 84 parameters.getParameter<Double_t>(
"ecalIso_EB"),
85 parameters.getParameter<Double_t>(
"hcalIso_EB"),
91 parameters.getParameter<Double_t>(
"trackIso_EE"),
92 parameters.getParameter<Double_t>(
"ecalIso_EE"),
93 parameters.getParameter<Double_t>(
"hcalIso_EE"),
99 parameters.getParameter<Int_t>(
"conversionRejection"),
100 parameters.getParameter<Int_t>(
"maxNumberOfExpectedMissingHits"));
106 std::cout <<
"SimpleCutBasedElectronIDSelectionFunctor: If you want to use version NONE " 107 <<
"then you have also to provide the selection cuts by yourself " << std::endl;
108 std::cout <<
"SimpleCutBasedElectronIDSelectionFunctor: ID Version is changed to 80cIso " << std::endl;
137 push_back(
"maxNumberOfExpectedMissingHits");
140 set(
"trackIso_EB", 1.5e-01);
141 set(
"ecalIso_EB", 2.0e+00);
142 set(
"hcalIso_EB", 1.2e-01);
143 set(
"sihih_EB", 1.0e-02);
144 set(
"dphi_EB", 8.0e-01);
145 set(
"deta_EB", 7.0e-03);
146 set(
"hoe_EB", 1.5e-01);
147 set(
"cIso_EB", 10000.);
149 set(
"trackIso_EE", 8.0e-02);
150 set(
"ecalIso_EE", 6.0e-02);
151 set(
"hcalIso_EE", 5.0e-02);
152 set(
"sihih_EE", 3.0e-02);
153 set(
"dphi_EE", 7.0e-01);
154 set(
"deta_EE", 1.0e-02);
155 set(
"hoe_EE", 7.0e-02);
156 set(
"cIso_EE", 10000.);
158 set(
"conversionRejection", 0);
159 set(
"maxNumberOfExpectedMissingHits", 1);
162 set(
"trackIso_EB", 100000.);
163 set(
"ecalIso_EB", 100000.);
164 set(
"hcalIso_EB", 100000.);
165 set(
"sihih_EB", 1.0e-02);
166 set(
"dphi_EB", 8.0e-01);
167 set(
"deta_EB", 7.0e-03);
168 set(
"hoe_EB", 1.5e-01);
169 set(
"cIso_EB", 1.5e-01);
171 set(
"trackIso_EE", 100000.);
172 set(
"ecalIso_EE", 100000.);
173 set(
"hcalIso_EE", 100000.);
174 set(
"sihih_EE", 3.0e-02);
175 set(
"dphi_EE", 7.0e-01);
176 set(
"deta_EE", 1.0e-02);
177 set(
"hoe_EE", 7.0e-02);
178 set(
"cIso_EE", 1.0e-01);
180 set(
"conversionRejection", 0);
181 set(
"maxNumberOfExpectedMissingHits", 1);
184 set(
"trackIso_EB", 1.2e-01);
185 set(
"ecalIso_EB", 9.0e-02);
186 set(
"hcalIso_EB", 1.0e-01);
187 set(
"sihih_EB", 1.0e-02);
188 set(
"dphi_EB", 8.0e-01);
189 set(
"deta_EB", 7.0e-03);
190 set(
"hoe_EB", 1.2e-01);
191 set(
"cIso_EB", 10000.);
193 set(
"trackIso_EE", 5.0e-02);
194 set(
"ecalIso_EE", 6.0e-02);
195 set(
"hcalIso_EE", 3.0e-02);
196 set(
"sihih_EE", 3.0e-02);
197 set(
"dphi_EE", 7.0e-01);
198 set(
"deta_EE", 9.0e-03);
199 set(
"hoe_EE", 5.0e-02);
200 set(
"cIso_EE", 10000.);
202 set(
"conversionRejection", 1);
203 set(
"maxNumberOfExpectedMissingHits", 1);
205 set(
"trackIso_EB", 100000.);
206 set(
"ecalIso_EB", 100000.);
207 set(
"hcalIso_EB", 100000.);
208 set(
"sihih_EB", 1.0e-02);
209 set(
"dphi_EB", 8.0e-01);
210 set(
"deta_EB", 7.0e-03);
211 set(
"hoe_EB", 1.2e-01);
212 set(
"cIso_EB", 1.0e-01);
214 set(
"trackIso_EE", 100000.);
215 set(
"ecalIso_EE", 100000.);
216 set(
"hcalIso_EE", 100000.);
217 set(
"sihih_EE", 3.0e-02);
218 set(
"dphi_EE", 7.0e-01);
219 set(
"deta_EE", 9.0e-03);
220 set(
"hoe_EE", 5.0e-02);
221 set(
"cIso_EE", 7.0e-02);
223 set(
"conversionRejection", 1);
224 set(
"maxNumberOfExpectedMissingHits", 1);
226 set(
"trackIso_EB", 9.0e-02);
227 set(
"ecalIso_EB", 8.0e-02);
228 set(
"hcalIso_EB", 1.0e-01);
229 set(
"sihih_EB", 1.0e-02);
230 set(
"dphi_EB", 6.0e-02);
231 set(
"deta_EB", 6.0e-03);
232 set(
"hoe_EB", 4.0e-02);
233 set(
"cIso_EB", 10000.);
235 set(
"trackIso_EE", 5.0e-02);
236 set(
"ecalIso_EE", 5.0e-02);
237 set(
"hcalIso_EE", 2.5e-02);
238 set(
"sihih_EE", 3.0e-02);
239 set(
"dphi_EE", 4.0e-02);
240 set(
"deta_EE", 7.0e-03);
241 set(
"hoe_EE", 2.5e-02);
242 set(
"cIso_EE", 10000.);
244 set(
"conversionRejection", 1);
245 set(
"maxNumberOfExpectedMissingHits", 1);
247 set(
"trackIso_EB", 100000.);
248 set(
"ecalIso_EB", 100000.);
249 set(
"hcalIso_EB", 100000.);
250 set(
"sihih_EB", 1.0e-02);
251 set(
"dphi_EB", 6.0e-02);
252 set(
"deta_EB", 6.0e-03);
253 set(
"hoe_EB", 4.0e-02);
254 set(
"cIso_EB", 9.0e-02);
256 set(
"trackIso_EE", 100000.);
257 set(
"ecalIso_EE", 100000.);
258 set(
"hcalIso_EE", 100000.);
259 set(
"sihih_EE", 3.0e-02);
260 set(
"dphi_EE", 4.0e-02);
261 set(
"deta_EE", 7.0e-03);
262 set(
"hoe_EE", 2.5e-02);
263 set(
"cIso_EE", 6.0e-02);
265 set(
"conversionRejection", 1);
266 set(
"maxNumberOfExpectedMissingHits", 1);
268 set(
"trackIso_EB", 9.0e-02);
269 set(
"ecalIso_EB", 7.0e-02);
270 set(
"hcalIso_EB", 1.0e-01);
271 set(
"sihih_EB", 1.0e-02);
272 set(
"dphi_EB", 6.0e-02);
273 set(
"deta_EB", 4.0e-03);
274 set(
"hoe_EB", 4.0e-02);
275 set(
"cIso_EB", 100000.);
277 set(
"trackIso_EE", 4.0e-02);
278 set(
"ecalIso_EE", 5.0e-02);
279 set(
"hcalIso_EE", 2.5e-02);
280 set(
"sihih_EE", 3.0e-02);
281 set(
"dphi_EE", 3.0e-02);
282 set(
"deta_EE", 7.0e-03);
283 set(
"hoe_EE", 2.5e-02);
284 set(
"cIso_EE", 100000.);
286 set(
"conversionRejection", 1);
287 set(
"maxNumberOfExpectedMissingHits", 0);
289 set(
"trackIso_EB", 100000.);
290 set(
"ecalIso_EB", 100000.);
291 set(
"hcalIso_EB", 100000.);
292 set(
"sihih_EB", 1.0e-02);
293 set(
"dphi_EB", 6.0e-02);
294 set(
"deta_EB", 4.0e-03);
295 set(
"hoe_EB", 4.0e-02);
296 set(
"cIso_EB", 7.0e-02);
298 set(
"trackIso_EE", 100000.);
299 set(
"ecalIso_EE", 100000.);
300 set(
"hcalIso_EE", 100000.);
301 set(
"sihih_EE", 3.0e-02);
302 set(
"dphi_EE", 3.0e-02);
303 set(
"deta_EE", 7.0e-03);
304 set(
"hoe_EE", 2.5e-02);
305 set(
"cIso_EE", 6.0e-02);
307 set(
"conversionRejection", 1);
308 set(
"maxNumberOfExpectedMissingHits", 0);
310 set(
"trackIso_EB", 5.0e-02);
311 set(
"ecalIso_EB", 6.0e-02);
312 set(
"hcalIso_EB", 3.0e-02);
313 set(
"sihih_EB", 1.0e-02);
314 set(
"dphi_EB", 3.0e-02);
315 set(
"deta_EB", 4.0e-03);
316 set(
"hoe_EB", 2.5e-02);
317 set(
"cIso_EB", 100000.);
319 set(
"trackIso_EE", 2.5e-02);
320 set(
"ecalIso_EE", 2.5e-02);
321 set(
"hcalIso_EE", 2.0e-02);
322 set(
"sihih_EE", 3.0e-02);
323 set(
"dphi_EE", 2.0e-02);
324 set(
"deta_EE", 5.0e-03);
325 set(
"hoe_EE", 2.5e-02);
326 set(
"cIso_EE", 100000.);
328 set(
"conversionRejection", 1);
329 set(
"maxNumberOfExpectedMissingHits", 0);
331 set(
"trackIso_EB", 100000.);
332 set(
"ecalIso_EB", 100000.);
333 set(
"hcalIso_EB", 100000.);
334 set(
"sihih_EB", 1.0e-02);
335 set(
"dphi_EB", 3.0e-02);
336 set(
"deta_EB", 4.0e-03);
337 set(
"hoe_EB", 2.5e-02);
338 set(
"cIso_EB", 4.0e-02);
340 set(
"trackIso_EE", 100000.);
341 set(
"ecalIso_EE", 100000.);
342 set(
"hcalIso_EE", 100000.);
343 set(
"sihih_EE", 3.0e-02);
344 set(
"dphi_EE", 2.0e-02);
345 set(
"deta_EE", 5.0e-03);
346 set(
"hoe_EE", 2.5e-02);
347 set(
"cIso_EE", 3.0e-02);
349 set(
"conversionRejection", 1);
350 set(
"maxNumberOfExpectedMissingHits", 0);
352 set(
"trackIso_EB", 4.0e-02);
353 set(
"ecalIso_EB", 4.0e-02);
354 set(
"hcalIso_EB", 3.0e-02);
355 set(
"sihih_EB", 1.0e-02);
356 set(
"dphi_EB", 2.5e-02);
357 set(
"deta_EB", 4.0e-03);
358 set(
"hoe_EB", 2.5e-02);
359 set(
"cIso_EB", 100000.);
361 set(
"trackIso_EE", 2.5e-02);
362 set(
"ecalIso_EE", 2.0e-02);
363 set(
"hcalIso_EE", 2.0e-02);
364 set(
"sihih_EE", 3.0e-02);
365 set(
"dphi_EE", 2.0e-02);
366 set(
"deta_EE", 5.0e-03);
367 set(
"hoe_EE", 2.5e-02);
368 set(
"cIso_EE", 100000.);
370 set(
"conversionRejection", 1);
371 set(
"maxNumberOfExpectedMissingHits", 0);
373 set(
"trackIso_EB", 100000.);
374 set(
"ecalIso_EB", 100000.);
375 set(
"hcalIso_EB", 100000.);
376 set(
"sihih_EB", 1.0e-02);
377 set(
"dphi_EB", 2.5e-02);
378 set(
"deta_EB", 4.0e-03);
379 set(
"hoe_EB", 2.5e-02);
380 set(
"cIso_EB", 3.0e-02);
382 set(
"trackIso_EE", 100000.);
383 set(
"ecalIso_EE", 100000.);
384 set(
"hcalIso_EE", 100000.);
385 set(
"sihih_EE", 3.0e-02);
386 set(
"dphi_EE", 2.0e-02);
387 set(
"deta_EE", 5.0e-03);
388 set(
"hoe_EE", 2.5e-02);
389 set(
"cIso_EE", 2.0e-02);
391 set(
"conversionRejection", 1);
392 set(
"maxNumberOfExpectedMissingHits", 0);
404 Double_t trackIso_EE,
412 Int_t conversionRejection,
413 Int_t maxNumberOfExpectedMissingHits) {
434 push_back(
"maxNumberOfExpectedMissingHits");
436 set(
"trackIso_EB", trackIso_EB);
437 set(
"ecalIso_EB", ecalIso_EB);
438 set(
"hcalIso_EB", hcalIso_EB);
439 set(
"sihih_EB", sihih_EB);
440 set(
"dphi_EB", dphi_EB);
441 set(
"deta_EB", deta_EB);
442 set(
"hoe_EB", hoe_EB);
443 set(
"cIso_EB", cIso_EB);
445 set(
"trackIso_EE", trackIso_EE);
446 set(
"ecalIso_EE", ecalIso_EE);
447 set(
"hcalIso_EE", hcalIso_EE);
448 set(
"sihih_EE", sihih_EE);
449 set(
"dphi_EE", dphi_EE);
450 set(
"deta_EE", deta_EE);
451 set(
"hoe_EE", hoe_EE);
452 set(
"cIso_EE", cIso_EE);
454 set(
"conversionRejection", conversionRejection);
455 set(
"maxNumberOfExpectedMissingHits", maxNumberOfExpectedMissingHits);
467 Double_t eleET =
electron.p4().Pt();
471 Double_t sihih =
electron.sigmaIetaIeta();
472 Double_t Dphi =
electron.deltaPhiSuperClusterTrackAtVtx();
473 Double_t Deta =
electron.deltaEtaSuperClusterTrackAtVtx();
474 Double_t HoE =
electron.hadronicOverEm();
485 Double_t dist =
electron.convDist();
486 Double_t dcot =
electron.convDcot();
487 Bool_t isConv = fabs(dist) < 0.02 && fabs(dcot) < 0.02;
497 if (sihih <
cut(
"sihih_EB",
double()) ||
ignoreCut(
"sihih_EB"))
499 if (fabs(Dphi) <
cut(
"dphi_EB",
double()) ||
ignoreCut(
"dphi_EB"))
501 if (fabs(Deta) <
cut(
"deta_EB",
double()) ||
ignoreCut(
"deta_EB"))
503 if (HoE <
cut(
"hoe_EB",
double()) ||
ignoreCut(
"hoe_EB"))
505 if (cIso <
cut(
"cIso_EB",
double()) ||
ignoreCut(
"cIso_EB"))
524 if (sihih <
cut(
"sihih_EE",
double()) ||
ignoreCut(
"sihih_EE"))
526 if (fabs(Dphi) <
cut(
"dphi_EE",
double()) ||
ignoreCut(
"dphi_EE"))
528 if (fabs(Deta) <
cut(
"deta_EE",
double()) ||
ignoreCut(
"deta_EE"))
530 if (HoE <
cut(
"hoe_EE",
double()) ||
ignoreCut(
"hoe_EE"))
532 if (cIso <
cut(
"cIso_EE",
double()) ||
ignoreCut(
"cIso_EE"))
546 if (innerHits <=
cut(
"maxNumberOfExpectedMissingHits",
int()))
547 passCut(
ret,
"maxNumberOfExpectedMissingHits");
548 if (0 ==
cut(
"conversionRejection",
int()) || isConv ==
false)
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
ret
prodAgent to be discontinued
bool spring10Variables(const pat::Electron &electron, pat::strbitset &ret)
void setIgnored(pat::strbitset &ret)
set ignored bits
pat::strbitset retInternal_
internal ret if users don't care about return bits
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Functor that operates on <T>
void initialize(Version_t version)
bool operator()(const pat::Electron &electron, pat::strbitset &ret) override
This provides the interface for base classes to select objects.
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Analysis-level electron class.
void initialize(Double_t trackIso_EB, Double_t ecalIso_EB, Double_t hcalIso_EB, Double_t sihih_EB, Double_t dphi_EB, Double_t deta_EB, Double_t hoe_EB, Double_t cIso_EB, Double_t trackIso_EE, Double_t ecalIso_EE, Double_t hcalIso_EE, Double_t sihih_EE, Double_t dphi_EE, Double_t deta_EE, Double_t hoe_EE, Double_t cIso_EE, Int_t conversionRejection, Int_t maxNumberOfExpectedMissingHits)
SimpleCutBasedElectronIDSelectionFunctor(Version_t version)
SimpleCutBasedElectronIDSelectionFunctor(edm::ParameterSet const ¶meters)
SimpleCutBasedElectronIDSelectionFunctor()